summaryrefslogtreecommitdiffstats
path: root/Modules/InstallRequiredSystemLibraries.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-01 18:15:44 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-01 18:15:44 (GMT)
commit4077d6d80cb446f5c4e3c8739ae05375c6e62540 (patch)
tree522884603c3414e87154929ffee3c23eb870dcee /Modules/InstallRequiredSystemLibraries.cmake
parentff50bb9f77199a14735a6a4778f667ecf153c7af (diff)
downloadCMake-4077d6d80cb446f5c4e3c8739ae05375c6e62540.zip
CMake-4077d6d80cb446f5c4e3c8739ae05375c6e62540.tar.gz
CMake-4077d6d80cb446f5c4e3c8739ae05375c6e62540.tar.bz2
ENH: Install system libraries only if project requires them
Diffstat (limited to 'Modules/InstallRequiredSystemLibraries.cmake')
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake29
1 files changed, 29 insertions, 0 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
new file mode 100644
index 0000000..071bb2b
--- /dev/null
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -0,0 +1,29 @@
+# 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(MSVC)
+ 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(MSVC)
+
+# 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)
+
+