From d3e1f2a82a60b604c319af896d8ab2bbb72fcf8d Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 2 Dec 2014 13:58:23 -0700 Subject: [PATCH] Modified Settings used to generate Binary installer for Windows, so that the user is given the option of adding the binaries to the system path. --- CMakeInstallation.cmake | 19 +++++++++++++++++++ CMakeLists.txt | 5 ++++- liblib/CMakeLists.txt | 4 +++- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 CMakeInstallation.cmake diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake new file mode 100644 index 000000000..9d1d5d639 --- /dev/null +++ b/CMakeInstallation.cmake @@ -0,0 +1,19 @@ +##### +# Contains variables and settings used +# by the CMake build system in order to +# build binary installers. +##### + + +### +# Set options specific to the +# Nullsoft Installation System (NSIS) +### + +IF(WIN32) + SET(CPACK_NSIS_MODIFY_PATH ON) + SET(CPACK_NSIS_HELP_LINK "http://www.unidata.ucar.edu/netcdf") + SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) +ENDIF() + +INCLUDE(CPACK) \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index e619080de..1440a2c7d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1251,6 +1251,7 @@ ENDIF() # Build doxygen documentation, if need be. ##### ADD_SUBDIRECTORY(docs) + ##### # Moving on to CPack, install packages. ##### @@ -1378,6 +1379,7 @@ SET(CPACK_SOURCE_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}" "/unknown/" ".*~" ) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT ${CMAKE_CURRENT_BINARY_DIR}/COPYRIGHT.txt @ONLY @@ -1549,4 +1551,5 @@ install( # CPack inclusion must come last. -INCLUDE(CPack) +# INCLUDE(CPack) +INCLUDE(CMakeInstallation.cmake) diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt index 14710dca3..3c34f598e 100644 --- a/liblib/CMakeLists.txt +++ b/liblib/CMakeLists.txt @@ -78,7 +78,9 @@ IF(ENABLE_PNETCDF AND PNETCDF) SET(TLL_LIBS ${TLL_LIBS} ${PNETCDF}) ENDIF() -LIST(REMOVE_DUPLICATES TLL_LIBS) +IF(TLL_LIBS) + LIST(REMOVE_DUPLICATES TLL_LIBS) +ENDIF() TARGET_LINK_LIBRARIES(netcdf ${TLL_LIBS})