Commit e6b7c7ac authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1118 from guidefloripa/master

Add static compilation on CMake
parents 13ed7114 9c42d28a
......@@ -613,6 +613,11 @@ else()
OUTPUT_NAME "zmq"
PUBLIC_HEADER "${public_headers}")
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()
target_link_libraries(libzmq ${SODIUM_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
......@@ -777,7 +782,7 @@ if(MSVC)
COMPONENT Runtime)
endif()
else()
install(TARGETS libzmq
install(TARGETS libzmq libzmq-static
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment