equal
deleted
inserted
replaced
1693 # Ensure that the extra cflags are used at compile time |
1693 # Ensure that the extra cflags are used at compile time |
1694 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") |
1694 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") |
1695 |
1695 |
1696 # Always build SDLmain |
1696 # Always build SDLmain |
1697 add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) |
1697 add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) |
1698 target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include>) |
1698 target_include_directories(SDL2main PUBLIC $<INSTALL_INTERFACE:include/SDL2>) |
1699 set(_INSTALL_LIBS "SDL2main") |
1699 set(_INSTALL_LIBS "SDL2main") |
1700 if (NOT ANDROID) |
1700 if (NOT ANDROID) |
1701 set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
1701 set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
1702 endif() |
1702 endif() |
1703 |
1703 |
1722 set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") |
1722 set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB") |
1723 set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") |
1723 set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB") |
1724 endif() |
1724 endif() |
1725 set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) |
1725 set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS}) |
1726 target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) |
1726 target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) |
1727 target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include>) |
1727 target_include_directories(SDL2 PUBLIC $<INSTALL_INTERFACE:include/SDL2>) |
1728 if (NOT ANDROID) |
1728 if (NOT ANDROID) |
1729 set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
1729 set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
1730 endif() |
1730 endif() |
1731 endif() |
1731 endif() |
1732 |
1732 |
1748 endif() |
1748 endif() |
1749 # TODO: Win32 platforms keep the same suffix .lib for import and static |
1749 # TODO: Win32 platforms keep the same suffix .lib for import and static |
1750 # libraries - do we need to consider this? |
1750 # libraries - do we need to consider this? |
1751 set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS}) |
1751 set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS}) |
1752 target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) |
1752 target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS}) |
1753 target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include>) |
1753 target_include_directories(SDL2-static PUBLIC $<INSTALL_INTERFACE:include/SDL2>) |
1754 if (NOT ANDROID) |
1754 if (NOT ANDROID) |
1755 set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
1755 set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX}) |
1756 endif() |
1756 endif() |
1757 endif() |
1757 endif() |
1758 |
1758 |