From ae86c56d74a4cc549629829714ff189369027a29 Mon Sep 17 00:00:00 2001 From: Steven McCoy Date: Sun, 14 Jul 2013 13:26:55 -0400 Subject: [PATCH 1/3] README file moved to GitHub format and extension, drop from packaging and default to NEWS file for popup. --- CMakeLists.txt | 7 +++---- cmake/NSIS.template32.in | 2 +- cmake/NSIS.template64.in | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04ecac75..5d406bd4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -393,8 +393,7 @@ set(readme-docs AUTHORS COPYING COPYING.LESSER MAINTAINERS - NEWS - README) + NEWS) #----------------------------------------------------------------------------- # optional modules @@ -669,8 +668,8 @@ if(MSVC) set(CPACK_PACKAGE_VENDOR "Miru") set(CPACK_NSIS_CONTACT "Steven McCoy ") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}\\\\COPYING.txt") - set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}\\\\README.txt") - set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}\\\\README.txt") +# set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_BINARY_DIR}\\\\README.txt") +# set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}\\\\WELCOME.txt") # There is a bug in NSI that does not handle full unix paths properly. Make # sure there is at least one set of four(4) backslashes. set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\installer.ico") diff --git a/cmake/NSIS.template32.in b/cmake/NSIS.template32.in index 231a3fd3..bc6ab8d5 100644 --- a/cmake/NSIS.template32.in +++ b/cmake/NSIS.template32.in @@ -556,7 +556,7 @@ FunctionEnd !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER - !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" + !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt" @CPACK_NSIS_PAGE_COMPONENTS@ diff --git a/cmake/NSIS.template64.in b/cmake/NSIS.template64.in index e744eeca..2deaa4ec 100644 --- a/cmake/NSIS.template64.in +++ b/cmake/NSIS.template64.in @@ -556,7 +556,7 @@ FunctionEnd !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER - !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" + !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\NEWS.txt" @CPACK_NSIS_PAGE_COMPONENTS@ From 21fe600848a01f4014aa97b04cc301669502db69 Mon Sep 17 00:00:00 2001 From: Steven McCoy Date: Sun, 14 Jul 2013 13:36:30 -0400 Subject: [PATCH 2/3] Move CMake dependencies together. --- CMakeLists.txt | 6 +++--- {cmake => builds/cmake}/Modules/FindAsciiDoc.cmake | 0 {cmake => builds/cmake}/Modules/TestZMQVersion.cmake | 0 {cmake => builds/cmake}/Modules/ZMQSourceRunChecks.cmake | 0 {cmake => builds/cmake}/NSIS.template32.in | 0 {cmake => builds/cmake}/NSIS.template64.in | 0 6 files changed, 3 insertions(+), 3 deletions(-) rename {cmake => builds/cmake}/Modules/FindAsciiDoc.cmake (100%) rename {cmake => builds/cmake}/Modules/TestZMQVersion.cmake (100%) rename {cmake => builds/cmake}/Modules/ZMQSourceRunChecks.cmake (100%) rename {cmake => builds/cmake}/NSIS.template32.in (100%) rename {cmake => builds/cmake}/NSIS.template64.in (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d406bd4..2f2de2dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ if(NOT ${POLLER} STREQUAL "") set(ZMQ_FORCE_${UPPER_POLLER} 1) endif() -set(ZMQ_CMAKE_MODULES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules) +set(ZMQ_CMAKE_MODULES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/Modules) list(APPEND CMAKE_MODULE_PATH ${ZMQ_CMAKE_MODULES_DIR}) include(TestZMQVersion) @@ -435,9 +435,9 @@ endif() if(MSVC) if(CMAKE_CL_64) - set(nsis-template ${CMAKE_CURRENT_SOURCE_DIR}/cmake/NSIS.template64.in) + set(nsis-template ${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/NSIS.template64.in) else() - set(nsis-template ${CMAKE_CURRENT_SOURCE_DIR}/cmake/NSIS.template32.in) + set(nsis-template ${CMAKE_CURRENT_SOURCE_DIR}/builds/cmake/NSIS.template32.in) endif() add_custom_command( diff --git a/cmake/Modules/FindAsciiDoc.cmake b/builds/cmake/Modules/FindAsciiDoc.cmake similarity index 100% rename from cmake/Modules/FindAsciiDoc.cmake rename to builds/cmake/Modules/FindAsciiDoc.cmake diff --git a/cmake/Modules/TestZMQVersion.cmake b/builds/cmake/Modules/TestZMQVersion.cmake similarity index 100% rename from cmake/Modules/TestZMQVersion.cmake rename to builds/cmake/Modules/TestZMQVersion.cmake diff --git a/cmake/Modules/ZMQSourceRunChecks.cmake b/builds/cmake/Modules/ZMQSourceRunChecks.cmake similarity index 100% rename from cmake/Modules/ZMQSourceRunChecks.cmake rename to builds/cmake/Modules/ZMQSourceRunChecks.cmake diff --git a/cmake/NSIS.template32.in b/builds/cmake/NSIS.template32.in similarity index 100% rename from cmake/NSIS.template32.in rename to builds/cmake/NSIS.template32.in diff --git a/cmake/NSIS.template64.in b/builds/cmake/NSIS.template64.in similarity index 100% rename from cmake/NSIS.template64.in rename to builds/cmake/NSIS.template64.in From 409721b9d2657b937d1de6c7eca7111d16c4a125 Mon Sep 17 00:00:00 2001 From: Steven McCoy Date: Sun, 14 Jul 2013 13:58:46 -0400 Subject: [PATCH 3/3] Add CMake support for static libraries. --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f2de2dd..8ce46024 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -496,6 +496,13 @@ if(MSVC) PUBLIC_HEADER "${public_headers}" RELEASE_POSTFIX "${_zmq_COMPILER}-mt-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" DEBUG_POSTFIX "${_zmq_COMPILER}-mt-gd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}") + add_library(libzmq-static STATIC ${sources}) + set_target_properties(libzmq-static PROPERTIES + PUBLIC_HEADER "${public_headers}" + RELEASE_POSTFIX "${_zmq_COMPILER}-mt-s-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" + DEBUG_POSTFIX "${_zmq_COMPILER}-mt-sgd-${ZMQ_VERSION_MAJOR}_${ZMQ_VERSION_MINOR}_${ZMQ_VERSION_PATCH}" + COMPILE_FLAGS "/D ZMQ_STATIC" + OUTPUT_NAME "libzmq") else() add_library(libzmq SHARED ${sources} ${public_headers} ${html-docs} ${readme-docs} ${zmq-pkgconfig}) if(ZMQ_BUILD_FRAMEWORK) @@ -574,13 +581,13 @@ endif() # installer if(MSVC) - install(TARGETS libzmq + install(TARGETS libzmq libzmq-static ARCHIVE DESTINATION lib LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include COMPONENT SDK) if(CMAKE_BUILD_TYPE STREQUAL "Debug") - install(TARGETS libzmq + install(TARGETS libzmq libzmq-static RUNTIME DESTINATION bin PUBLIC_HEADER DESTINATION include COMPONENT SDK)