mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-03 20:45:41 +00:00
cmake: add /Q_no-use-libirc flag when building a no-libc library
The new Intel LLVM library needs this because when building SDL2 in release mode.
This commit is contained in:
parent
b58285b7ed
commit
5e5b029d6c
|
@ -1105,6 +1105,10 @@ else()
|
||||||
set(HAVE_STDARG_H 1)
|
set(HAVE_STDARG_H 1)
|
||||||
set(HAVE_STDDEF_H 1)
|
set(HAVE_STDDEF_H 1)
|
||||||
check_include_file(stdint.h HAVE_STDINT_H)
|
check_include_file(stdint.h HAVE_STDINT_H)
|
||||||
|
|
||||||
|
if(MSVC AND USE_CLANG)
|
||||||
|
check_c_compiler_flag("/Q_no-use-libirc" HAS_Q_NO_USE_LIBIRC )
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -3317,6 +3321,9 @@ if(SDL_SHARED)
|
||||||
# FIXME: should be added for all architectures (missing symbols for ARM)
|
# FIXME: should be added for all architectures (missing symbols for ARM)
|
||||||
target_link_libraries(SDL2 PRIVATE "-nodefaultlib:MSVCRT")
|
target_link_libraries(SDL2 PRIVATE "-nodefaultlib:MSVCRT")
|
||||||
endif()
|
endif()
|
||||||
|
if(HAS_Q_NO_USE_LIBIRC)
|
||||||
|
target_compile_options(SDL2 PRIVATE /Q_no-use-libirc)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# FIXME: Remove SOVERSION in SDL3
|
# FIXME: Remove SOVERSION in SDL3
|
||||||
|
@ -3346,10 +3353,9 @@ if(SDL_SHARED)
|
||||||
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
if(MSVC AND NOT SDL_LIBC AND NOT MSVC_CLANG AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
|
||||||
# Don't try to link with the default set of libraries.
|
# Don't try to link with the default set of libraries.
|
||||||
if(NOT WINDOWS_STORE)
|
if(NOT WINDOWS_STORE)
|
||||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
|
set_property(TARGET SDL2 APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB")
|
||||||
set_target_properties(SDL2 PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
|
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
|
set_property(TARGET SDL2 APPEND_STRING PROPERTY STATIC_LIBRARY_FLAGS " /NODEFAULTLIB")
|
||||||
endif()
|
endif()
|
||||||
# FIXME: if CMAKE_VERSION >= 3.13, use target_link_options for EXTRA_LDFLAGS
|
# FIXME: if CMAKE_VERSION >= 3.13, use target_link_options for EXTRA_LDFLAGS
|
||||||
target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD} ${CMAKE_DEPENDS})
|
target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS} ${EXTRA_LDFLAGS_BUILD} ${CMAKE_DEPENDS})
|
||||||
|
|
Loading…
Reference in a new issue