]> git.seodisparate.com - UDPConnection/commitdiff
Attempt to fix conan build
authorStephen Seo <seo.disparate@gmail.com>
Sat, 13 Jul 2024 13:49:56 +0000 (22:49 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sat, 13 Jul 2024 14:02:17 +0000 (23:02 +0900)
CMakeLists.txt
conanfile.py

index 007f44c502768eb36ec6e3cf3098b8d1d27956ac..5665d85a2da8675b788e8f9e588809149bc500e3 100644 (file)
@@ -23,6 +23,12 @@ endif()
 
 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.
+set_target_properties(UDPC PROPERTIES
+    INTERFACE_LINK_LIBRARIES "stdc++"
+)
+
 set_target_properties(UDPC PROPERTIES VERSION ${UDPC_VERSION} SOVERSION ${UDPC_SOVERSION})
 
 target_compile_features(UDPC PUBLIC cxx_std_11)
@@ -42,11 +48,6 @@ find_package(libsodium REQUIRED)
 target_compile_definitions(UDPC PUBLIC UDPC_LIBSODIUM_ENABLED)
 target_link_libraries(UDPC PUBLIC libsodium::libsodium)
 
-# Enforce linking with libstdc++ even with C targets.
-# Doesn't affect conan, so conanfile.py was also modified for this.
-set_target_properties(UDPC PROPERTIES
-    INTERFACE_LINK_LIBRARIES "stdc++"
-)
 
 if(CMAKE_BUILD_TYPE MATCHES "Debug")
     set(UDPC_UnitTest_SOURCES
index e28a1a9508eade052b6a9082c8f87553b16f43ec..233edc79cdf7537d9522657e7cc85a054b7756f1 100644 (file)
@@ -53,5 +53,5 @@ class udpcRecipe(ConanFile):
         cmake.install()
 
     def package_info(self):
-        self.cpp_info.libs = ["UDPC"]
-        self.cpp_info.system_libs = ["stdc++"]
+        self.cpp_info.libs.append("UDPC")
+        self.cpp_info.system_libs.append("stdc++")