forked from zeromq/libzmq
-
Notifications
You must be signed in to change notification settings - Fork 1
/
UseZMQ.cmake.in
25 lines (20 loc) · 1.07 KB
/
UseZMQ.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
# This file sets up include directories, link directories, and
# compiler settings for a project to use ZMQ. It should not be
# included directly, but rather through the ZMQ_USE_FILE setting
# obtained from ZMQConfig.cmake.
#
IF(ZMQ_BUILD_SETTINGS_FILE AND NOT SKIP_ZMQ_BUILD_SETTINGS_FILE)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeImportBuildSettings.cmake)
CMAKE_IMPORT_BUILD_SETTINGS(${ZMQ_BUILD_SETTINGS_FILE})
ENDIF(ZMQ_BUILD_SETTINGS_FILE AND NOT SKIP_ZMQ_BUILD_SETTINGS_FILE)
# Add compiler flags needed to use ZMQ.
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZMQ_REQUIRED_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ZMQ_REQUIRED_CXX_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${ZMQ_REQUIRED_LINK_FLAGS}")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${ZMQ_REQUIRED_LINK_FLAGS}")
SET(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ZMQ_REQUIRED_LINK_FLAGS}")
# Add include directories needed to use ZMQ.
INCLUDE_DIRECTORIES(BEFORE ${ZMQ_INCLUDE_DIRS})
# Add link directories needed to use ZMQ.
LINK_DIRECTORIES(${ZMQ_LIBRARY_DIRS})