Support Macos linking c++ stl in CMakeLists.txt
All checks were successful
Run UnitTests / build-and-run-tests (push) Successful in 4m28s

This commit is contained in:
Stephen Seo 2024-07-14 11:36:44 +09:00
parent 4afec4ddb9
commit 29804dddd0

View file

@ -25,9 +25,15 @@ add_library(UDPC ${UDPC_SOURCES})
# Enforce linking with libstdc++ even with C targets.
# Doesn't affect conan, so conanfile.py was also modified for this.
if(APPLE)
set_target_properties(UDPC PROPERTIES
INTERFACE_LINK_LIBRARIES "libc++"
)
elseif(UNIX)
set_target_properties(UDPC PROPERTIES
INTERFACE_LINK_LIBRARIES "stdc++"
)
endif()
set_target_properties(UDPC PROPERTIES VERSION ${UDPC_VERSION} SOVERSION ${UDPC_SOVERSION})