Skip to content

Commit

Permalink
regen from zproject
Browse files Browse the repository at this point in the history
  • Loading branch information
sphaero committed Feb 10, 2021
1 parent 7f744f7 commit 71d5078
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 89 deletions.
70 changes: 35 additions & 35 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,126 +131,126 @@ set(OPTIONAL_LIBRARIES_STATIC)
# LIBZMQ dependency
########################################################################
find_package(libzmq REQUIRED)
IF (LIBZMQ_FOUND)
include_directories(${LIBZMQ_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${LIBZMQ_LIBRARIES})
IF (libzmq_FOUND)
include_directories(${libzmq_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${libzmq_LIBRARIES})
IF (PC_LIBZMQ_FOUND)
set(pkg_config_names_private "${pkg_config_names_private} libzmq")
list(APPEND OPTIONAL_LIBRARIES_STATIC ${PC_LIBZMQ_STATIC_LDFLAGS})
ELSE (PC_LIBZMQ_FOUND)
set(pkg_config_libs_private "${pkg_config_libs_private} -lzmq")
ENDIF (PC_LIBZMQ_FOUND)
ELSE (LIBZMQ_FOUND)
ELSE (libzmq_FOUND)
message( FATAL_ERROR "libzmq not found." )
ENDIF (LIBZMQ_FOUND)
ENDIF (libzmq_FOUND)

########################################################################
# UUID dependency
########################################################################
find_package(uuid)
option(CZMQ_WITH_UUID "Build czmq with uuid" ${UUID_FOUND})
IF (CZMQ_WITH_UUID AND UUID_FOUND)
include_directories(${UUID_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${UUID_LIBRARIES})
IF (CZMQ_WITH_UUID AND uuid_FOUND)
include_directories(${uuid_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${uuid_LIBRARIES})
IF (PC_UUID_FOUND)
set(pkg_config_names_private "${pkg_config_names_private} uuid")
list(APPEND OPTIONAL_LIBRARIES_STATIC ${PC_UUID_STATIC_LDFLAGS})
ELSE (PC_UUID_FOUND)
set(pkg_config_libs_private "${pkg_config_libs_private} -luuid")
ENDIF (PC_UUID_FOUND)
add_definitions(-DHAVE_UUID)
list(APPEND OPTIONAL_LIBRARIES ${UUID_LIBRARIES})
ENDIF (CZMQ_WITH_UUID AND UUID_FOUND)
list(APPEND OPTIONAL_LIBRARIES ${uuid_LIBRARIES})
ENDIF (CZMQ_WITH_UUID AND uuid_FOUND)

########################################################################
# SYSTEMD dependency
########################################################################
find_package(systemd)
option(CZMQ_WITH_SYSTEMD "Build czmq with systemd" ${SYSTEMD_FOUND})
IF (CZMQ_WITH_SYSTEMD AND SYSTEMD_FOUND)
include_directories(${SYSTEMD_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${SYSTEMD_LIBRARIES})
IF (CZMQ_WITH_SYSTEMD AND systemd_FOUND)
include_directories(${systemd_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${systemd_LIBRARIES})
IF (PC_SYSTEMD_FOUND)
set(pkg_config_names_private "${pkg_config_names_private} libsystemd >= 200.0.0")
list(APPEND OPTIONAL_LIBRARIES_STATIC ${PC_SYSTEMD_STATIC_LDFLAGS})
ELSE (PC_SYSTEMD_FOUND)
set(pkg_config_libs_private "${pkg_config_libs_private} -lsystemd")
ENDIF (PC_SYSTEMD_FOUND)
add_definitions(-DHAVE_LIBSYSTEMD)
list(APPEND OPTIONAL_LIBRARIES ${SYSTEMD_LIBRARIES})
ENDIF (CZMQ_WITH_SYSTEMD AND SYSTEMD_FOUND)
list(APPEND OPTIONAL_LIBRARIES ${systemd_LIBRARIES})
ENDIF (CZMQ_WITH_SYSTEMD AND systemd_FOUND)

########################################################################
# LZ4 dependency
########################################################################
find_package(lz4)
option(CZMQ_WITH_LZ4 "Build czmq with lz4" ${LZ4_FOUND})
IF (CZMQ_WITH_LZ4 AND LZ4_FOUND)
include_directories(${LZ4_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${LZ4_LIBRARIES})
IF (CZMQ_WITH_LZ4 AND lz4_FOUND)
include_directories(${lz4_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${lz4_LIBRARIES})
IF (PC_LZ4_FOUND)
set(pkg_config_names_private "${pkg_config_names_private} liblz4")
list(APPEND OPTIONAL_LIBRARIES_STATIC ${PC_LZ4_STATIC_LDFLAGS})
ELSE (PC_LZ4_FOUND)
set(pkg_config_libs_private "${pkg_config_libs_private} -llz4")
ENDIF (PC_LZ4_FOUND)
add_definitions(-DHAVE_LIBLZ4)
list(APPEND OPTIONAL_LIBRARIES ${LZ4_LIBRARIES})
ENDIF (CZMQ_WITH_LZ4 AND LZ4_FOUND)
list(APPEND OPTIONAL_LIBRARIES ${lz4_LIBRARIES})
ENDIF (CZMQ_WITH_LZ4 AND lz4_FOUND)

########################################################################
# LIBCURL dependency
########################################################################
find_package(libcurl)
option(CZMQ_WITH_LIBCURL "Build czmq with libcurl" ${LIBCURL_FOUND})
IF (CZMQ_WITH_LIBCURL AND LIBCURL_FOUND)
include_directories(${LIBCURL_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${LIBCURL_LIBRARIES})
IF (CZMQ_WITH_LIBCURL AND libcurl_FOUND)
include_directories(${libcurl_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${libcurl_LIBRARIES})
IF (PC_LIBCURL_FOUND)
set(pkg_config_names_private "${pkg_config_names_private} libcurl >= 7.28.0")
list(APPEND OPTIONAL_LIBRARIES_STATIC ${PC_LIBCURL_STATIC_LDFLAGS})
ELSE (PC_LIBCURL_FOUND)
set(pkg_config_libs_private "${pkg_config_libs_private} -lcurl")
ENDIF (PC_LIBCURL_FOUND)
add_definitions(-DHAVE_LIBCURL)
list(APPEND OPTIONAL_LIBRARIES ${LIBCURL_LIBRARIES})
ENDIF (CZMQ_WITH_LIBCURL AND LIBCURL_FOUND)
list(APPEND OPTIONAL_LIBRARIES ${libcurl_LIBRARIES})
ENDIF (CZMQ_WITH_LIBCURL AND libcurl_FOUND)

########################################################################
# NSS dependency
########################################################################
find_package(nss)
option(CZMQ_WITH_NSS "Build czmq with nss" ${NSS_FOUND})
IF (CZMQ_WITH_NSS AND NSS_FOUND)
include_directories(${NSS_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${NSS_LIBRARIES})
IF (CZMQ_WITH_NSS AND nss_FOUND)
include_directories(${nss_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${nss_LIBRARIES})
IF (PC_NSS_FOUND)
set(pkg_config_names_private "${pkg_config_names_private} nss")
list(APPEND OPTIONAL_LIBRARIES_STATIC ${PC_NSS_STATIC_LDFLAGS})
ELSE (PC_NSS_FOUND)
set(pkg_config_libs_private "${pkg_config_libs_private} -lnss")
ENDIF (PC_NSS_FOUND)
add_definitions(-DHAVE_NSS)
list(APPEND OPTIONAL_LIBRARIES ${NSS_LIBRARIES})
ENDIF (CZMQ_WITH_NSS AND NSS_FOUND)
list(APPEND OPTIONAL_LIBRARIES ${nss_LIBRARIES})
ENDIF (CZMQ_WITH_NSS AND nss_FOUND)

########################################################################
# LIBMICROHTTPD dependency
########################################################################
find_package(libmicrohttpd)
option(CZMQ_WITH_LIBMICROHTTPD "Build czmq with libmicrohttpd" ${LIBMICROHTTPD_FOUND})
IF (CZMQ_WITH_LIBMICROHTTPD AND LIBMICROHTTPD_FOUND)
include_directories(${LIBMICROHTTPD_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${LIBMICROHTTPD_LIBRARIES})
IF (CZMQ_WITH_LIBMICROHTTPD AND libmicrohttpd_FOUND)
include_directories(${libmicrohttpd_INCLUDE_DIRS})
list(APPEND MORE_LIBRARIES ${libmicrohttpd_LIBRARIES})
IF (PC_LIBMICROHTTPD_FOUND)
set(pkg_config_names_private "${pkg_config_names_private} libmicrohttpd")
list(APPEND OPTIONAL_LIBRARIES_STATIC ${PC_LIBMICROHTTPD_STATIC_LDFLAGS})
ELSE (PC_LIBMICROHTTPD_FOUND)
set(pkg_config_libs_private "${pkg_config_libs_private} -lmicrohttpd")
ENDIF (PC_LIBMICROHTTPD_FOUND)
add_definitions(-DHAVE_LIBMICROHTTPD)
list(APPEND OPTIONAL_LIBRARIES ${LIBMICROHTTPD_LIBRARIES})
ENDIF (CZMQ_WITH_LIBMICROHTTPD AND LIBMICROHTTPD_FOUND)
list(APPEND OPTIONAL_LIBRARIES ${libmicrohttpd_LIBRARIES})
ENDIF (CZMQ_WITH_LIBMICROHTTPD AND libmicrohttpd_FOUND)

########################################################################
# version
Expand Down
14 changes: 7 additions & 7 deletions Findlibcurl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
################################################################################

if (NOT MSVC)
include(FindPkgConfig)
find_package(PkgConfig)
pkg_check_modules(PC_LIBCURL "libcurl")
if (PC_LIBCURL_FOUND)
# add CFLAGS from pkg-config file, e.g. draft api.
Expand All @@ -18,26 +18,26 @@ if (NOT MSVC)
endif (NOT MSVC)

find_path (
LIBCURL_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
NAMES curl/curl.h
HINTS ${PC_LIBCURL_INCLUDE_HINTS}
)

find_library (
LIBCURL_LIBRARIES
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES
NAMES libcurl curl
HINTS ${PC_LIBCURL_LIBRARY_HINTS}
)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
LIBCURL
REQUIRED_VARS LIBCURL_LIBRARIES LIBCURL_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}
REQUIRED_VARS ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)
mark_as_advanced(
LIBCURL_FOUND
LIBCURL_LIBRARIES LIBCURL_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_FOUND
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)

################################################################################
Expand Down
14 changes: 7 additions & 7 deletions Findlibmicrohttpd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
################################################################################

if (NOT MSVC)
include(FindPkgConfig)
find_package(PkgConfig)
pkg_check_modules(PC_LIBMICROHTTPD "libmicrohttpd")
if (PC_LIBMICROHTTPD_FOUND)
# add CFLAGS from pkg-config file, e.g. draft api.
Expand All @@ -18,26 +18,26 @@ if (NOT MSVC)
endif (NOT MSVC)

find_path (
LIBMICROHTTPD_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
NAMES microhttpd.h
HINTS ${PC_LIBMICROHTTPD_INCLUDE_HINTS}
)

find_library (
LIBMICROHTTPD_LIBRARIES
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES
NAMES libmicrohttpd microhttpd
HINTS ${PC_LIBMICROHTTPD_LIBRARY_HINTS}
)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
LIBMICROHTTPD
REQUIRED_VARS LIBMICROHTTPD_LIBRARIES LIBMICROHTTPD_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}
REQUIRED_VARS ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)
mark_as_advanced(
LIBMICROHTTPD_FOUND
LIBMICROHTTPD_LIBRARIES LIBMICROHTTPD_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_FOUND
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)

################################################################################
Expand Down
24 changes: 12 additions & 12 deletions Findlibzmq.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
################################################################################

if (NOT MSVC)
include(FindPkgConfig)
find_package(PkgConfig)
pkg_check_modules(PC_LIBZMQ "libzmq")
if (PC_LIBZMQ_FOUND)
# add CFLAGS from pkg-config file, e.g. draft api.
Expand All @@ -18,7 +18,7 @@ if (NOT MSVC)
endif (NOT MSVC)

find_path (
LIBZMQ_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
NAMES zmq.h
HINTS ${PC_LIBZMQ_INCLUDE_HINTS}
)
Expand All @@ -34,7 +34,7 @@ if (MSVC)
endif ()

# Retrieve ZeroMQ version number from zmq.h
file(STRINGS "${LIBZMQ_INCLUDE_DIRS}/zmq.h" zmq_version_defines
file(STRINGS "${${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS}/zmq.h" zmq_version_defines
REGEX "#define ZMQ_VERSION_(MAJOR|MINOR|PATCH)")
foreach(ver ${zmq_version_defines})
if(ver MATCHES "#define ZMQ_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$")
Expand All @@ -58,21 +58,21 @@ if (MSVC)
"libzmq-mt-s-${_zmq_version}" # Release|RelWithDebInfo|MinSizeRel, BUILD_STATIC
)

find_library (LIBZMQ_LIBRARY_DEBUG
find_library (${CMAKE_FIND_PACKAGE_NAME}_LIBRARY_DEBUG
NAMES ${_zmq_debug_names}
)

find_library (LIBZMQ_LIBRARY_RELEASE
find_library (${CMAKE_FIND_PACKAGE_NAME}_LIBRARY_RELEASE
NAMES ${_zmq_release_names}
)

include(SelectLibraryConfigurations)
select_library_configurations(LIBZMQ)
select_library_configurations(${CMAKE_FIND_PACKAGE_NAME})
endif ()

if (NOT LIBZMQ_LIBRARIES)
if (NOT ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES)
find_library (
LIBZMQ_LIBRARIES
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES
NAMES libzmq zmq
HINTS ${PC_LIBZMQ_LIBRARY_HINTS}
)
Expand All @@ -81,12 +81,12 @@ endif ()
include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
LIBZMQ
REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}
REQUIRED_VARS ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)
mark_as_advanced(
LIBZMQ_FOUND
LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_FOUND
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)

################################################################################
Expand Down
14 changes: 7 additions & 7 deletions Findlz4.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
################################################################################

if (NOT MSVC)
include(FindPkgConfig)
find_package(PkgConfig)
pkg_check_modules(PC_LZ4 "liblz4")
if (PC_LZ4_FOUND)
# add CFLAGS from pkg-config file, e.g. draft api.
Expand All @@ -18,26 +18,26 @@ if (NOT MSVC)
endif (NOT MSVC)

find_path (
LZ4_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
NAMES lz4.h
HINTS ${PC_LZ4_INCLUDE_HINTS}
)

find_library (
LZ4_LIBRARIES
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES
NAMES liblz4 lz4
HINTS ${PC_LZ4_LIBRARY_HINTS}
)

include(FindPackageHandleStandardArgs)

find_package_handle_standard_args(
LZ4
REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}
REQUIRED_VARS ${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)
mark_as_advanced(
LZ4_FOUND
LZ4_LIBRARIES LZ4_INCLUDE_DIRS
${CMAKE_FIND_PACKAGE_NAME}_FOUND
${CMAKE_FIND_PACKAGE_NAME}_LIBRARIES ${CMAKE_FIND_PACKAGE_NAME}_INCLUDE_DIRS
)

################################################################################
Expand Down
Loading

0 comments on commit 71d5078

Please sign in to comment.