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.

This commit is contained in:
Ward Fisher 2014-12-02 13:58:23 -07:00
parent c437746a01
commit d3e1f2a82a
3 changed files with 26 additions and 2 deletions

19
CMakeInstallation.cmake Normal file
View File

@ -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)

View File

@ -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)

View File

@ -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})