diff --git a/CMakeLists.txt b/CMakeLists.txt index dfdadac..8386928 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,6 @@ install(EXPORT ${PROJECT_NAME}-targets DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake - ${CMAKE_SOURCE_DIR}/libzmq-pkg-config/FindZeroMQ.cmake DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR}) install(FILES ${CMAKE_SOURCE_DIR}/libzmq-pkg-config/FindZeroMQ.cmake DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR}/libzmq-pkg-config) diff --git a/cppzmqConfig.cmake.in b/cppzmqConfig.cmake.in index 0b012fd..11d7a2c 100644 --- a/cppzmqConfig.cmake.in +++ b/cppzmqConfig.cmake.in @@ -21,7 +21,8 @@ find_package(ZeroMQ QUIET) # libzmq autotools install: fallback to pkg-config if(NOT ZeroMQ_FOUND) - include(${CMAKE_CURRENT_LIST_DIR}/libzmqPkgConfigFallback.cmake) + list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/libzmq-pkg-config) + find_package(ZeroMQ REQUIRED) endif() if(NOT ZeroMQ_FOUND)