]> git.seodisparate.com - UDPConnection/commitdiff
Distinguish manual variables and pkgconf variables
authorStephen Seo <seo.disparate@gmail.com>
Thu, 16 Jan 2020 02:30:22 +0000 (11:30 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Thu, 16 Jan 2020 02:31:22 +0000 (11:31 +0900)
Variables checked to manually set libsodium paths have been changed to
prevent conflict with variables set by searching for libsodium via
pkgconfig.

CMakeLists.txt

index 416a272515d16b37ef735c797d55b16f48f36adc..ae2a2c82a8a96446d8a08a2e6e1555fdad30da3a 100644 (file)
@@ -36,11 +36,11 @@ endif()
 
 if(UDPC_DISABLE_LIBSODIUM)
     message(STATUS "libsodium disabled")
-elseif(DEFINED LIBSODIUM_LIBRARIES AND DEFINED LIBSODIUM_INCLUDE_DIRS)
+elseif(DEFINED M_LIBSODIUM_LIBRARIES AND DEFINED M_LIBSODIUM_INCLUDE_DIRS)
     message(STATUS "libsodium manual paths detected, using them")
     target_compile_definitions(UDPC PUBLIC UDPC_LIBSODIUM_ENABLED)
-    target_link_libraries(UDPC PUBLIC ${LIBSODIUM_LIBRARIES})
-    target_include_directories(UDPC PUBLIC ${LIBSODIUM_INCLUDE_DIRS})
+    target_link_libraries(UDPC PUBLIC ${M_LIBSODIUM_LIBRARIES})
+    target_include_directories(UDPC PUBLIC ${M_LIBSODIUM_INCLUDE_DIRS})
 else()
     find_package(PkgConfig REQUIRED)
     pkg_check_modules(LIBSODIUM QUIET libsodium)