aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 4 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9ec866e4..3fa781ba3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,6 +49,7 @@ message(STATUS "CMake version ${CMAKE_VERSION}")
project(monero)
include(FindCcache) # Has to be included after the project() macro, to be able to read the CXX variable.
+find_package (PkgConfig REQUIRED)
enable_language(C ASM)
@@ -949,30 +950,13 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND ARCH_WIDTH EQUAL "32" AND NOT IOS AN
endif()
find_path(ZMQ_INCLUDE_PATH zmq.h)
-find_library(ZMQ_LIB zmq)
-find_library(PGM_LIBRARY pgm)
-find_library(NORM_LIBRARY norm)
-find_library(PROTOLIB_LIBRARY protolib)
-find_library(SODIUM_LIBRARY sodium)
if(NOT ZMQ_INCLUDE_PATH)
message(FATAL_ERROR "Could not find required header zmq.h")
endif()
-if(NOT ZMQ_LIB)
- message(FATAL_ERROR "Could not find required libzmq")
-endif()
-if(PGM_LIBRARY)
- set(ZMQ_LIB "${ZMQ_LIB};${PGM_LIBRARY}")
-endif()
-if(NORM_LIBRARY)
- set(ZMQ_LIB "${ZMQ_LIB};${NORM_LIBRARY}")
-endif()
-if(PROTOLIB_LIBRARY)
- set(ZMQ_LIB "${ZMQ_LIB};${PROTOLIB_LIBRARY}")
-endif()
-if(SODIUM_LIBRARY)
- set(ZMQ_LIB "${ZMQ_LIB};${SODIUM_LIBRARY}")
-endif()
+
+pkg_check_modules(ZMQ REQUIRED zmq)
+pkg_check_modules(SODIUM REQUIRED sodium)
add_subdirectory(contrib)
add_subdirectory(src)