Attempt to fix conan build
All checks were successful
Run UnitTests / build-and-run-tests (push) Successful in 1m20s

This commit is contained in:
Stephen Seo 2024-07-13 22:49:56 +09:00
parent f30e911208
commit 442aa1e422
2 changed files with 8 additions and 7 deletions

View file

@ -23,6 +23,12 @@ endif()
add_library(UDPC ${UDPC_SOURCES}) 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}) set_target_properties(UDPC PROPERTIES VERSION ${UDPC_VERSION} SOVERSION ${UDPC_SOVERSION})
target_compile_features(UDPC PUBLIC cxx_std_11) 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_compile_definitions(UDPC PUBLIC UDPC_LIBSODIUM_ENABLED)
target_link_libraries(UDPC PUBLIC libsodium::libsodium) 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") if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(UDPC_UnitTest_SOURCES set(UDPC_UnitTest_SOURCES

View file

@ -53,5 +53,5 @@ class udpcRecipe(ConanFile):
cmake.install() cmake.install()
def package_info(self): def package_info(self):
self.cpp_info.libs = ["UDPC"] self.cpp_info.libs.append("UDPC")
self.cpp_info.system_libs = ["stdc++"] self.cpp_info.system_libs.append("stdc++")