summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-01-11 16:08:15 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-01-11 16:08:15 (GMT)
commit2a6bc875670915c3d40c724096c01f57f290aa40 (patch)
tree34a50384e916e1dc7d37462f3b3afbb69fe4396a /Modules
parentc4a5b90070da44170f8961d4a98b27efbcc0bda8 (diff)
downloadCMake-2a6bc875670915c3d40c724096c01f57f290aa40.zip
CMake-2a6bc875670915c3d40c724096c01f57f290aa40.tar.gz
CMake-2a6bc875670915c3d40c724096c01f57f290aa40.tar.bz2
ENH: Some improvements: specify link, copy msvc libraries, fix install directory
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPack.cmake28
-rw-r--r--Modules/NSIS.template.in4
2 files changed, 30 insertions, 2 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 47dcbe4..819f0c1 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -47,4 +47,32 @@ ENDIF(NOT CPACK_GENERATOR)
SET(CPACK_SOURCE_DIR "${CMAKE_SOURCE_DIR}")
SET(CPACK_BINARY_DIR "${CMAKE_BINARY_DIR}")
+# Hack for Visual Studio support
+# Search for system runtime libraries based on the platform. This is
+# not complete because it is used only for the release process by the
+# developers.
+IF(WIN32 AND NOT CYGWIN)
+ STRING(REGEX REPLACE "\\\\" "/" SYSTEMROOT "$ENV{SYSTEMROOT}")
+ FOREACH(lib
+ "${SYSTEMROOT}/system32/mfc71.dll"
+ "${SYSTEMROOT}/system32/msvcp71.dll"
+ "${SYSTEMROOT}/system32/msvcr71.dll"
+ )
+ IF(EXISTS ${lib})
+ SET(CMake_INSTALL_SYSTEM_RUNTIME_LIBS
+ ${CMake_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
+ ENDIF(EXISTS ${lib})
+ ENDFOREACH(lib)
+ENDIF(WIN32 AND NOT CYGWIN)
+
+# Include system runtime libraries in the installation if any are
+# specified by CMake_INSTALL_SYSTEM_RUNTIME_LIBS.
+IF(CMake_INSTALL_SYSTEM_RUNTIME_LIBS)
+ IF(WIN32)
+ INSTALL_PROGRAMS(/bin ${CMake_INSTALL_SYSTEM_RUNTIME_LIBS})
+ ELSE(WIN32)
+ INSTALL_PROGRAMS(/lib ${CMake_INSTALL_SYSTEM_RUNTIME_LIBS})
+ ENDIF(WIN32)
+ENDIF(CMake_INSTALL_SYSTEM_RUNTIME_LIBS)
+
CONFIGURE_FILE("${cpack_input_file}" "${CMAKE_BINARY_DIR}/CPackConfig.cmake" @ONLY IMMEDIATE)
diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in
index f895a30..5f56cda 100644
--- a/Modules/NSIS.template.in
+++ b/Modules/NSIS.template.in
@@ -358,7 +358,7 @@ Section "Dummy Section" SecDummy
;Create shortcuts
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
- CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\cmake.lnk" "$INSTDIR\bin\CMakeSetup.exe"
+ CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\@CPACK_PACKAGE_EXECUTABLE_LABEL@.lnk" "$INSTDIR\bin\@CPACK_PACKAGE_EXECUTABLE@.exe"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
@@ -414,7 +414,7 @@ Section "Uninstall"
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
- Delete "$SMPROGRAMS\$MUI_TEMP\cmake.lnk"
+ Delete "$SMPROGRAMS\$MUI_TEMP\@CPACK_PACKAGE_EXECUTABLE_LABEL@.lnk"
;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"