mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
fix msvc build
This commit is contained in:
parent
c77b769790
commit
6eca72f694
@ -112,8 +112,10 @@ add_library(Vec::Vec INTERFACE IMPORTED)
|
||||
target_include_directories(Vec::Vec INTERFACE "${CMAKE_SOURCE_DIR}/3rdparty/vec")
|
||||
|
||||
set(lego1_targets)
|
||||
set(lego1_interface_targets)
|
||||
macro(add_lego1_static_library NAME)
|
||||
list(APPEND lego1_targets ${NAME})
|
||||
list(APPEND lego1_interface_targets ${NAME}-interface)
|
||||
add_library(${NAME}-interface INTERFACE)
|
||||
add_library(${NAME}-objects STATIC ${ARGN})
|
||||
target_link_libraries(${NAME}-objects PRIVATE ${NAME}-interface)
|
||||
@ -504,7 +506,7 @@ endif()
|
||||
|
||||
if (MSVC)
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "15")
|
||||
set_property(TARGET ${lego1_targets} APPEND PROPERTY COMPILE_DEFINITIONS "_CRT_SECURE_NO_WARNINGS")
|
||||
set_property(TARGET ${lego1_interface_targets} APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS "_CRT_SECURE_NO_WARNINGS")
|
||||
if (TARGET isle)
|
||||
target_compile_definitions(isle PRIVATE "_CRT_SECURE_NO_WARNINGS")
|
||||
endif()
|
||||
@ -514,7 +516,7 @@ if (MSVC)
|
||||
endif()
|
||||
# Visual Studio 2017 version 15.7 needs "/Zc:__cplusplus" for __cplusplus
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.14.26428")
|
||||
foreach(tgt IN LISTS lego1_targets)
|
||||
foreach(tgt IN LISTS lego1_interface_targets)
|
||||
target_compile_options(${tgt} PRIVATE "-Zc:__cplusplus")
|
||||
endforeach()
|
||||
if (TARGET isle)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user