cmake: fix argument order

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-05-25 17:24:30 +02:00
parent 7b111e7e35
commit 304130d564
No known key found for this signature in database
GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 6 additions and 8 deletions

View File

@ -115,18 +115,16 @@ function(set_common_target_properties TARGET)
$<$<BOOL:${MSVC}>:/wd4244 /wd4267 /wd4273>
)
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
target_link_options(${TARGET}
PRIVATE
-Wl,--no-undefined
)
endif()
target_link_options(${TARGET}
PRIVATE
$<$<C_COMPILER_ID:GNU>:-Wl,--no-undefined>
)
set_property(TARGET ${TARGET} PROPERTY POSITION_INDEPENDENT_CODE ON)
if(APPLE)
set_property(TARGET ${TARGET} PROPERTY APPEND OSX_ARCHITECTURES arm64)
set_property(TARGET ${TARGET} PROPERTY APPEND OSX_ARCHITECTURES x86_64)
set_property(TARGET ${TARGET} APPEND PROPERTY OSX_ARCHITECTURES arm64)
set_property(TARGET ${TARGET} APPEND PROPERTY OSX_ARCHITECTURES x86_64)
endif()
endfunction()