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
4518e0cc
Unverified
Commit
4518e0cc
authored
Jan 15, 2018
by
Luca Boccassi
Committed by
GitHub
Jan 15, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2889 from SalvoVirga/fix/libzmq-static-cmake
Correct linking for libzmq-static
parents
2540e1a6
9d6a5f3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
14 deletions
+38
-14
CMakeLists.txt
CMakeLists.txt
+38
-14
No files found.
CMakeLists.txt
View file @
4518e0cc
...
...
@@ -43,11 +43,6 @@ elseif (WITH_LIBSODIUM)
if
(
SODIUM_FOUND
)
message
(
STATUS
"Using libsodium for CURVE security"
)
include_directories
(
${
SODIUM_INCLUDE_DIRS
}
)
# On Solaris, libsodium depends on libssp
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"SunOS"
)
target_link_libraries
(
libzmq ssp
)
endif
()
set
(
ZMQ_USE_LIBSODIUM 1
)
set
(
ZMQ_HAVE_CURVE 1
)
set
(
pkg_config_libs_private
"
${
pkg_config_libs_private
}
-lsodium"
)
...
...
@@ -764,7 +759,6 @@ if (MSVC)
set
(
CMAKE_STATIC_LINKER_FLAGS /ignore:4221
)
if
(
BUILD_SHARED
)
add_library
(
libzmq SHARED
${
sources
}
${
public_headers
}
${
html-docs
}
${
readme-docs
}
${
CMAKE_CURRENT_BINARY_DIR
}
/NSIS.template.in
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc
)
target_link_libraries
(
libzmq
${
OPTIONAL_LIBRARIES
}
)
set_target_properties
(
libzmq PROPERTIES
PUBLIC_HEADER
"
${
public_headers
}
"
RELEASE_POSTFIX
"
${
MSVC_TOOLSET
}
-mt-
${
ZMQ_VERSION_MAJOR
}
_
${
ZMQ_VERSION_MINOR
}
_
${
ZMQ_VERSION_PATCH
}
"
...
...
@@ -798,7 +792,6 @@ else ()
if
(
BUILD_SHARED
)
add_library
(
libzmq SHARED $<TARGET_OBJECTS:objects>
${
public_headers
}
${
html-docs
}
${
readme-docs
}
${
zmq-pkgconfig
}
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc
)
target_link_libraries
(
libzmq
${
OPTIONAL_LIBRARIES
}
)
# NOTE: the SOVERSION and VERSION MUST be the same as the one generated by libtool! It is NOT the same as the version of the package.
set_target_properties
(
libzmq PROPERTIES
COMPILE_DEFINITIONS
"DLL_EXPORT"
...
...
@@ -849,11 +842,16 @@ foreach (target ${target_outputs})
endforeach
()
if
(
BUILD_SHARED
)
target_link_libraries
(
libzmq
${
CMAKE_THREAD_LIBS_INIT
}
)
target_link_libraries
(
libzmq
${
OPTIONAL_LIBRARIES
}
${
CMAKE_THREAD_LIBS_INIT
}
)
if
(
SODIUM_FOUND
)
target_link_libraries
(
libzmq
${
SODIUM_LIBRARIES
}
)
# On Solaris, libsodium depends on libssp
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"SunOS"
)
target_link_libraries
(
libzmq ssp
)
endif
()
endif
()
if
(
HAVE_WS2_32
)
target_link_libraries
(
libzmq ws2_32
)
elseif
(
HAVE_WS2
)
...
...
@@ -873,6 +871,36 @@ if (BUILD_SHARED)
endif
()
endif
()
if
(
BUILD_STATIC
)
target_link_libraries
(
libzmq-static
${
OPTIONAL_LIBRARIES
}
${
CMAKE_THREAD_LIBS_INIT
}
)
if
(
SODIUM_FOUND
)
target_link_libraries
(
libzmq-static
${
SODIUM_LIBRARIES
}
)
# On Solaris, libsodium depends on libssp
if
(
${
CMAKE_SYSTEM_NAME
}
MATCHES
"SunOS"
)
target_link_libraries
(
libzmq-static ssp
)
endif
()
endif
()
if
(
HAVE_WS2_32
)
target_link_libraries
(
libzmq-static ws2_32
)
elseif
(
HAVE_WS2
)
target_link_libraries
(
libzmq-static ws2
)
endif
()
if
(
HAVE_RPCRT4
)
target_link_libraries
(
libzmq-static rpcrt4
)
endif
()
if
(
HAVE_IPHLAPI
)
target_link_libraries
(
libzmq-static iphlpapi
)
endif
()
if
(
RT_LIBRARY
)
target_link_libraries
(
libzmq-static -lrt
)
endif
()
endif
()
if
(
BUILD_SHARED
)
set
(
perf-tools local_lat
remote_lat
...
...
@@ -890,11 +918,7 @@ if (BUILD_SHARED)
if
(
WITH_PERF_TOOL
)
foreach
(
perf-tool
${
perf-tools
}
)
add_executable
(
${
perf-tool
}
perf/
${
perf-tool
}
.cpp
)
target_link_libraries
(
${
perf-tool
}
libzmq
${
OPTIONAL_LIBRARIES
}
)
if
(
RT_LIBRARY
)
target_link_libraries
(
${
perf-tool
}
-lrt
)
endif
()
target_link_libraries
(
${
perf-tool
}
libzmq
)
if
(
ZMQ_BUILD_FRAMEWORK
)
# Copy perf-tools binaries into Framework
...
...
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