mirror of
https://github.com/encounter/SDL.git
synced 2025-05-19 22:01:33 +00:00
cmake: Don't add /NODEFAULTLIB to link flags when building SDL-static
This commit is contained in:
parent
181877ebeb
commit
bdd1d035b7
@ -3096,12 +3096,6 @@ if(SDL_STATIC)
|
|||||||
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
set_target_properties(SDL2-static PROPERTIES OUTPUT_NAME "SDL2")
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE "${SDL_STATIC_PIC}")
|
set_target_properties(SDL2-static PROPERTIES POSITION_INDEPENDENT_CODE "${SDL_STATIC_PIC}")
|
||||||
# Note: The clang toolset for Visual Studio does not support /NODEFAULTLIB.
|
|
||||||
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
|
||||||
set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
|
|
||||||
set_target_properties(SDL2-static PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
|
||||||
set_target_properties(SDL2-static PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
|
||||||
endif()
|
|
||||||
# TODO: Win32 platforms keep the same suffix .lib for import and static
|
# TODO: Win32 platforms keep the same suffix .lib for import and static
|
||||||
# libraries - do we need to consider this?
|
# libraries - do we need to consider this?
|
||||||
target_link_libraries(SDL2-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
target_link_libraries(SDL2-static PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user