aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-02-21 19:17:30 -0800
committerGarrett D'Amore <garrett@damore.org>2018-02-21 19:17:30 -0800
commit3a0ca04110778a56bcd523fbaba2439a61738e03 (patch)
treead55a99a5ef948e335f4a631949876b5d92cd09a /CMakeLists.txt
parenta4d378030df61760ea4daa2ddbe46b1366f8e977 (diff)
downloadnng-3a0ca04110778a56bcd523fbaba2439a61738e03.tar.gz
nng-3a0ca04110778a56bcd523fbaba2439a61738e03.tar.bz2
nng-3a0ca04110778a56bcd523fbaba2439a61738e03.zip
CMake & CPack improvements.
These are incremental updates... we avoid using install() in the subdirectories, so that we can adapt properly to them in the single parent directory. We have started some of the work to improve support for CPack. This is still not yet done, but work in progress.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 12 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3a6ea442..ece149a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,4 @@
#
-# Copyright 2017 Garrett D'Amore <garrett@damore.org>
# Copyright (c) 2012 Martin Sustrik All rights reserved.
# Copyright (c) 2013 GoPivotal, Inc. All rights reserved.
# Copyright (c) 2015-2016 Jack R. Dunaway. All rights reserved.
@@ -90,7 +89,6 @@ endif()
# User-defined options.
-#option (NNG_STATIC_LIB "Build static library instead of shared library." OFF)
option (NNG_ENABLE_DOC "Enable building documentation." ON)
option (NNG_TESTS "Build and run tests" ON)
option (NNG_TOOLS "Build extra tools" OFF)
@@ -323,10 +321,6 @@ else ()
add_definitions (-DPLATFORM_POSIX)
endif ()
-if (NNG_STATIC_LIB)
- add_definitions (-DNNG_DECL=extern)
-endif ()
-
macro (nng_check_func SYM DEF)
check_function_exists (${SYM} ${DEF})
if (${DEF})
@@ -508,9 +502,9 @@ if (NNG_ENABLE_DOC)
endif ()
-install (TARGETS LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-install (TARGETS ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
-install (FILES src/nng.h DESTINATION include/nng)
+#install (TARGETS LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+#install (TARGETS ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+#install (FILES src/nng.h DESTINATION include/nng)
if (NNG_ENABLE_NNGCAT)
install (TARGETS nngcat RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
@@ -518,8 +512,16 @@ endif()
set (CPACK_PACKAGE_NAME ${PROJECT_NAME})
set (CPACK_PACKAGE_VERSION ${NNG_PACKAGE_VERSION})
+set (CPACK_PACKAGE_CONTACT "nanomsg@freelists.org")
+set (CPACK_PACKAGE_VENDOR "nanomsg.org")
+set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "nanomsg next generation library")
set (CPACK_SOURCE_GENERATOR "TBZ2;TGZ;ZIP")
set (CPACK_SOURCE_IGNORE_FILES "/build/;/.git/;~$;${CPACK_SOURCE_IGNORE_FILES}")
-set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${NNG_PACKAGE_VERSION}")
+set (CPACK_SOURCE_PACKAGE_FILE_NAME
+ "${PROJECT_NAME}-${NNG_PACKAGE_VERSION}-src")
+set (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt)
+set (CPACK_PACKAGE_INSTALL_DIRECTORY "nng")
+set (CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${NNG_PACKAGE_VERSION}")
+
add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
include (CPack)