summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/AutoRccInfo.cmake.in11
-rw-r--r--Modules/AutogenInfo.cmake.in8
-rw-r--r--Modules/BasicConfigVersion-SameMinorVersion.cmake.in50
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake6
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake12
-rw-r--r--Modules/CPack.cmake2
-rw-r--r--Modules/CPackComponent.cmake2
-rw-r--r--Modules/CheckIncludeFiles.cmake40
-rw-r--r--Modules/FindAVIFile.cmake10
-rw-r--r--Modules/FindBoost.cmake8
-rw-r--r--Modules/FindCUDA.cmake3
-rw-r--r--Modules/FindFLTK.cmake33
-rw-r--r--Modules/FindFLTK2.cmake29
-rw-r--r--Modules/FindFreetype.cmake4
-rw-r--r--Modules/FindGDAL.cmake21
-rw-r--r--Modules/FindGIF.cmake8
-rw-r--r--Modules/FindGTK.cmake7
-rw-r--r--Modules/FindGTK2.cmake2
-rw-r--r--Modules/FindImageMagick.cmake9
-rw-r--r--Modules/FindJNI.cmake4
-rw-r--r--Modules/FindKDE3.cmake3
-rw-r--r--Modules/FindMPEG.cmake20
-rw-r--r--Modules/FindMPEG2.cmake20
-rw-r--r--Modules/FindOpenGL.cmake53
-rw-r--r--Modules/FindOpenThreads.cmake21
-rw-r--r--Modules/FindPNG.cmake4
-rw-r--r--Modules/FindPike.cmake9
-rw-r--r--Modules/FindQt.cmake12
-rw-r--r--Modules/FindQt3.cmake35
-rw-r--r--Modules/FindQt4.cmake13
-rw-r--r--Modules/FindSelfPackers.cmake8
-rw-r--r--Modules/FindSquish.cmake3
-rw-r--r--Modules/FindTCL.cmake47
-rw-r--r--Modules/FindUnixCommands.cmake24
-rw-r--r--Modules/Findosg_functions.cmake21
-rw-r--r--Modules/FindwxWidgets.cmake7
-rw-r--r--Modules/FindwxWindows.cmake3
-rw-r--r--Modules/GNUInstallDirs.cmake2
-rw-r--r--Modules/GetPrerequisites.cmake2
-rw-r--r--Modules/GoogleTest.cmake27
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake5
-rw-r--r--Modules/Platform/UnixPaths.cmake3
-rw-r--r--Modules/WriteBasicConfigVersionFile.cmake2
43 files changed, 299 insertions, 314 deletions
diff --git a/Modules/AutoRccInfo.cmake.in b/Modules/AutoRccInfo.cmake.in
new file mode 100644
index 0000000..5457a6f
--- /dev/null
+++ b/Modules/AutoRccInfo.cmake.in
@@ -0,0 +1,11 @@
+# Meta
+set(ARCC_MULTI_CONFIG @_multi_config@)
+# Directories and files
+set(ARCC_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@/")
+set(ARCC_CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@/")
+set(ARCC_CMAKE_CURRENT_SOURCE_DIR "@CMAKE_CURRENT_SOURCE_DIR@/")
+set(ARCC_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/")
+set(ARCC_BUILD_DIR @_build_dir@)
+# Qt environment
+set(ARCC_RCC_EXECUTABLE @_qt_rcc_executable@)
+set(ARCC_RCC_LIST_OPTIONS @_qt_rcc_list_options@)
diff --git a/Modules/AutogenInfo.cmake.in b/Modules/AutogenInfo.cmake.in
index 7f4b398..9a4a06d 100644
--- a/Modules/AutogenInfo.cmake.in
+++ b/Modules/AutogenInfo.cmake.in
@@ -9,12 +9,11 @@ set(AM_CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE "@CMAKE_INCLUDE_DIRECTORIES_PROJ
set(AM_BUILD_DIR @_build_dir@)
set(AM_SOURCES @_sources@)
set(AM_HEADERS @_headers@)
+set(AM_SETTINGS_FILE @_settings_file@)
# Qt environment
set(AM_QT_VERSION_MAJOR @_qt_version_major@)
-set(AM_QT_VERSION_MINOR @_qt_version_minor@)
set(AM_QT_MOC_EXECUTABLE @_qt_moc_executable@)
set(AM_QT_UIC_EXECUTABLE @_qt_uic_executable@)
-set(AM_QT_RCC_EXECUTABLE @_qt_rcc_executable@)
# MOC settings
set(AM_MOC_SKIP @_moc_skip@)
set(AM_MOC_DEFINITIONS @_moc_compile_defs@)
@@ -30,8 +29,3 @@ set(AM_UIC_TARGET_OPTIONS @_uic_target_options@)
set(AM_UIC_OPTIONS_FILES @_qt_uic_options_files@)
set(AM_UIC_OPTIONS_OPTIONS @_qt_uic_options_options@)
set(AM_UIC_SEARCH_PATHS @_uic_search_paths@)
-# RCC settings
-set(AM_RCC_SOURCES @_rcc_files@)
-set(AM_RCC_BUILDS @_rcc_builds@)
-set(AM_RCC_OPTIONS @_rcc_options@)
-set(AM_RCC_INPUTS @_rcc_inputs@)
diff --git a/Modules/BasicConfigVersion-SameMinorVersion.cmake.in b/Modules/BasicConfigVersion-SameMinorVersion.cmake.in
new file mode 100644
index 0000000..59ca253
--- /dev/null
+++ b/Modules/BasicConfigVersion-SameMinorVersion.cmake.in
@@ -0,0 +1,50 @@
+# This is a basic version file for the Config-mode of find_package().
+# It is used by write_basic_package_version_file() as input file for configure_file()
+# to create a version-file which can be installed along a config.cmake file.
+#
+# The created file sets PACKAGE_VERSION_EXACT if the current version string and
+# the requested version string are exactly the same and it sets
+# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
+# but only if the requested major and minor versions are the same as the current
+# one.
+# The variable CVF_VERSION must be set before calling configure_file().
+
+
+set(PACKAGE_VERSION "@CVF_VERSION@")
+
+if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else()
+
+ if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.([0-9]+)")
+ set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
+ set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
+ else()
+ set(CVF_VERSION_MAJOR "@CVF_VERSION@")
+ set(CVF_VERSION_MINOR "")
+ endif()
+
+ if((PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) AND
+ (PACKAGE_FIND_VERSION_MINOR STREQUAL CVF_VERSION_MINOR))
+ set(PACKAGE_VERSION_COMPATIBLE TRUE)
+ else()
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+ endif()
+
+ if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
+ set(PACKAGE_VERSION_EXACT TRUE)
+ endif()
+endif()
+
+
+# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+ return()
+endif()
+
+# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
+if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "@CMAKE_SIZEOF_VOID_P@")
+ math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
+ set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
+ set(PACKAGE_VERSION_UNSUITABLE TRUE)
+endif()
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 347106e..15c304c 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -742,12 +742,12 @@ function(CMAKE_DIAGNOSE_UNSUPPORTED_CLANG lang envvar)
return()
endif()
- # Test whether a GNU-like command-line option works.
- execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" --version
+ # Test whether an MSVC-like command-line option works.
+ execute_process(COMMAND "${CMAKE_${lang}_COMPILER}" /?
RESULT_VARIABLE _clang_result
OUTPUT_VARIABLE _clang_stdout
ERROR_VARIABLE _clang_stderr)
- if(NOT _clang_result EQUAL 0)
+ if(_clang_result EQUAL 0)
return()
endif()
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index f5a8e59..e37f34f 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -122,7 +122,7 @@
#
# write_basic_package_version_file(<filename>
# [VERSION <major.minor.patch>]
-# COMPATIBILITY <AnyNewerVersion|SameMajorVersion|ExactVersion> )
+# COMPATIBILITY <AnyNewerVersion|SameMajorVersion|SameMinorVersion|ExactVersion> )
#
#
# Writes a file for use as ``<package>ConfigVersion.cmake`` file to
@@ -144,6 +144,9 @@
# requested, e.g. version 2.0 will not be considered compatible if 1.0 is
# requested. This mode should be used for packages which guarantee backward
# compatibility within the same major version.
+# If ``SameMinorVersion`` is used, the behaviour is the same as
+# ``SameMajorVersion``, but both major and minor version must be the same as
+# requested, e.g version 0.2 will not be compatible if 0.1 is requested.
# If ``ExactVersion`` is used, then the package is only considered compatible if
# the requested version matches exactly its own version number (not considering
# the tweak version). For example, version 1.2.3 of a package is only
@@ -154,10 +157,9 @@
# macro.
#
# Internally, this macro executes :command:`configure_file()` to create the
-# resulting version file. Depending on the ``COMPATIBILITY``, either the file
-# ``BasicConfigVersion-SameMajorVersion.cmake.in`` or
-# ``BasicConfigVersion-AnyNewerVersion.cmake.in`` is used. Please note that
-# these two files are internal to CMake and you should not call
+# resulting version file. Depending on the ``COMPATIBILITY``, the corresponding
+# ``BasicConfigVersion-<COMPATIBILITY>.cmake.in`` file is used.
+# Please note that these files are internal to CMake and you should not call
# :command:`configure_file()` on them yourself, but they can be used as starting
# point to create more sophisticted custom ``ConfigVersion.cmake`` files.
#
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index ea7dc02..812917f 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -338,7 +338,7 @@ function(cpack_encode_variables)
set(value "${${var}}")
endif()
- string(APPEND commands "\nSET(${var} \"${value}\")")
+ string(APPEND commands "\nset(${var} \"${value}\")")
endif()
endforeach()
diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index 2374fbd..6c122e5 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -66,7 +66,7 @@
# the component differently depending on the value of this variable:
#
# * ONE_PER_GROUP (default): creates one package file per component group
-# * ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) component
+# * ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) components
# * IGNORE : creates one package per component, i.e. IGNORE component group
#
# One can specify different grouping for different CPack generator by
diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake
index bef11a5..347231c 100644
--- a/Modules/CheckIncludeFiles.cmake
+++ b/Modules/CheckIncludeFiles.cmake
@@ -6,19 +6,24 @@
# -----------------
#
# Provides a macro to check if a list of one or more header files can
-# be included together in ``C``.
+# be included together.
#
# .. command:: CHECK_INCLUDE_FILES
#
# ::
#
-# CHECK_INCLUDE_FILES("<includes>" <variable>)
+# CHECK_INCLUDE_FILES("<includes>" <variable> [LANGUAGE <language>])
#
# Check if the given ``<includes>`` list may be included together
-# in a ``C`` source file and store the result in an internal cache
+# in a source file and store the result in an internal cache
# entry named ``<variable>``. Specify the ``<includes>`` argument
# as a :ref:`;-list <CMake Language Lists>` of header file names.
#
+# If LANGUAGE is set, the specified compiler will be used to perform the
+# check. Acceptable values are ``C`` and ``CXX``. If not set, the C compiler
+# will be used if enabled. If the C compiler is not enabled, the C++
+# compiler will be used if enabled.
+#
# The following variables may be set before calling this macro to modify
# the way the check is run:
#
@@ -37,6 +42,31 @@
macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
if(NOT DEFINED "${VARIABLE}")
set(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n")
+
+ if("x${ARGN}" STREQUAL "x")
+ if(CMAKE_C_COMPILER_LOADED)
+ set(_lang C)
+ elseif(CMAKE_CXX_COMPILER_LOADED)
+ set(_lang CXX)
+ else()
+ message(FATAL_ERROR "CHECK_INCLUDE_FILES needs either C or CXX language enabled.\n")
+ endif()
+ elseif("x${ARGN}" MATCHES "^xLANGUAGE;([a-zA-Z]+)$")
+ set(_lang "${CMAKE_MATCH_1}")
+ elseif("x${ARGN}" MATCHES "^xLANGUAGE$")
+ message(FATAL_ERROR "No languages listed for LANGUAGE option.\nSupported languages: C, CXX.\n")
+ else()
+ message(FATAL_ERROR "Unknown arguments:\n ${ARGN}\n")
+ endif()
+
+ if(_lang STREQUAL "C")
+ set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckIncludeFiles/${var}.c)
+ elseif(_lang STREQUAL "CXX")
+ set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckIncludeFiles/${var}.cpp)
+ else()
+ message(FATAL_ERROR "Unknown language:\n ${_lang}\nSupported languages: C, CXX.\n")
+ endif()
+
if(CMAKE_REQUIRED_INCLUDES)
set(CHECK_INCLUDE_FILES_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}")
else()
@@ -51,7 +81,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
string(APPEND CMAKE_CONFIGURABLE_FILE_CONTENT
"\n\nint main(void){return 0;}\n")
configure_file("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
- "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY)
+ "${src}" @ONLY)
set(_INCLUDE ${INCLUDE}) # remove empty elements
if("${_INCLUDE}" MATCHES "^([^;]+);.+;([^;]+)$")
@@ -68,7 +98,7 @@ macro(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
endif()
try_compile(${VARIABLE}
${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c
+ ${src}
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS}
diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake
index 88a2a25..2df29ca 100644
--- a/Modules/FindAVIFile.cmake
+++ b/Modules/FindAVIFile.cmake
@@ -21,14 +21,8 @@
if (UNIX)
- find_path(AVIFILE_INCLUDE_DIR avifile.h
- /usr/local/avifile/include
- /usr/local/include/avifile
- )
-
- find_library(AVIFILE_AVIPLAY_LIBRARY aviplay
- /usr/local/avifile/lib
- )
+ find_path(AVIFILE_INCLUDE_DIR avifile.h PATH_SUFFIXES avifile/include include/avifile include/avifile-0.7)
+ find_library(AVIFILE_AVIPLAY_LIBRARY aviplay aviplay-0.7 PATH_SUFFIXES avifile/lib)
endif ()
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 6f60eeb..0786248 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -429,9 +429,7 @@ endfunction()
# Guesses Boost's compiler prefix used in built library names
# Returns the guess by setting the variable pointed to by _ret
function(_Boost_GUESS_COMPILER_PREFIX _ret)
- if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel"
- OR CMAKE_CXX_COMPILER MATCHES "icl"
- OR CMAKE_CXX_COMPILER MATCHES "icpc")
+ if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
if(WIN32)
set (_boost_COMPILER "-iw")
else()
@@ -1395,8 +1393,8 @@ endif()
# support libraries
if(WIN32 AND Boost_USE_DEBUG_RUNTIME)
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
- OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
+ OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang"
+ OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel")
string(APPEND _boost_DEBUG_ABI_TAG "g")
endif()
endif()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 8708938..9ea8136 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -666,8 +666,7 @@ if(NOT CUDA_TOOLKIT_ROOT_DIR AND NOT CMAKE_CROSSCOMPILING)
find_path(CUDA_TOOLKIT_ROOT_DIR
NAMES nvcc nvcc.exe
PATHS /opt/cuda/bin
- /usr/local/bin
- /usr/local/cuda/bin
+ PATH_SUFFIXES cuda/bin
DOC "Toolkit location."
)
diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake
index e6bd3c9..1aa52cc 100644
--- a/Modules/FindFLTK.cmake
+++ b/Modules/FindFLTK.cmake
@@ -114,12 +114,11 @@ if(NOT FLTK_DIR)
# Look in places relative to the system executable search path.
${FLTK_DIR_SEARCH}
- PATHS
- # Look in standard UNIX install locations.
- /usr/local/lib/fltk
- /usr/lib/fltk
- /usr/local/fltk
- /usr/X11R6/include
+ PATH_SUFFIXES
+ fltk
+ fltk/include
+ lib/fltk
+ lib/fltk/include
# Help the user find it if we cannot.
DOC "The ${FLTK_DIR_STRING}"
@@ -216,14 +215,11 @@ endif()
endif()
endif()
- set(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH}
- /usr/local/fltk
- /usr/X11R6/include
- ${_FLTK_POSSIBLE_INCLUDE_DIRS}
- )
+ list(APPEND FLTK_INCLUDE_SEARCH_PATH ${_FLTK_POSSIBLE_INCLUDE_DIRS})
find_path(FLTK_INCLUDE_DIR
NAMES FL/Fl.h FL/Fl.H # fltk 1.1.9 has Fl.H (#8376)
+ PATH_SUFFIXES fltk fltk/include
PATHS ${FLTK_INCLUDE_SEARCH_PATH})
#
@@ -237,21 +233,16 @@ endif()
endif()
endif()
- set(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH}
- /usr/local/fltk/lib
- /usr/X11R6/lib
- ${FLTK_INCLUDE_DIR}/lib
- ${_FLTK_POSSIBLE_LIBRARY_DIR}
- )
+ list(APPEND FLTK_LIBRARY_SEARCH_PATH ${FLTK_INCLUDE_DIR}/lib ${_FLTK_POSSIBLE_LIBRARY_DIR})
find_library(FLTK_BASE_LIBRARY NAMES fltk fltkd
- PATHS ${FLTK_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
find_library(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl
- PATHS ${FLTK_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
find_library(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms
- PATHS ${FLTK_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
find_library(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images
- PATHS ${FLTK_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk fltk/lib)
# Find the extra libraries needed for the fltk_images library.
if(UNIX)
diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake
index a43e5ff..365a82a 100644
--- a/Modules/FindFLTK2.cmake
+++ b/Modules/FindFLTK2.cmake
@@ -80,11 +80,11 @@ if(NOT FLTK2_DIR)
# Look in places relative to the system executable search path.
${FLTK2_DIR_SEARCH}
- # Look in standard UNIX install locations.
- /usr/local/lib/fltk2
- /usr/lib/fltk2
- /usr/local/fltk2
- /usr/X11R6/include
+ PATH_SUFFIXES
+ fltk2
+ fltk2/include
+ lib/fltk2
+ lib/fltk2/include
# Help the user find it if we cannot.
DOC "The ${FLTK2_DIR_STRING}"
@@ -175,25 +175,16 @@ if(FLTK2_DIR)
set(FLTK2_WRAP_UI 1)
endif()
- set(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH}
- /usr/local/fltk2
- /usr/X11R6/include
- )
-
- find_path(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH})
+ find_path(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/include)
- set(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH}
- /usr/local/fltk2/lib
- /usr/X11R6/lib
- ${FLTK2_INCLUDE_DIR}/lib
- )
+ list(APPEND FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_INCLUDE_DIR}/lib)
find_library(FLTK2_BASE_LIBRARY NAMES fltk2
- PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK2_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/lib)
find_library(FLTK2_GL_LIBRARY NAMES fltk2_gl
- PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK2_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/lib)
find_library(FLTK2_IMAGES_LIBRARY NAMES fltk2_images
- PATHS ${FLTK2_LIBRARY_SEARCH_PATH})
+ PATHS ${FLTK2_LIBRARY_SEARCH_PATH} PATH_SUFFIXES fltk2 fltk2/lib)
# Find the extra libraries needed for the fltk_images library.
if(UNIX)
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index 2acb4bc..61643be 100644
--- a/Modules/FindFreetype.cmake
+++ b/Modules/FindFreetype.cmake
@@ -63,10 +63,6 @@ set(FREETYPE_FIND_ARGS
HINTS
ENV FREETYPE_DIR
PATHS
- /usr/X11R6
- /usr/local/X11R6
- /usr/local/X11
- /usr/freeware
ENV GTKMM_BASEPATH
[HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]
[HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]
diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake
index 0cce9cb..ceb8eee 100644
--- a/Modules/FindGDAL.cmake
+++ b/Modules/FindGDAL.cmake
@@ -49,14 +49,6 @@ find_path(GDAL_INCLUDE_DIR gdal.h
PATH_SUFFIXES
include/gdal
include/GDAL
- include
- PATHS
- ~/Library/Frameworks/gdal.framework/Headers
- /Library/Frameworks/gdal.framework/Headers
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
)
if(UNIX)
@@ -68,12 +60,6 @@ if(UNIX)
HINTS
ENV GDAL_DIR
ENV GDAL_ROOT
- PATH_SUFFIXES bin
- PATHS
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
)
if(GDAL_CONFIG)
@@ -93,13 +79,6 @@ find_library(GDAL_LIBRARY
ENV GDAL_DIR
ENV GDAL_ROOT
${_gdal_libpath}
- PATH_SUFFIXES lib
- PATHS
- /sw
- /opt/local
- /opt/csw
- /opt
- /usr/freeware
)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake
index 0843d5f..4b2f882 100644
--- a/Modules/FindGIF.cmake
+++ b/Modules/FindGIF.cmake
@@ -30,10 +30,6 @@
find_path(GIF_INCLUDE_DIR gif_lib.h
HINTS
ENV GIF_DIR
- PATH_SUFFIXES include
- PATHS
- ~/Library/Frameworks
- /usr/freeware
)
# the gif library can have many names :-/
@@ -43,10 +39,6 @@ find_library(GIF_LIBRARY
NAMES ${POTENTIAL_GIF_LIBS}
HINTS
ENV GIF_DIR
- PATH_SUFFIXES lib
- PATHS
- ~/Library/Frameworks
- /usr/freeware
)
# see readme.txt
diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake
index 8a89cda..89fb54b 100644
--- a/Modules/FindGTK.cmake
+++ b/Modules/FindGTK.cmake
@@ -31,20 +31,17 @@ if(UNIX)
# - Atanas Georgiev <atanas@cs.columbia.edu>
find_path( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h
+ PATH_SUFFIXES glib/include lib/glib/include include/glib12
PATHS
/usr/openwin/share/include
- /usr/local/include/glib12
- /usr/lib/glib/include
- /usr/local/lib/glib/include
/opt/gnome/include
/opt/gnome/lib/glib/include
)
find_path( GTK_glib_INCLUDE_PATH NAMES glib.h
- PATH_SUFFIXES gtk-1.2 glib-1.2 glib12
+ PATH_SUFFIXES gtk-1.2 glib-1.2 glib12 glib/include lib/glib/include
PATHS
/usr/openwin/share/include
- /usr/lib/glib/include
/opt/gnome/include
)
diff --git a/Modules/FindGTK2.cmake b/Modules/FindGTK2.cmake
index b87b9f3..8d0da51 100644
--- a/Modules/FindGTK2.cmake
+++ b/Modules/FindGTK2.cmake
@@ -298,8 +298,6 @@ function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
/usr/libx32
/usr/lib64
/usr/lib
- /usr/X11R6/include
- /usr/X11R6/lib
/opt/gnome/include
/opt/gnome/lib
/opt/openwin/include
diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index 7d5534b..c16bbf2 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -196,24 +196,33 @@ foreach(component ${ImageMagick_FIND_COMPONENTS}
if(component STREQUAL "Magick++")
FIND_IMAGEMAGICK_API(Magick++ Magick++.h
Magick++ CORE_RL_Magick++_
+ Magick++-6 Magick++-7
Magick++-Q8 Magick++-Q16 Magick++-Q16HDRI Magick++-Q8HDRI
+ Magick++-6.Q64 Magick++-6.Q32 Magick++-6.Q64HDRI Magick++-6.Q32HDRI
Magick++-6.Q16 Magick++-6.Q8 Magick++-6.Q16HDRI Magick++-6.Q8HDRI
+ Magick++-7.Q64 Magick++-7.Q32 Magick++-7.Q64HDRI Magick++-7.Q32HDRI
Magick++-7.Q16 Magick++-7.Q8 Magick++-7.Q16HDRI Magick++-7.Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
elseif(component STREQUAL "MagickWand")
FIND_IMAGEMAGICK_API(MagickWand "wand/MagickWand.h;MagickWand/MagickWand.h"
Wand MagickWand CORE_RL_wand_
+ MagickWand-6 MagickWand-7
MagickWand-Q16 MagickWand-Q8 MagickWand-Q16HDRI MagickWand-Q8HDRI
+ MagickWand-6.Q64 MagickWand-6.Q32 MagickWand-6.Q64HDRI MagickWand-6.Q32HDRI
MagickWand-6.Q16 MagickWand-6.Q8 MagickWand-6.Q16HDRI MagickWand-6.Q8HDRI
+ MagickWand-7.Q64 MagickWand-7.Q32 MagickWand-7.Q64HDRI MagickWand-7.Q32HDRI
MagickWand-7.Q16 MagickWand-7.Q8 MagickWand-7.Q16HDRI MagickWand-7.Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
elseif(component STREQUAL "MagickCore")
FIND_IMAGEMAGICK_API(MagickCore "magick/MagickCore.h;MagickCore/MagickCore.h"
Magick MagickCore CORE_RL_magick_
+ MagickCore-6 MagickCore-7
MagickCore-Q16 MagickCore-Q8 MagickCore-Q16HDRI MagickCore-Q8HDRI
+ MagickCore-6.Q64 MagickCore-6.Q32 MagickCore-6.Q64HDRI MagickCore-6.Q32HDRI
MagickCore-6.Q16 MagickCore-6.Q8 MagickCore-6.Q16HDRI MagickCore-6.Q8HDRI
+ MagickCore-7.Q64 MagickCore-7.Q32 MagickCore-7.Q64HDRI MagickCore-7.Q32HDRI
MagickCore-7.Q16 MagickCore-7.Q8 MagickCore-7.Q16HDRI MagickCore-7.Q8HDRI
)
list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 96e3e21..c4601a1 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -126,8 +126,6 @@ list(APPEND JAVA_AWT_LIBRARY_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/lib"
)
JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_LIBRARY_DIRECTORIES
- /usr/lib
- /usr/local/lib
/usr/lib/jvm/java/lib
/usr/lib/java/jre/lib/{libarch}
/usr/lib/jvm/jre/lib/{libarch}
@@ -185,8 +183,6 @@ list(APPEND JAVA_AWT_INCLUDE_DIRECTORIES
)
JAVA_APPEND_LIBRARY_DIRECTORIES(JAVA_AWT_INCLUDE_DIRECTORIES
- /usr/include
- /usr/local/include
/usr/lib/java/include
/usr/local/lib/java/include
/usr/lib/jvm/java/include
diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake
index 03216a5..daf6818 100644
--- a/Modules/FindKDE3.cmake
+++ b/Modules/FindKDE3.cmake
@@ -200,8 +200,7 @@ find_path(KDE3_INCLUDE_DIR kpassdlg.h
PATHS
/opt/kde3/include
/opt/kde/include
- /usr/include/kde
- /usr/local/include/kde
+ PATH_SUFFIXES include/kde
)
#now the KDE library directory
diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake
index cd1b021..850a57e 100644
--- a/Modules/FindMPEG.cmake
+++ b/Modules/FindMPEG.cmake
@@ -22,23 +22,21 @@
# MPEG_mpeg2_LIBRARY, where to find the MPEG library.
# MPEG_vo_LIBRARY, where to find the vo library.
-find_path(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h
- /usr/local/livid
-)
+find_path(MPEG_INCLUDE_DIR
+ NAMES mpeg2.h mpeg2dec/mpeg2.h mpeg2dec/include/video_out.h)
-find_library(MPEG_mpeg2_LIBRARY mpeg2
- /usr/local/livid/mpeg2dec/libmpeg2/.libs
-)
+find_library(MPEG_mpeg2_LIBRARY mpeg2)
-find_library( MPEG_vo_LIBRARY vo
- /usr/local/livid/mpeg2dec/libvo/.libs
-)
+find_library(MPEG_vo_LIBRARY vo)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_mpeg2_LIBRARY MPEG_INCLUDE_DIR)
if(MPEG_FOUND)
- set( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} )
+ set( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} )
+ if(MPEG_vo_LIBRARY)
+ list(APPEND MPEG2_LIBRARIES ${MPEG_vo_LIBRARY})
+ endif()
endif()
mark_as_advanced(MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY MPEG_vo_LIBRARY)
diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake
index 2c75d7b..f9ccd6a 100644
--- a/Modules/FindMPEG2.cmake
+++ b/Modules/FindMPEG2.cmake
@@ -23,28 +23,24 @@
# MPEG2_vo_LIBRARY, where to find the vo library.
find_path(MPEG2_INCLUDE_DIR
- NAMES mpeg2.h mpeg2dec/mpeg2.h
- PATHS /usr/local/livid
-)
+ NAMES mpeg2.h mpeg2dec/mpeg2.h)
-find_library(MPEG2_mpeg2_LIBRARY mpeg2
- /usr/local/livid/mpeg2dec/libmpeg2/.libs
-)
+find_library(MPEG2_mpeg2_LIBRARY mpeg2)
-find_library( MPEG2_vo_LIBRARY vo
- /usr/local/livid/mpeg2dec/libvo/.libs
-)
+find_library(MPEG2_vo_LIBRARY vo)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR)
if(MPEG2_FOUND)
- set( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY}
- ${MPEG2_vo_LIBRARY})
+ set(MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY})
+ if(MPEG2_vo_LIBRARY)
+ list(APPEND MPEG2_LIBRARIES ${MPEG2_vo_LIBRARY})
+ endif()
#some native mpeg2 installations will depend
#on libSDL, if found, add it in.
- include(${CMAKE_CURRENT_LIST_DIR}/FindSDL.cmake)
+ find_package(SDL)
if(SDL_FOUND)
set( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY})
endif()
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 9063492..9ccd46b 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -99,11 +99,13 @@
# If the GLVND OpenGL and GLX libraries are available, prefer them.
# This forces ``OPENGL_gl_LIBRARY`` to be empty.
# This is the default if components were requested (since components
-# correspond to GLVND libraries).
+# correspond to GLVND libraries) or if policy :policy:`CMP0072` is
+# set to ``NEW``.
#
# ``LEGACY``
# Prefer to use the legacy libGL library, if available.
-# This is the default if no components were requested.
+# This is the default if no components were requested and
+# policy :policy:`CMP0072` is not set to ``NEW``.
#
# For EGL targets the client must rely on GLVND support on the user's system.
# Linking should use the ``OpenGL::OpenGL OpenGL::EGL`` targets. Using GLES*
@@ -182,7 +184,7 @@ else()
find_path(OPENGL_INCLUDE_DIR GL/gl.h
/usr/share/doc/NVIDIA_GLX-1.0/include
/usr/openwin/share/include
- /opt/graphics/OpenGL/include /usr/X11R6/include
+ /opt/graphics/OpenGL/include
${_OPENGL_INCLUDE_PATH}
)
find_path(OPENGL_GLX_INCLUDE_DIR GL/glx.h ${_OPENGL_INCLUDE_PATH})
@@ -190,21 +192,19 @@ else()
find_path(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h
/usr/share/doc/NVIDIA_GLX-1.0/include
/usr/openwin/share/include
- /opt/graphics/OpenGL/include /usr/X11R6/include
+ /opt/graphics/OpenGL/include
)
# Search for the GLVND libraries. We do this regardless of COMPONENTS; we'll
# take into account the COMPONENTS logic later.
find_library(OPENGL_opengl_LIBRARY
NAMES OpenGL
- PATHS /usr/X11R6/lib
- ${_OPENGL_LIB_PATH}
+ PATHS ${_OPENGL_LIB_PATH}
)
find_library(OPENGL_glx_LIBRARY
NAMES GLX
- PATHS /usr/X11R6/lib
- ${_OPENGL_LIB_PATH}
+ PATHS ${_OPENGL_LIB_PATH}
)
find_library(OPENGL_egl_LIBRARY
@@ -217,9 +217,10 @@ else()
PATHS ${OPENGL_gl_LIBRARY}
/opt/graphics/OpenGL/lib
/usr/openwin/lib
- /usr/shlib /usr/X11R6/lib
+ /usr/shlib
)
+ set(_OpenGL_GL_POLICY_WARN 0)
if(NOT DEFINED OpenGL_GL_PREFERENCE)
set(OpenGL_GL_PREFERENCE "")
endif()
@@ -237,8 +238,17 @@ else()
set(OpenGL_GL_PREFERENCE "GLVND")
else()
# No preference was explicitly specified and no GLVND components were
- # requested. Prefer libGL for legacy GL.
- set(OpenGL_GL_PREFERENCE "LEGACY")
+ # requested. Use a policy to choose the default.
+ cmake_policy(GET CMP0072 _OpenGL_GL_POLICY)
+ if("x${_OpenGL_GL_POLICY}x" STREQUAL "xNEWx")
+ set(OpenGL_GL_PREFERENCE "GLVND")
+ else()
+ set(OpenGL_GL_PREFERENCE "LEGACY")
+ if("x${_OpenGL_GL_POLICY}x" STREQUAL "xx")
+ set(_OpenGL_GL_POLICY_WARN 1)
+ endif()
+ endif()
+ unset(_OpenGL_GL_POLICY)
endif()
if("x${OpenGL_GL_PREFERENCE}x" STREQUAL "xGLVNDx" AND OPENGL_opengl_LIBRARY AND OPENGL_glx_LIBRARY)
@@ -252,11 +262,28 @@ else()
NAMES GL MesaGL
PATHS /opt/graphics/OpenGL/lib
/usr/openwin/lib
- /usr/shlib /usr/X11R6/lib
+ /usr/shlib
${_OPENGL_LIB_PATH}
)
endif()
+ if(_OpenGL_GL_POLICY_WARN AND OPENGL_gl_LIBRARY AND OPENGL_opengl_LIBRARY AND OPENGL_glx_LIBRARY)
+ message(AUTHOR_WARNING
+ "Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. "
+ "Run \"cmake --help-policy CMP0072\" for policy details. "
+ "Use the cmake_policy command to set the policy and suppress this warning."
+ "\n"
+ "FindOpenGL found both a legacy GL library:\n"
+ " OPENGL_gl_LIBRARY: ${OPENGL_gl_LIBRARY}\n"
+ "and GLVND libraries for OpenGL and GLX:\n"
+ " OPENGL_opengl_LIBRARY: ${OPENGL_opengl_LIBRARY}\n"
+ " OPENGL_glx_LIBRARY: ${OPENGL_glx_LIBRARY}\n"
+ "OpenGL_GL_PREFERENCE has not been set to \"GLVND\" or \"LEGACY\", so for "
+ "compatibility with CMake 3.10 and below the legacy GL library will be used."
+ )
+ endif()
+ unset(_OpenGL_GL_POLICY_WARN)
+
# FPHSA cannot handle "this OR that is required", so we conditionally set what
# it must look for. First clear any previous config we might have done:
set(_OpenGL_REQUIRED_VARS)
@@ -323,7 +350,7 @@ else()
PATHS ${OPENGL_gl_LIBRARY}
/opt/graphics/OpenGL/lib
/usr/openwin/lib
- /usr/shlib /usr/X11R6/lib
+ /usr/shlib
)
endif ()
diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake
index 54804b8..b1b116a 100644
--- a/Modules/FindOpenThreads.cmake
+++ b/Modules/FindOpenThreads.cmake
@@ -58,13 +58,6 @@ find_path(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
ENV OSG_ROOT
${OPENTHREADS_DIR}
${OSG_DIR}
- PATHS
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
- /usr/freeware
- PATH_SUFFIXES include
)
@@ -80,13 +73,6 @@ find_library(OPENTHREADS_LIBRARY
ENV OSG_ROOT
${OPENTHREADS_DIR}
${OSG_DIR}
- PATHS
- /sw
- /opt/local
- /opt/csw
- /opt
- /usr/freeware
- PATH_SUFFIXES lib
)
find_library(OPENTHREADS_LIBRARY_DEBUG
@@ -102,13 +88,6 @@ find_library(OPENTHREADS_LIBRARY_DEBUG
ENV OSG_ROOT
${OPENTHREADS_DIR}
${OSG_DIR}
- PATHS
- /sw
- /opt/local
- /opt/csw
- /opt
- /usr/freeware
- PATH_SUFFIXES lib
)
if(OPENTHREADS_LIBRARY_DEBUG)
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index dceb6bc..936f01f 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -51,9 +51,7 @@ endif()
find_package(ZLIB ${_FIND_ZLIB_ARG})
if(ZLIB_FOUND)
- find_path(PNG_PNG_INCLUDE_DIR png.h
- /usr/local/include/libpng # OpenBSD
- )
+ find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng)
list(APPEND PNG_NAMES png libpng)
unset(PNG_NAMES_DEBUG)
diff --git a/Modules/FindPike.cmake b/Modules/FindPike.cmake
index dff55a4..ec71c94 100644
--- a/Modules/FindPike.cmake
+++ b/Modules/FindPike.cmake
@@ -16,15 +16,12 @@
# PIKE_INCLUDE_PATH = path to where program.h is found
# PIKE_EXECUTABLE = full path to the pike binary
-file(GLOB PIKE_POSSIBLE_INCLUDE_PATHS
- /usr/include/pike/*
- /usr/local/include/pike/*)
-
find_path(PIKE_INCLUDE_PATH program.h
- ${PIKE_POSSIBLE_INCLUDE_PATHS})
+ ${PIKE_POSSIBLE_INCLUDE_PATHS}
+ PATH_SUFFIXES include/pike8.0/pike include/pike7.8/pike include/pike7.4/pike)
find_program(PIKE_EXECUTABLE
- NAMES pike7.4
+ NAMES pike8.0 pike 7.8 pike7.4
)
mark_as_advanced(
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake
index 4d8aea9..68dfa7d 100644
--- a/Modules/FindQt.cmake
+++ b/Modules/FindQt.cmake
@@ -105,13 +105,11 @@ find_file( QT4_QGLOBAL_H_FILE qglobal.h
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/include/Qt"
${qt_headers}/Qt
$ENV{QTDIR}/include/Qt
- /usr/local/qt/include/Qt
- /usr/local/include/Qt
/usr/lib/qt/include/Qt
- /usr/include/Qt
/usr/share/qt4/include/Qt
/usr/local/include/X11/qt4/Qt
- C:/Progra~1/qt/include/Qt )
+ C:/Progra~1/qt/include/Qt
+ PATH_SUFFIXES qt/include/Qt include/Qt)
if(QT4_QGLOBAL_H_FILE)
set(QT4_INSTALLED TRUE)
@@ -125,14 +123,10 @@ find_file( QT3_QGLOBAL_H_FILE qglobal.h
C:/Qt/3.3.3Educational/include
$ENV{QTDIR}/include
/usr/include/qt3/Qt
- /usr/local/qt/include
- /usr/local/include
- /usr/lib/qt/include
- /usr/include
/usr/share/qt3/include
/usr/local/include/X11/qt3
C:/Progra~1/qt/include
- /usr/include/qt3 )
+ PATH_SUFFIXES qt/include include/qt3)
if(QT3_QGLOBAL_H_FILE)
set(QT3_INSTALLED TRUE)
diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake
index fa9f3a1..a034210 100644
--- a/Modules/FindQt3.cmake
+++ b/Modules/FindQt3.cmake
@@ -61,14 +61,10 @@ find_path(QT_INCLUDE_DIR qt.h
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
$ENV{QTDIR}/include
${GLOB_PATHS}
- /usr/local/qt/include
- /usr/lib/qt/include
- /usr/lib/qt3/include
- /usr/include/qt
/usr/share/qt3/include
C:/Progra~1/qt/include
- /usr/include/qt3
/usr/local/include/X11/qt3
+ PATH_SUFFIXES lib/qt/include lib/qt3/include include/qt include/qt3 qt/include qt3/include
)
# if qglobal.h is not in the qt_include_dir then set
@@ -101,13 +97,10 @@ if (QT_MT_REQUIRED)
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]"
ENV QTDIR
${GLOB_PATHS_LIB}
- /usr/local/qt
- /usr/lib/qt
- /usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
PATH_SUFFIXES
- lib
+ lib/qt lib/qt3 qt qt3 qt/lib qt3/lib
)
else ()
@@ -122,13 +115,10 @@ else ()
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]"
ENV QTDIR
${GLOB_PATHS_LIB}
- /usr/local/qt
- /usr/lib/qt
- /usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt/lib
PATH_SUFFIXES
- lib
+ lib/qt lib/qt3 qt qt3 qt/lib qt3/lib
)
endif ()
@@ -141,12 +131,10 @@ find_library(QT_QASSISTANTCLIENT_LIBRARY
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]"
ENV QTDIR
${GLOB_PATHS_LIB}
- /usr/local/qt
- /usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
PATH_SUFFIXES
- lib
+ lib/qt lib/qt3 qt qt3 qt/lib qt3/lib
)
# Qt 3 should prefer QTDIR over the PATH
@@ -159,15 +147,10 @@ find_program(QT_MOC_EXECUTABLE
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
${GLOB_PATHS_BIN}
- /usr/local/lib/qt3
- /usr/local/qt
- /usr/lib/qt
- /usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
- /usr/X11R6
PATH_SUFFIXES
- bin
+ lib/qt lib/qt3 qt qt3 qt/lib qt3/lib
)
if(QT_MOC_EXECUTABLE)
@@ -184,14 +167,10 @@ find_program(QT_UIC_EXECUTABLE
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt"
"[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt"
${GLOB_PATHS_BIN}
- /usr/local/qt
- /usr/lib/qt
- /usr/lib/qt3
/usr/share/qt3
C:/Progra~1/qt
- /usr/X11R6
PATH_SUFFIXES
- bin
+ lib/qt lib/qt3 qt qt3 qt/lib qt3/lib
)
if(QT_UIC_EXECUTABLE)
@@ -208,8 +187,6 @@ if (WIN32)
PATHS
"$ENV{ProgramFiles}/qt"
"C:/Program Files/qt"
- PATH_SUFFIXES
- lib
DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise."
)
endif ()
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index c67d0be..714e4af 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -709,13 +709,19 @@ if (QT_QMAKE_EXECUTABLE AND
if (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED)
_qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir)
set(QT_PLUGINS_DIR NOTFOUND)
+ set(qt_cross_paths)
foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/plugins")
endforeach()
- find_path(QT_PLUGINS_DIR NAMES accessible imageformats sqldrivers codecs designer
+ find_path(QT_PLUGINS_DIR
+ NAMES accessible bearer codecs designer graphicssystems iconengines imageformats inputmethods qmltooling script sqldrivers
HINTS ${qt_cross_paths} ${qt_plugins_dir}
DOC "The location of the Qt plugins"
NO_CMAKE_FIND_ROOT_PATH)
+ # If no plugins were installed, set QT_PLUGINS_DIR to ${qt_plugins_dir}
+ if(NOT QT_PLUGINS_DIR AND qt_plugins_dir)
+ set(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins")
+ endif()
endif ()
# ask qmake for the translations directory
@@ -729,6 +735,7 @@ if (QT_QMAKE_EXECUTABLE AND
_qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir)
if(qt_imports_dir)
set(QT_IMPORTS_DIR NOTFOUND)
+ set(qt_cross_paths)
foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH})
set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports")
endforeach()
@@ -738,6 +745,10 @@ if (QT_QMAKE_EXECUTABLE AND
NO_CMAKE_FIND_ROOT_PATH
NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH)
+ # If the imports folder is empty, set QT_IMPORTS_DIR to ${qt_imports_dir}
+ if(NOT QT_IMPORTS_DIR AND qt_imports_dir)
+ set(QT_IMPORTS_DIR ${qt_imports_dir} CACHE PATH "The location of the Qt imports")
+ endif()
mark_as_advanced(QT_IMPORTS_DIR)
endif()
endif ()
diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake
index 01d0641..ac2c7cf 100644
--- a/Modules/FindSelfPackers.cmake
+++ b/Modules/FindSelfPackers.cmake
@@ -20,19 +20,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
find_program(SELF_PACKER_FOR_EXECUTABLE
upx
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
find_program(SELF_PACKER_FOR_SHARED_LIB
upx
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
mark_as_advanced(
diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake
index 09bdf1f..d1ce200 100644
--- a/Modules/FindSquish.cmake
+++ b/Modules/FindSquish.cmake
@@ -144,9 +144,6 @@ if(NOT SQUISH_INSTALL_DIR)
# Look in places relative to the system executable search path.
${SQUISH_INSTALL_DIR_SEARCH}
- # Look in standard UNIX install locations.
- #/usr/local/squish
-
DOC "The ${SQUISH_INSTALL_DIR_STRING}"
)
endif()
diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake
index a711493..80779b3 100644
--- a/Modules/FindTCL.cmake
+++ b/Modules/FindTCL.cmake
@@ -82,11 +82,16 @@ set(TCLTK_POSSIBLE_LIB_PATHS
"${TK_LIBRARY_PATH}"
"${TCL_TCLSH_PATH_PARENT}/lib"
"${TK_WISH_PATH_PARENT}/lib"
- /usr/local/lib/tcl/tcl8.5
- /usr/local/lib/tcl/tk8.5
- /usr/local/lib/tcl/tcl8.4
- /usr/local/lib/tcl/tk8.4
- )
+)
+
+set(TCLTK_POSSIBLE_LIB_PATH_SUFFIXES
+ lib/tcl/tcl8.6
+ lib/tcl/tk8.6
+ lib/tcl/tcl8.5
+ lib/tcl/tk8.5
+ lib/tcl/tcl8.4
+ lib/tcl/tk8.4
+)
if(WIN32)
get_filename_component(
@@ -118,6 +123,7 @@ find_library(TCL_LIBRARY
tcl82 tcl8.2
tcl80 tcl8.0
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
find_library(TK_LIBRARY
@@ -131,6 +137,7 @@ find_library(TK_LIBRARY
tk82 tk8.2
tk80 tk8.0
PATHS ${TCLTK_POSSIBLE_LIB_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_LIB_PATH_SUFFIXES}
)
CMAKE_FIND_FRAMEWORKS(Tcl)
@@ -164,20 +171,20 @@ set(TCLTK_POSSIBLE_INCLUDE_PATHS
${TK_FRAMEWORK_INCLUDES}
"${TCL_TCLSH_PATH_PARENT}/include"
"${TK_WISH_PATH_PARENT}/include"
- /usr/include/tcl${TK_LIBRARY_VERSION}
- /usr/include/tcl${TCL_LIBRARY_VERSION}
- /usr/include/tcl8.6
- /usr/include/tcl8.5
- /usr/include/tcl8.4
- /usr/include/tcl8.3
- /usr/include/tcl8.2
- /usr/include/tcl8.0
- /usr/local/include/tcl8.6
- /usr/local/include/tk8.6
- /usr/local/include/tcl8.5
- /usr/local/include/tk8.5
- /usr/local/include/tcl8.4
- /usr/local/include/tk8.4
+ )
+
+set(TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES
+ include/tcl${TK_LIBRARY_VERSION}
+ include/tcl${TCL_LIBRARY_VERSION}
+ include/tcl8.6
+ include/tk8.6
+ include/tcl8.5
+ include/tk8.5
+ include/tcl8.4
+ include/tk8.4
+ include/tcl8.3
+ include/tcl8.2
+ include/tcl8.0
)
if(WIN32)
@@ -198,11 +205,13 @@ endif()
find_path(TCL_INCLUDE_PATH
NAMES tcl.h
HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
)
find_path(TK_INCLUDE_PATH
NAMES tk.h
HINTS ${TCLTK_POSSIBLE_INCLUDE_PATHS}
+ PATH_SUFFIXES ${TCLTK_POSSIBLE_INCLUDE_PATH_SUFFIXES}
)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake
index d2b6a4d..45047a9 100644
--- a/Modules/FindUnixCommands.cmake
+++ b/Modules/FindUnixCommands.cmake
@@ -15,10 +15,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindCygwin.cmake)
find_program(BASH
bash
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
mark_as_advanced(
BASH
@@ -27,10 +23,6 @@ mark_as_advanced(
find_program(CP
cp
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
mark_as_advanced(
CP
@@ -39,10 +31,6 @@ mark_as_advanced(
find_program(GZIP
gzip
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
mark_as_advanced(
GZIP
@@ -51,10 +39,6 @@ mark_as_advanced(
find_program(MV
mv
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
mark_as_advanced(
MV
@@ -63,10 +47,6 @@ mark_as_advanced(
find_program(RM
rm
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
mark_as_advanced(
RM
@@ -78,10 +58,6 @@ find_program(TAR
gtar
PATH
${CYGWIN_INSTALL_PATH}/bin
- /bin
- /usr/bin
- /usr/local/bin
- /sbin
)
mark_as_advanced(
TAR
diff --git a/Modules/Findosg_functions.cmake b/Modules/Findosg_functions.cmake
index c81c448..83d9844 100644
--- a/Modules/Findosg_functions.cmake
+++ b/Modules/Findosg_functions.cmake
@@ -28,13 +28,6 @@ function(OSG_FIND_PATH module header)
ENV OSG_ROOT
${${module_uc}_DIR}
${OSG_DIR}
- PATH_SUFFIXES include
- PATHS
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
- /usr/freeware
)
endfunction()
@@ -54,13 +47,6 @@ function(OSG_FIND_LIBRARY module library)
ENV OSG_ROOT
${${module_uc}_DIR}
${OSG_DIR}
- PATH_SUFFIXES lib
- PATHS
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
- /usr/freeware
)
find_library(${module_uc}_LIBRARY_DEBUG
@@ -72,13 +58,6 @@ function(OSG_FIND_LIBRARY module library)
ENV OSG_ROOT
${${module_uc}_DIR}
${OSG_DIR}
- PATH_SUFFIXES lib
- PATHS
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
- /opt
- /usr/freeware
)
if(NOT ${module_uc}_LIBRARY_DEBUG)
diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
index e08afe4..e21ec38 100644
--- a/Modules/FindwxWidgets.cmake
+++ b/Modules/FindwxWidgets.cmake
@@ -751,7 +751,7 @@ else()
#-----------------------------------------------------------------
# Support cross-compiling, only search in the target platform.
find_program(wxWidgets_CONFIG_EXECUTABLE
- NAMES wx-config wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8
+ NAMES $ENV{WX_CONFIG} wx-config wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8
DOC "Location of wxWidgets library configuration provider binary (wx-config)."
ONLY_CMAKE_FIND_ROOT_PATH
)
@@ -964,8 +964,9 @@ find_package_handle_standard_args(wxWidgets
#=====================================================================
# Resource file compiler.
-find_program(wxWidgets_wxrc_EXECUTABLE wxrc
- ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw
+find_program(wxWidgets_wxrc_EXECUTABLE
+ NAMES $ENV{WXRC_CMD} wxrc
+ PATHS ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw
DOC "Location of wxWidgets resource file compiler binary (wxrc)"
)
diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake
index 054a1bf..115cdc6 100644
--- a/Modules/FindwxWindows.cmake
+++ b/Modules/FindwxWindows.cmake
@@ -617,7 +617,8 @@ else()
# wx-config should be in your path anyhow, usually no need to set WXWIN or
# search in ../wx or ../../wx
- find_program(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE wx-config
+ find_program(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE
+ NAMES $ENV{WX_CONFIG} wx-config
HINTS
ENV WXWIN
$ENV{WXWIN}/bin
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index 91361d2..9dd464c 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -205,7 +205,7 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
# - we are on Linux system but NOT cross-compiling
# - we are NOT on debian
# - we are on a 64 bits system
- # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
+ # reason is: amd64 ABI: https://github.com/hjl-tools/x86-psABI/wiki/X86-psABI
# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
# and CMAKE_INSTALL_PREFIX is "/usr"
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index b81dd76..d397791 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -687,8 +687,6 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
"$ENV{VS71COMNTOOLS}/../../VC7/bin"
"C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN"
"C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN"
- "/usr/local/bin"
- "/usr/bin"
)
# <setup-gp_tool-vars>
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake
index 41bd1dc..3d47367 100644
--- a/Modules/GoogleTest.cmake
+++ b/Modules/GoogleTest.cmake
@@ -361,9 +361,32 @@ function(gtest_discover_tests TARGET)
set(_TEST_LIST ${TARGET}_TESTS)
endif()
+ get_property(
+ has_counter
+ TARGET ${TARGET}
+ PROPERTY CTEST_DISCOVERED_TEST_COUNTER
+ SET
+ )
+ if(has_counter)
+ get_property(
+ counter
+ TARGET ${TARGET}
+ PROPERTY CTEST_DISCOVERED_TEST_COUNTER
+ )
+ math(EXPR counter "${counter} + 1")
+ else()
+ set(counter 1)
+ endif()
+ set_property(
+ TARGET ${TARGET}
+ PROPERTY CTEST_DISCOVERED_TEST_COUNTER
+ ${counter}
+ )
+
# Define rule to generate test list for aforementioned test executable
- set(ctest_include_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_include.cmake")
- set(ctest_tests_file "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_tests.cmake")
+ set(ctest_file_base "${CMAKE_CURRENT_BINARY_DIR}/${TARGET}[${counter}]")
+ set(ctest_include_file "${ctest_file_base}_include.cmake")
+ set(ctest_tests_file "${ctest_file_base}_tests.cmake")
get_property(crosscompiling_emulator
TARGET ${TARGET}
PROPERTY CROSSCOMPILING_EMULATOR
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 1ba4877..38e0861 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -594,8 +594,11 @@ if(_IRSL_HAVE_Intel)
endif()
if(WIN32)
set(__install_dirs "${_Intel_redistdir}/1033")
+ if(EXISTS "${_Intel_redistdir}/1041")
+ list(APPEND __install_dirs "${_Intel_redistdir}/1041")
+ endif()
if(_Intel_compiler_ver VERSION_LESS 18)
- list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c" "${_Intel_redistdir}/1041")
+ list(APPEND __install_dirs "${_Intel_redistdir}/irml" "${_Intel_redistdir}/irml_c")
endif()
foreach(__Intel_lib IN ITEMS cilkrts20.dll libchkp.dll libgfxoffload.dll libioffload_host.dll libirngmd.dll
libmmd.dll libmmdd.dll libmpx.dll liboffload.dll svml_dispmd.dll)
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index 5687653..328d3c6 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -69,6 +69,9 @@ list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
/usr/include
)
+list(APPEND CMAKE_CUDA_IMPLICIT_INCLUDE_DIRECTORIES
+ /usr/include
+ )
# Enable use of lib32 and lib64 search path variants by default.
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS TRUE)
diff --git a/Modules/WriteBasicConfigVersionFile.cmake b/Modules/WriteBasicConfigVersionFile.cmake
index 7c9467a..2f7c80a 100644
--- a/Modules/WriteBasicConfigVersionFile.cmake
+++ b/Modules/WriteBasicConfigVersionFile.cmake
@@ -11,7 +11,7 @@
#
# WRITE_BASIC_CONFIG_VERSION_FILE( filename
# [VERSION major.minor.patch]
-# COMPATIBILITY (AnyNewerVersion|SameMajorVersion)
+# COMPATIBILITY (AnyNewerVersion|SameMajorVersion|SameMinorVersion|ExactVersion)
# )
#
#