summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeCPack.cmake8
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake17
2 files changed, 21 insertions, 4 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 692befa..aa993cf 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -13,9 +13,15 @@
# If the cmake version includes cpack, use it
IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
IF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
- OPTION(CMAKE_INSTALL_DEBUG_LIBRARIES
+ OPTION(CMAKE_INSTALL_DEBUG_LIBRARIES
"Install Microsoft runtime debug libraries with CMake." FALSE)
MARK_AS_ADVANCED(CMAKE_INSTALL_DEBUG_LIBRARIES)
+
+ # By default, do not warn when built on machines using only VS Express:
+ IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
+ ENDIF()
+
INCLUDE(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake)
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
# Set the options file that needs to be included inside CMakeCPackOptions.cmake
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 63b3d5e..2dfe8b1 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -16,6 +16,12 @@
# libraries are installed as well as the CRT run time libraries.
# If CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION is set then the libraries are
# installed to that directory rather than the default.
+# If CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS is NOT set, then this file
+# warns about required files that do not exist. You can set this variable to
+# ON before including this file to avoid the warning. For example, the Visual
+# Studio Express editions do not include the redistributable files, so if you
+# include this file on a machine with only VS Express installed, you'll get
+# the warning.
#=============================================================================
# Copyright 2006-2009 Kitware, Inc.
@@ -304,9 +310,14 @@ IF(MSVC)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
ELSE(EXISTS ${lib})
- MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
- # This warning indicates an incomplete Visual Studio installation
- # or a bug somewhere above here in this file
+ IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
+ MESSAGE(WARNING "system runtime library file does not exist: '${lib}'")
+ # This warning indicates an incomplete Visual Studio installation
+ # or a bug somewhere above here in this file.
+ # If you would like to avoid this warning, fix the real problem, or
+ # set CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS before including
+ # this file.
+ ENDIF()
ENDIF(EXISTS ${lib})
ENDFOREACH(lib)
ENDIF(MSVC)