summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompilerId.c.in3
-rw-r--r--Modules/CMakeCXXCompilerId.cpp.in3
-rw-r--r--Modules/CheckCSourceCompiles.cmake4
-rw-r--r--Modules/CheckCXXSourceCompiles.cmake4
-rw-r--r--Modules/CheckFunctionExists.cmake14
-rw-r--r--Modules/CheckSymbolExists.cmake19
-rw-r--r--Modules/Compiler/SCO-C.cmake2
-rw-r--r--Modules/Compiler/SCO-CXX.cmake2
-rw-r--r--Modules/Compiler/SCO.cmake25
-rw-r--r--Modules/FindGLUT.cmake2
-rw-r--r--Modules/FindPythonLibs.cmake1
-rw-r--r--Modules/FindQt4.cmake5
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake58
-rw-r--r--Modules/Platform/SCO_SV.cmake3
14 files changed, 101 insertions, 44 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index c7778fb..c91553a 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -48,6 +48,9 @@
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI_DSP"
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 2ff227a..4c8f497 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -50,6 +50,9 @@
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI_DSP"
+#elif defined(__SCO_VERSION__)
+# define COMPILER_ID "SCO"
+
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake
index e8bfc0c..d59fe55 100644
--- a/Modules/CheckCSourceCompiles.cmake
+++ b/Modules/CheckCSourceCompiles.cmake
@@ -1,6 +1,6 @@
-# - Check if the given C source code compiles.
+# - Check if given C source compiles and links into an executable
# CHECK_C_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-# <code> - source code to try to compile
+# <code> - source code to try to compile, must define 'main'
# <var> - variable to store whether the source code compiled
# <fail-regex> - fail if test output matches this regex
# The following variables may be set before calling this macro to
diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake
index 4502c6b..0491b37 100644
--- a/Modules/CheckCXXSourceCompiles.cmake
+++ b/Modules/CheckCXXSourceCompiles.cmake
@@ -1,6 +1,6 @@
-# - Check if the given C++ source code compiles.
+# - Check if given C++ source compiles and links into an executable
# CHECK_CXX_SOURCE_COMPILES(<code> <var> [FAIL_REGEX <fail-regex>])
-# <code> - source code to try to compile
+# <code> - source code to try to compile, must define 'main'
# <var> - variable to store whether the source code compiled
# <fail-regex> - fail if test output matches this regex
# The following variables may be set before calling this macro to
diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake
index e1a1777..0ba36d9 100644
--- a/Modules/CheckFunctionExists.cmake
+++ b/Modules/CheckFunctionExists.cmake
@@ -1,8 +1,10 @@
-# - Check if the function exists.
-# CHECK_FUNCTION_EXISTS(FUNCTION VARIABLE)
-# - macro which checks if the function exists
-# FUNCTION - the name of the function
-# VARIABLE - variable to store the result
+# - Check if a C function can be linked
+# CHECK_FUNCTION_EXISTS(<function> <variable>)
+#
+# Check that the <function> is provided by libraries on the system and
+# store the result in a <variable>. This does not verify that any
+# system header file declares the function, only that it can be found
+# at link time (considure using CheckSymbolExists).
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
@@ -13,7 +15,7 @@
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
-# Copyright 2002-2009 Kitware, Inc.
+# Copyright 2002-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake
index 40910f2..e86604b 100644
--- a/Modules/CheckSymbolExists.cmake
+++ b/Modules/CheckSymbolExists.cmake
@@ -1,9 +1,16 @@
-# - Check if the symbol exists in include files
-# CHECK_SYMBOL_EXISTS(SYMBOL FILES VARIABLE)
+# - Check if a symbol exists as a function, variable, or macro
+# CHECK_SYMBOL_EXISTS(<symbol> <files> <variable>)
#
-# SYMBOL - symbol
-# FILES - include files to check
-# VARIABLE - variable to return result
+# Check that the <symbol> is available after including given header
+# <files> and store the result in a <variable>. Specify the list
+# of files in one argument as a semicolon-separated list.
+#
+# If the header files define the symbol as a macro it is considered
+# available and assumed to work. If the header files declare the
+# symbol as a function or variable then the symbol must also be
+# available for linking. If the symbol is a type or enum value
+# it will not be recognized (consider using CheckTypeSize or
+# CheckCSourceCompiles).
#
# The following variables may be set before calling this macro to
# modify the way the check is run:
@@ -14,7 +21,7 @@
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
-# Copyright 2003-2009 Kitware, Inc.
+# Copyright 2003-2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
diff --git a/Modules/Compiler/SCO-C.cmake b/Modules/Compiler/SCO-C.cmake
new file mode 100644
index 0000000..6e762cc
--- /dev/null
+++ b/Modules/Compiler/SCO-C.cmake
@@ -0,0 +1,2 @@
+include(Compiler/SCO)
+__compiler_sco(C)
diff --git a/Modules/Compiler/SCO-CXX.cmake b/Modules/Compiler/SCO-CXX.cmake
new file mode 100644
index 0000000..5b713a0
--- /dev/null
+++ b/Modules/Compiler/SCO-CXX.cmake
@@ -0,0 +1,2 @@
+include(Compiler/SCO)
+__compiler_sco(CXX)
diff --git a/Modules/Compiler/SCO.cmake b/Modules/Compiler/SCO.cmake
new file mode 100644
index 0000000..d3deeb1
--- /dev/null
+++ b/Modules/Compiler/SCO.cmake
@@ -0,0 +1,25 @@
+
+#=============================================================================
+# Copyright 2002-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# This module is shared by multiple languages; use include blocker.
+if(__COMPILER_SCO)
+ return()
+endif()
+set(__COMPILER_SCO 1)
+
+macro(__compiler_sco lang)
+ # Feature flags.
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-Kpic -belf")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-belf -Wl,-Bexport")
+endmacro()
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 45df79e..af88997 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -23,7 +23,7 @@
IF (WIN32)
FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include )
- FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32
+ FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 780ffc2..333e075 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -151,6 +151,7 @@ FUNCTION(PYTHON_WRITE_MODULES_HEADER _filename)
GET_FILENAME_COMPONENT(_name "${_filename}" NAME)
STRING(REPLACE "." "_" _name "${_name}")
STRING(TOUPPER ${_name} _nameUpper)
+ SET(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename})
SET(_filenameTmp "${_filename}.in")
FILE(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n")
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index d9d6ea7..79a3d51 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -447,7 +447,10 @@ MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename)
ENDMACRO (_QT4_ADJUST_LIB_VARS)
function(_QT4_QUERY_QMAKE VAR RESULT)
- exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output )
+ execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
+ RESULT_VARIABLE return_code
+ OUTPUT_VARIABLE output ERROR_VARIABLE output
+ OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
if(NOT return_code)
file(TO_CMAKE_PATH "${output}" output)
set(${RESULT} ${output} PARENT_SCOPE)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 4564e74..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.
@@ -33,6 +39,21 @@
IF(MSVC)
FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
+ IF(CMAKE_CL_64)
+ IF(MSVC_VERSION GREATER 1599)
+ # VS 10 and later:
+ SET(CMAKE_MSVC_ARCH x64)
+ ELSE()
+ # VS 9 and earlier:
+ SET(CMAKE_MSVC_ARCH amd64)
+ ENDIF()
+ ELSE(CMAKE_CL_64)
+ SET(CMAKE_MSVC_ARCH x86)
+ ENDIF(CMAKE_CL_64)
+
+ GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
+ GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
+
IF(MSVC70)
SET(__install__libs
"${SYSTEMROOT}/system32/msvcp70.dll"
@@ -47,15 +68,6 @@ IF(MSVC)
)
ENDIF(MSVC71)
- IF(CMAKE_CL_64)
- SET(CMAKE_MSVC_ARCH amd64)
- ELSE(CMAKE_CL_64)
- SET(CMAKE_MSVC_ARCH x86)
- ENDIF(CMAKE_CL_64)
-
- GET_FILENAME_COMPONENT(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH)
- GET_FILENAME_COMPONENT(base_dir "${devenv_dir}/../.." ABSOLUTE)
-
IF(MSVC80)
# Find the runtime library redistribution directory.
FIND_PATH(MSVC80_REDIST_DIR NAMES ${CMAKE_MSVC_ARCH}/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest
@@ -87,7 +99,6 @@ IF(MSVC)
"${MSVC80_CRT_DIR}/msvcr80d.dll"
)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
-
ENDIF(MSVC80)
IF(MSVC90)
@@ -130,15 +141,14 @@ IF(MSVC)
PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]/../../VC/redist"
"${base_dir}/VC/redist"
+ "$ENV{ProgramFiles}/Microsoft Visual Studio 10.0/VC/redist"
+ "$ENV{ProgramFiles(x86)}/Microsoft Visual Studio 10.0/VC/redist"
)
MARK_AS_ADVANCED(MSVC10_REDIST_DIR)
SET(MSVC10_CRT_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.CRT")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
SET(__install__libs
- "${MSVC10_CRT_DIR}/Microsoft.VC100.CRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100.dll"
"${MSVC10_CRT_DIR}/msvcr100.dll"
)
@@ -146,9 +156,8 @@ IF(MSVC)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_CRT_DIR
- "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC90.DebugCRT")
+ "${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugCRT")
SET(__install__libs ${__install__libs}
- "${MSVC10_CRT_DIR}/Microsoft.VC100.DebugCRT.manifest"
"${MSVC10_CRT_DIR}/msvcp100d.dll"
"${MSVC10_CRT_DIR}/msvcr100d.dll"
)
@@ -161,11 +170,13 @@ IF(MSVC)
"${SYSTEMROOT}/system32/mfc70.dll"
)
ENDIF(MSVC70)
+
IF(MSVC71)
SET(__install__libs ${__install__libs}
"${SYSTEMROOT}/system32/mfc71.dll"
)
ENDIF(MSVC71)
+
IF(MSVC80)
IF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC80_MFC_DIR
@@ -259,7 +270,6 @@ IF(MSVC)
SET(MSVC10_MFC_DIR
"${MSVC10_REDIST_DIR}/Debug_NonRedist/${CMAKE_MSVC_ARCH}/Microsoft.VC100.DebugMFC")
SET(__install__libs ${__install__libs}
- "${MSVC10_MFC_DIR}/Microsoft.VC100.DebugMFC.manifest"
"${MSVC10_MFC_DIR}/mfc100d.dll"
"${MSVC10_MFC_DIR}/mfc100ud.dll"
"${MSVC10_MFC_DIR}/mfcm100d.dll"
@@ -268,11 +278,8 @@ IF(MSVC)
ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES)
SET(MSVC10_MFC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFC")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
IF(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY)
SET(__install__libs ${__install__libs}
- "${MSVC10_MFC_DIR}/Microsoft.VC100.MFC.manifest"
"${MSVC10_MFC_DIR}/mfc100.dll"
"${MSVC10_MFC_DIR}/mfc100u.dll"
"${MSVC10_MFC_DIR}/mfcm100.dll"
@@ -282,10 +289,7 @@ IF(MSVC)
# include the language dll's for vs10 as well as the actuall dll's
SET(MSVC10_MFCLOC_DIR "${MSVC10_REDIST_DIR}/${CMAKE_MSVC_ARCH}/Microsoft.VC100.MFCLOC")
- # Install the manifest that allows DLLs to be loaded from the
- # directory containing the executable.
SET(__install__libs ${__install__libs}
- "${MSVC10_MFCLOC_DIR}/Microsoft.VC100.MFCLOC.manifest"
"${MSVC10_MFCLOC_DIR}/mfc100chs.dll"
"${MSVC10_MFCLOC_DIR}/mfc100cht.dll"
"${MSVC10_MFCLOC_DIR}/mfc100enu.dll"
@@ -297,7 +301,6 @@ IF(MSVC)
"${MSVC10_MFCLOC_DIR}/mfc100kor.dll"
)
ENDIF(MSVC10)
-
ENDIF(CMAKE_INSTALL_MFC_LIBRARIES)
FOREACH(lib
@@ -306,6 +309,15 @@ IF(MSVC)
IF(EXISTS ${lib})
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib})
+ ELSE(EXISTS ${lib})
+ 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)
diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake
index efb7aa0..cbdcb7d 100644
--- a/Modules/Platform/SCO_SV.cmake
+++ b/Modules/Platform/SCO_SV.cmake
@@ -1,5 +1,2 @@
-SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-Kpic -belf")
-SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-Kpic -belf")
SET(CMAKE_DL_LIBS "")
-SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-belf -Wl,-Bexport")
INCLUDE(Platform/UnixPaths)