Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
7c709e54
Commit
7c709e54
authored
Jan 06, 2017
by
Johan Mabille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake install config file
parent
e95d2319
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
12 deletions
+50
-12
CMakeLists.txt
CMakeLists.txt
+35
-12
ZeroMQConfig.cmake.in
ZeroMQConfig.cmake.in
+15
-0
No files found.
CMakeLists.txt
View file @
7c709e54
...
...
@@ -844,17 +844,19 @@ endif ()
#-----------------------------------------------------------------------------
# installer
include
(
GNUInstallDirs
)
if
(
MSVC
)
install
(
TARGETS libzmq libzmq-static
ARCHIVE DESTINATION
lib
LIBRARY DESTINATION
lib
PUBLIC_HEADER DESTINATION
include
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
COMPONENT SDK
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
TARGETS libzmq libzmq-static
RUNTIME DESTINATION
bin
ARCHIVE DESTINATION
lib
PUBLIC_HEADER DESTINATION
include
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
COMPONENT SDK
)
if
(
NOT CMAKE_PDB_OUTPUT_DIRECTORY
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/bin/libzmq
${
MSVC_TOOLSET
}
-mt-gd-
${
ZMQ_VERSION_MAJOR
}
_
${
ZMQ_VERSION_MINOR
}
_
${
ZMQ_VERSION_PATCH
}
.pdb DESTINATION lib
...
...
@@ -862,17 +864,17 @@ if (MSVC)
endif
()
else
()
install
(
TARGETS libzmq
RUNTIME DESTINATION
bin
PUBLIC_HEADER DESTINATION
include
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
COMPONENT Runtime
)
endif
()
else
()
install
(
TARGETS libzmq libzmq-static
RUNTIME DESTINATION
bin
ARCHIVE DESTINATION
lib
LIBRARY DESTINATION
lib
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
ARCHIVE DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
FRAMEWORK DESTINATION
"Library/Frameworks"
PUBLIC_HEADER DESTINATION
include
)
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
)
endif
()
# install (FILES ${public_headers}
...
...
@@ -899,6 +901,27 @@ if (WITH_DOC)
endif
()
endif
()
include
(
CMakePackageConfigHelpers
)
string
(
TOUPPER
"
${
CMAKE_BUILD_TYPE
}
"
U_CMAKE_BUILD_TYPE
)
get_property
(
libzmq_pf TARGET libzmq PROPERTY
${
U_CMAKE_BUILD_TYPE
}
_POSTFIX
)
set
(
libzmq_file libzmq
${
libzmq_pf
}${
CMAKE_LINK_LIBRARY_SUFFIX
}
)
get_property
(
libzmq_static_pf TARGET libzmq-static PROPERTY
${
U_CMAKE_BUILD_TYPE
}
_POSTFIX
)
set
(
libzmq_static_file libzmq-static
${
libzmq_static_pf
}${
CMAKE_LINK_LIBRARY_SUFFIX
}
)
# GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".
set
(
ZEROMQ_CMAKECONFIG_INSTALL_DIR
"share/cmake/
${
PROJECT_NAME
}
"
CACHE STRING
"install path for ZeroMQConfig.cmake"
)
configure_package_config_file
(
${
PROJECT_NAME
}
Config.cmake.in
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_NAME
}
Config.cmake"
INSTALL_DESTINATION
${
ZEROMQ_CMAKECONFIG_INSTALL_DIR
}
)
write_basic_package_version_file
(
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_NAME
}
ConfigVersion.cmake
VERSION
${
ZMQ_VERSION_MAJOR
}
.
${
ZMQ_VERSION_MINOR
}
.
${
ZMQ_VERSION_PATCH
}
COMPATIBILITY AnyNewerVersion
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_NAME
}
Config.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PROJECT_NAME
}
ConfigVersion.cmake
DESTINATION
${
ZEROMQ_CMAKECONFIG_INSTALL_DIR
}
)
option
(
ENABLE_CPACK
"Enables cpack rules"
ON
)
if
(
MSVC AND ENABLE_CPACK
)
include
(
InstallRequiredSystemLibraries
)
...
...
ZeroMQConfig.cmake.in
0 → 100644
View file @
7c709e54
# ZeroMQ cmake module
# This module sets the following variables in your project::
#
# ZeroMQ_FOUND - true if ZeroMQ found on the system
# ZeroMQ_INCLUDE_DIR - the directory containing ZeroMQ headers
# ZeroMQ_LIBRARY -
# ZeroMQ_STATIC_LIBRARY
@PACKAGE_INIT@
set(PN ZeroMQ)
set_and_check(${PN}_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(${PN}_LIBRARY "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@/@libzmq_file@")
set_and_check(${PN}_STATIC_LIBRARY "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@/@libzmq_static_file@")
check_required_components(${PN})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment