mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-07 09:48:07 +01:00
Merge pull request #1118 from guidefloripa/master
Add static compilation on CMake
This commit is contained in:
commit
e6b7c7acd6
@ -613,6 +613,11 @@ else()
|
|||||||
OUTPUT_NAME "zmq"
|
OUTPUT_NAME "zmq"
|
||||||
PUBLIC_HEADER "${public_headers}")
|
PUBLIC_HEADER "${public_headers}")
|
||||||
endif()
|
endif()
|
||||||
|
add_library(libzmq-static STATIC ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig})
|
||||||
|
set_target_properties(libzmq-static PROPERTIES
|
||||||
|
PUBLIC_HEADER "${public_headers}"
|
||||||
|
COMPILE_FLAGS "-DZMQ_STATIC"
|
||||||
|
OUTPUT_NAME "zmq-static")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(libzmq ${SODIUM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(libzmq ${SODIUM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
@ -777,7 +782,7 @@ if(MSVC)
|
|||||||
COMPONENT Runtime)
|
COMPONENT Runtime)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
install(TARGETS libzmq
|
install(TARGETS libzmq libzmq-static
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
ARCHIVE DESTINATION lib
|
ARCHIVE DESTINATION lib
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
|
Loading…
Reference in New Issue
Block a user