]> git.seodisparate.com - UDPConnection/commitdiff
Support Macos linking c++ stl in CMakeLists.txt
authorStephen Seo <seo.disparate@gmail.com>
Sun, 14 Jul 2024 02:36:44 +0000 (11:36 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sun, 14 Jul 2024 02:36:44 +0000 (11:36 +0900)
CMakeLists.txt

index 5665d85a2da8675b788e8f9e588809149bc500e3..2f10f9b6e754a24539e8feb0dd4538538aeab18b 100644 (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})