Skip to content
Permalink
Browse files
Fixes some naming issues in the embedded Find<pkg>.cmake files.
  • Loading branch information
pnoltes committed Apr 4, 2022
1 parent 3f93d42 commit befb97086ed59c4a294f90fa60acb8b9236b82a1
Showing 4 changed files with 24 additions and 24 deletions.
@@ -32,7 +32,7 @@ find_package(ZLIB REQUIRED) #framework
find_package(UUID REQUIRED) #framework
find_package(CURL REQUIRED) #framework, etcdlib
find_package(LIBZIP REQUIRED) #framework, etcdlib
find_package(Jansson REQUIRED) #etcdlib, dfi
find_package(jansson REQUIRED) #etcdlib, dfi
find_package(FFI REQUIRED) #dfi
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
@@ -18,34 +18,34 @@

# - Try to find ZMQ
# Once done this will define
# ZMQ_FOUND - System has Zmq
# ZMQ_INCLUDE_DIRS - The Zmq include directories
# ZMQ_LIBRARIES - The libraries needed to use Zmq
# ZMQ_DEFINITIONS - Compiler switches required for using Zmq
# ZMQ::lib - Imported target for UUID
# ZEROMQ_FOUND - System has Zmq
# ZEROMQ_INCLUDE_DIRS - The Zmq include directories
# ZEROMQ_LIBRARIES - The libraries needed to use Zmq
# ZEROMQ_DEFINITIONS - Compiler switches required for using Zmq
# ZeroMQ::ZeroMQ - Imported target for UUID

find_path(ZMQ_INCLUDE_DIR zmq.h zmq_utils.h
find_path(ZEROMQ_INCLUDE_DIR zmq.h zmq_utils.h
/usr/include
/usr/local/include )

find_library(ZMQ_LIBRARY NAMES zmq
find_library(ZEROMQ_LIBRARY NAMES zmq
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 )

set(ZMQ_LIBRARIES ${ZMQ_LIBRARY} )
set(ZMQ_INCLUDE_DIRS ${ZMQ_INCLUDE_DIR} )
set(ZEROMQ_LIBRARIES ${ZEROMQ_LIBRARY} )
set(ZEROMQ_INCLUDE_DIRS ${ZEROMQ_INCLUDE_DIR} )

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set ZMQ_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(ZMQ DEFAULT_MSG
ZMQ_LIBRARY ZMQ_INCLUDE_DIR)
find_package_handle_standard_args(ZeroMQ DEFAULT_MSG
ZEROMQ_LIBRARY ZEROMQ_INCLUDE_DIR)

mark_as_advanced(ZMQ_INCLUDE_DIR ZMQ_LIBRARY )
mark_as_advanced(ZEROMQ_INCLUDE_DIR ZEROMQ_LIBRARY )

if (ZMQ_FOUND AND NOT TARGET ZeroMQ::ZeroMQ
if (ZEROMQ_FOUND AND NOT TARGET ZeroMQ::ZeroMQ)
add_library(ZeroMQ::ZeroMQ SHARED IMPORTED)
set_target_properties(ZeroMQ::ZeroMQ PROPERTIES
IMPORTED_LOCATION "${ZMQ_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ZMQ_INCLUDE_DIR}"
IMPORTED_LOCATION "${ZEROMQ_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${ZEROMQ_INCLUDE_DIR}"
)
endif ()
@@ -18,11 +18,11 @@

# - Try to find CZMQ
# Once done this will define
# CZMQ_FOUND - System has Zmq
# CZMQ_INCLUDE_DIRS - The Zmq include directories
# CZMQ_LIBRARIES - The libraries needed to use Zmq
# CZMQ_DEFINITIONS - Compiler switches required for using Zmq
# CZMQ::lib - Imported CMake target for the library (include path + library)
# CZMQ_FOUND - System has czmq
# CZMQ_INCLUDE_DIRS - The czmq include directories
# CZMQ_LIBRARIES - The libraries needed to use czmq
# CZMQ_DEFINITIONS - Compiler switches required for using czmq
# czmq::czmq - Imported CMake target for the library (include path + library)

find_path(CZMQ_INCLUDE_DIR czmq.h
/usr/include
@@ -37,7 +37,7 @@ set(CZMQ_INCLUDE_DIRS ${CZMQ_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set CZMQ_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(CZMQ DEFAULT_MSG
find_package_handle_standard_args(czmq DEFAULT_MSG
CZMQ_LIBRARY CZMQ_INCLUDE_DIR)

mark_as_advanced(CZMQ_INCLUDE_DIR CZMQ_LIBRARY)
@@ -21,7 +21,7 @@
# JANSSON_FOUND - System has Jansson
# JANSSON_INCLUDE_DIRS - The Jansson include directories
# JANSSON_LIBRARIES - The libraries needed to use Jansson
# Jansson - Imported target for Jansson
# jansson::jansson - Imported target for Jansson

find_path(JANSSON_INCLUDE_DIR jansson.h
/usr/include
@@ -36,7 +36,7 @@ set(JANSSON_INCLUDE_DIRS ${JANSSON_INCLUDE_DIR} )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set JANSSON_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(Jansson DEFAULT_MSG
find_package_handle_standard_args(jansson DEFAULT_MSG
JANSSON_LIBRARY JANSSON_INCLUDE_DIR)

mark_as_advanced(JANSSON_INCLUDE_DIR JANSSON_LIBRARY)

0 comments on commit befb970

Please sign in to comment.