diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 6 | ||||
-rw-r--r-- | Modules/CMakeCXXCompilerId.cpp.in | 6 | ||||
-rw-r--r-- | Modules/CMakeDetermineASMCompiler.cmake | 17 | ||||
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 27 | ||||
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 28 | ||||
-rw-r--r-- | Modules/CMakeDetermineCompiler.cmake | 30 | ||||
-rw-r--r-- | Modules/CMakeDetermineFortranCompiler.cmake | 27 | ||||
-rw-r--r-- | Modules/CMakeFindDependencyMacro.cmake | 16 | ||||
-rw-r--r-- | Modules/CPackDeb.cmake | 13 | ||||
-rw-r--r-- | Modules/FeatureSummary.cmake | 2 | ||||
-rw-r--r-- | Modules/FindCUDA.cmake | 2 | ||||
-rw-r--r-- | Modules/FindFreetype.cmake | 4 | ||||
-rw-r--r-- | Modules/FindPythonInterp.cmake | 29 | ||||
-rw-r--r-- | Modules/FindPythonLibs.cmake | 7 | ||||
-rw-r--r-- | Modules/FindSDL_image.cmake | 4 | ||||
-rw-r--r-- | Modules/FindSDL_mixer.cmake | 4 | ||||
-rw-r--r-- | Modules/FindSDL_net.cmake | 4 | ||||
-rw-r--r-- | Modules/FindSDL_sound.cmake | 4 | ||||
-rw-r--r-- | Modules/FindSDL_ttf.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/Windows-GNU.cmake | 5 | ||||
-rw-r--r-- | Modules/Qt4Macros.cmake | 2 |
21 files changed, 122 insertions, 119 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 52f9590..561ccf2 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -14,7 +14,11 @@ /* __INTEL_COMPILER = VRP */ # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif # if defined(__INTEL_COMPILER_BUILD_DATE) /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index 25ceb3f..6c602d4 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -19,7 +19,11 @@ /* __INTEL_COMPILER = VRP */ # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif # if defined(__INTEL_COMPILER_BUILD_DATE) /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake index ca7eb8b..1d9617f 100644 --- a/Modules/CMakeDetermineASMCompiler.cmake +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -48,22 +48,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) _cmake_find_compiler(ASM${ASM_DIALECT}) else() - - # we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt - # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE - # - # if a compiler was specified by the user but without path, - # now try to find it with the full path - # if it is found, force it into the cache, - # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" - get_filename_component(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH) - if(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH) - find_program(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER}) - if(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH) - set(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE) - endif() - unset(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH CACHE) - endif() + _cmake_find_compiler_path(ASM${ASM_DIALECT}) endif() mark_as_advanced(CMAKE_ASM${ASM_DIALECT}_COMPILER) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake index c3f5a66..aa4cdc9 100644 --- a/Modules/CMakeDetermineCCompiler.cmake +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -42,6 +42,7 @@ endif() if(${CMAKE_GENERATOR} MATCHES "Visual Studio") elseif("${CMAKE_GENERATOR}" MATCHES "Xcode") set(CMAKE_C_COMPILER_XCODE_TYPE sourcecode.c.c) + _cmake_find_compiler_path(C) else() if(NOT CMAKE_C_COMPILER) set(CMAKE_C_COMPILER_INIT NOTFOUND) @@ -72,31 +73,7 @@ else() _cmake_find_compiler(C) else() - - # we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt - # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE - # if CMAKE_C_COMPILER is a list of length 2, use the first item as - # CMAKE_C_COMPILER and the 2nd one as CMAKE_C_COMPILER_ARG1 - - list(LENGTH CMAKE_C_COMPILER _CMAKE_C_COMPILER_LIST_LENGTH) - if("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2) - list(GET CMAKE_C_COMPILER 1 CMAKE_C_COMPILER_ARG1) - list(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER) - endif() - - # if a compiler was specified by the user but without path, - # now try to find it with the full path - # if it is found, force it into the cache, - # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" - # if the C compiler already had a path, reuse it for searching the CXX compiler - get_filename_component(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH) - if(NOT _CMAKE_USER_C_COMPILER_PATH) - find_program(CMAKE_C_COMPILER_WITH_PATH NAMES ${CMAKE_C_COMPILER}) - if(CMAKE_C_COMPILER_WITH_PATH) - set(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE) - endif() - unset(CMAKE_C_COMPILER_WITH_PATH CACHE) - endif() + _cmake_find_compiler_path(C) endif() mark_as_advanced(CMAKE_C_COMPILER) diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake index 21864f1..ef8445e 100644 --- a/Modules/CMakeDetermineCXXCompiler.cmake +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -41,6 +41,7 @@ endif() if(${CMAKE_GENERATOR} MATCHES "Visual Studio") elseif("${CMAKE_GENERATOR}" MATCHES "Xcode") set(CMAKE_CXX_COMPILER_XCODE_TYPE sourcecode.cpp.cpp) + _cmake_find_compiler_path(CXX) else() if(NOT CMAKE_CXX_COMPILER) set(CMAKE_CXX_COMPILER_INIT NOTFOUND) @@ -70,32 +71,7 @@ else() _cmake_find_compiler(CXX) else() - - # we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt - # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE - # - # if CMAKE_CXX_COMPILER is a list of length 2, use the first item as - # CMAKE_CXX_COMPILER and the 2nd one as CMAKE_CXX_COMPILER_ARG1 - - list(LENGTH CMAKE_CXX_COMPILER _CMAKE_CXX_COMPILER_LIST_LENGTH) - if("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2) - list(GET CMAKE_CXX_COMPILER 1 CMAKE_CXX_COMPILER_ARG1) - list(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER) - endif() - - # if a compiler was specified by the user but without path, - # now try to find it with the full path - # if it is found, force it into the cache, - # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" - # if the CXX compiler already had a path, reuse it for searching the C compiler - get_filename_component(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH) - if(NOT _CMAKE_USER_CXX_COMPILER_PATH) - find_program(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER}) - if(CMAKE_CXX_COMPILER_WITH_PATH) - set(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE) - endif() - unset(CMAKE_CXX_COMPILER_WITH_PATH CACHE) - endif() + _cmake_find_compiler_path(CXX) endif() mark_as_advanced(CMAKE_CXX_COMPILER) diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake index f522c44..cd0f8b8 100644 --- a/Modules/CMakeDetermineCompiler.cmake +++ b/Modules/CMakeDetermineCompiler.cmake @@ -83,3 +83,33 @@ macro(_cmake_find_compiler lang) endforeach() endif() endmacro() + +macro(_cmake_find_compiler_path lang) + if(CMAKE_${lang}_COMPILER) + # we only get here if CMAKE_${lang}_COMPILER was specified using -D or a pre-made CMakeCache.txt + # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE + # if CMAKE_${lang}_COMPILER is a list of length 2, use the first item as + # CMAKE_${lang}_COMPILER and the 2nd one as CMAKE_${lang}_COMPILER_ARG1 + list(LENGTH CMAKE_${lang}_COMPILER _CMAKE_${lang}_COMPILER_LIST_LENGTH) + if("${_CMAKE_${lang}_COMPILER_LIST_LENGTH}" EQUAL 2) + list(GET CMAKE_${lang}_COMPILER 1 CMAKE_${lang}_COMPILER_ARG1) + list(GET CMAKE_${lang}_COMPILER 0 CMAKE_${lang}_COMPILER) + endif() + unset(_CMAKE_${lang}_COMPILER_LIST_LENGTH) + + # find the compiler in the PATH if necessary + get_filename_component(_CMAKE_USER_${lang}_COMPILER_PATH "${CMAKE_${lang}_COMPILER}" PATH) + if(NOT _CMAKE_USER_${lang}_COMPILER_PATH) + find_program(CMAKE_${lang}_COMPILER_WITH_PATH NAMES ${CMAKE_${lang}_COMPILER}) + if(CMAKE_${lang}_COMPILER_WITH_PATH) + set(CMAKE_${lang}_COMPILER ${CMAKE_${lang}_COMPILER_WITH_PATH}) + get_property(_CMAKE_${lang}_COMPILER_CACHED CACHE CMAKE_${lang}_COMPILER PROPERTY TYPE) + if(_CMAKE_${lang}_COMPILER_CACHED) + set(CMAKE_${lang}_COMPILER "${CMAKE_${lang}_COMPILER}" CACHE STRING "${lang} compiler" FORCE) + endif() + unset(_CMAKE_${lang}_COMPILER_CACHED) + endif() + unset(CMAKE_${lang}_COMPILER_WITH_PATH CACHE) + endif() + endif() +endmacro() diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake index 4c8a8f2..d38bf25 100644 --- a/Modules/CMakeDetermineFortranCompiler.cmake +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -28,6 +28,7 @@ endif() if(${CMAKE_GENERATOR} MATCHES "Visual Studio") elseif("${CMAKE_GENERATOR}" MATCHES "Xcode") set(CMAKE_Fortran_COMPILER_XCODE_TYPE sourcecode.fortran.f90) + _cmake_find_compiler_path(Fortran) else() if(NOT CMAKE_Fortran_COMPILER) # prefer the environment variable CC @@ -90,31 +91,7 @@ else() _cmake_find_compiler(Fortran) else() - # we only get here if CMAKE_Fortran_COMPILER was specified using -D or a pre-made CMakeCache.txt - # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE - # if CMAKE_Fortran_COMPILER is a list of length 2, use the first item as - # CMAKE_Fortran_COMPILER and the 2nd one as CMAKE_Fortran_COMPILER_ARG1 - - list(LENGTH CMAKE_Fortran_COMPILER _CMAKE_Fortran_COMPILER_LIST_LENGTH) - if("${_CMAKE_Fortran_COMPILER_LIST_LENGTH}" EQUAL 2) - list(GET CMAKE_Fortran_COMPILER 1 CMAKE_Fortran_COMPILER_ARG1) - list(GET CMAKE_Fortran_COMPILER 0 CMAKE_Fortran_COMPILER) - endif() - - # if a compiler was specified by the user but without path, - # now try to find it with the full path - # if it is found, force it into the cache, - # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" - # if the C compiler already had a path, reuse it for searching the CXX compiler - get_filename_component(_CMAKE_USER_Fortran_COMPILER_PATH "${CMAKE_Fortran_COMPILER}" PATH) - if(NOT _CMAKE_USER_Fortran_COMPILER_PATH) - find_program(CMAKE_Fortran_COMPILER_WITH_PATH NAMES ${CMAKE_Fortran_COMPILER}) - if(CMAKE_Fortran_COMPILER_WITH_PATH) - set(CMAKE_Fortran_COMPILER ${CMAKE_Fortran_COMPILER_WITH_PATH} - CACHE STRING "Fortran compiler" FORCE) - endif() - unset(CMAKE_Fortran_COMPILER_WITH_PATH CACHE) - endif() + _cmake_find_compiler_path(Fortran) endif() mark_as_advanced(CMAKE_Fortran_COMPILER) diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake index 9334ba3..73efaae 100644 --- a/Modules/CMakeFindDependencyMacro.cmake +++ b/Modules/CMakeFindDependencyMacro.cmake @@ -4,7 +4,7 @@ # # :: # -# find_dependency(<dep> [<version>]) +# find_dependency(<dep> [<version> [EXACT]]) # # # ``find_dependency()`` wraps a :command:`find_package` call for a package @@ -31,12 +31,24 @@ macro(find_dependency dep) if (NOT ${dep}_FOUND) set(cmake_fd_version) if (${ARGC} GREATER 1) + if ("${ARGV1}" STREQUAL "") + message(FATAL_ERROR "Invalid arguments to find_dependency. VERSION is empty") + endif() + if ("${ARGV1}" STREQUAL EXACT) + message(FATAL_ERROR "Invalid arguments to find_dependency. EXACT may only be specified if a VERSION is specified") + endif() set(cmake_fd_version ${ARGV1}) endif() set(cmake_fd_exact_arg) - if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT) + if(${ARGC} GREATER 2) + if (NOT "${ARGV2}" STREQUAL EXACT) + message(FATAL_ERROR "Invalid arguments to find_dependency") + endif() set(cmake_fd_exact_arg EXACT) endif() + if(${ARGC} GREATER 3) + message(FATAL_ERROR "Invalid arguments to find_dependency") + endif() set(cmake_fd_quiet_arg) if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) set(cmake_fd_quiet_arg QUIET) diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake index c79ef06..b210bbb 100644 --- a/Modules/CPackDeb.cmake +++ b/Modules/CPackDeb.cmake @@ -67,7 +67,12 @@ # * Mandatory : YES # * Default : 'devel' # -# The debian package section +# .. variable:: CPACK_DEBIAN_COMPRESSION_TYPE +# +# * Mandatory : YES +# * Default : 'gzip' +# +# Possible values are: lzma, xz, bzip2 and gzip. # # .. variable:: CPACK_DEBIAN_PACKAGE_PRIORITY # @@ -390,6 +395,12 @@ if(NOT CPACK_DEBIAN_PACKAGE_PRIORITY) set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") endif() +# Compression: (recommended) +if(NOT CPACK_DEBIAN_COMPRESSION_TYPE) + set(CPACK_DEBIAN_COMPRESSION_TYPE "gzip") +endif() + + # Recommends: # You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake index 6696515..a72954c 100644 --- a/Modules/FeatureSummary.cmake +++ b/Modules/FeatureSummary.cmake @@ -492,6 +492,8 @@ function(FEATURE_SUMMARY) set(title_ENABLED_FEATURES "The following features have been enabled:") set(title_DISABLED_FEATURES "The following features have been disabled:") + set(title_PACKAGES_FOUND "The following packages have been found:") + set(title_PACKAGES_NOT_FOUND "The following packages have not been found:") set(title_OPTIONAL_PACKAGES_FOUND "The following OPTIONAL packages have been found:") set(title_OPTIONAL_PACKAGES_NOT_FOUND "The following OPTIONAL packages have not been found:") set(title_RECOMMENDED_PACKAGES_FOUND "The following RECOMMENDED packages have been found:") diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake index 7bc8d49..94f82f6 100644 --- a/Modules/FindCUDA.cmake +++ b/Modules/FindCUDA.cmake @@ -987,7 +987,7 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path) endif() endif() - # This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the + # This recipe is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the # CMake source. # Remove leading / diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 6f03c86..f0f9fe1 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -62,7 +62,7 @@ find_path(FREETYPE_INCLUDE_DIR_ft2build ft2build.h ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include + PATH_SUFFIXES include/freetype2 include freetype2 ) find_path(FREETYPE_INCLUDE_DIR_freetype2 @@ -79,7 +79,7 @@ find_path(FREETYPE_INCLUDE_DIR_freetype2 ENV GTKMM_BASEPATH [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path] [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path] - PATH_SUFFIXES include/freetype2 include + PATH_SUFFIXES include/freetype2 include freetype2 ) find_library(FREETYPE_LIBRARY diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake index 8da848c..c41f3a7 100644 --- a/Modules/FindPythonInterp.cmake +++ b/Modules/FindPythonInterp.cmake @@ -27,6 +27,10 @@ # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonInterp). +# +# If also calling find_package(PythonLibs), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #============================================================================= # Copyright 2005-2010 Kitware, Inc. @@ -47,7 +51,7 @@ unset(_Python_NAMES) set(_PYTHON1_VERSIONS 1.6 1.5) set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) -set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) +set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0) if(PythonInterp_FIND_VERSION) if(PythonInterp_FIND_VERSION_COUNT GREATER 1) @@ -71,18 +75,23 @@ if(PythonInterp_FIND_VERSION) else() set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) endif() - -list(APPEND _Python_NAMES python) - -# Search for the current active python version first find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) # Set up the versions we know about, in the order we will search. Always add # the user supplied additional versions to the front. -set(_Python_VERSIONS - ${Python_ADDITIONAL_VERSIONS} - ${_PYTHON_FIND_OTHER_VERSIONS} - ) +set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}) +# If FindPythonInterp has already found the major and minor version, +# insert that version next to get consistent versions of the interpreter and +# library. +if(DEFINED PYTHONLIBS_VERSION_STRING) + string(REPLACE "." ";" _PYTHONLIBS_VERSION "${PYTHONLIBS_VERSION_STRING}") + list(GET _PYTHONLIBS_VERSION 0 _PYTHONLIBS_VERSION_MAJOR) + list(GET _PYTHONLIBS_VERSION 1 _PYTHONLIBS_VERSION_MINOR) + list(APPEND _Python_VERSIONS ${_PYTHONLIBS_VERSION_MAJOR}.${_PYTHONLIBS_VERSION_MINOR}) +endif() +# Search for the current active python version first +list(APPEND _Python_VERSIONS ";") +list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS}) unset(_PYTHON_FIND_OTHER_VERSIONS) unset(_PYTHON1_VERSIONS) @@ -91,7 +100,7 @@ unset(_PYTHON3_VERSIONS) # Search for newest python version if python executable isn't found if(NOT PYTHON_EXECUTABLE) - foreach(_CURRENT_VERSION ${_Python_VERSIONS}) + foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS) set(_Python_NAMES python${_CURRENT_VERSION}) if(WIN32) list(APPEND _Python_NAMES python) diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake index 27d9e45..cc875ad 100644 --- a/Modules/FindPythonLibs.cmake +++ b/Modules/FindPythonLibs.cmake @@ -31,6 +31,10 @@ # # PYTHON_LIBRARY - path to the python library # PYTHON_INCLUDE_DIR - path to where Python.h is found +# +# If also calling find_package(PythonInterp), call find_package(PythonInterp) +# first to get the currently active Python version by default with a consistent +# version of PYTHON_LIBRARIES. #============================================================================= # Copyright 2001-2009 Kitware, Inc. @@ -51,7 +55,7 @@ CMAKE_FIND_FRAMEWORKS(Python) set(_PYTHON1_VERSIONS 1.6 1.5) set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) -set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) +set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0) if(PythonLibs_FIND_VERSION) if(PythonLibs_FIND_VERSION_COUNT GREATER 1) @@ -83,7 +87,6 @@ endif() # If FindPythonInterp has already found the major and minor version, # insert that version between the user supplied versions and the stock # version list. -find_package(PythonInterp QUIET) set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}) if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR) list(APPEND _Python_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake index e5173e3..fc2c043 100644 --- a/Modules/FindSDL_image.cmake +++ b/Modules/FindSDL_image.cmake @@ -54,7 +54,9 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h HINTS ENV SDLIMAGEDIR ENV SDLDIR - PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include + PATH_SUFFIXES SDL + # path suffixes to search inside ENV{SDLDIR} + include/SDL include/SDL12 include/SDL11 include ) if(CMAKE_SIZEOF_VOID_P EQUAL 8) diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake index 8f2f066..176fee6 100644 --- a/Modules/FindSDL_mixer.cmake +++ b/Modules/FindSDL_mixer.cmake @@ -54,7 +54,9 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h HINTS ENV SDLMIXERDIR ENV SDLDIR - PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include + PATH_SUFFIXES SDL + # path suffixes to search inside ENV{SDLDIR} + include/SDL include/SDL12 include/SDL11 include ) if(CMAKE_SIZEOF_VOID_P EQUAL 8) diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake index e5c2cdb..ef23573 100644 --- a/Modules/FindSDL_net.cmake +++ b/Modules/FindSDL_net.cmake @@ -54,7 +54,9 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h HINTS ENV SDLNETDIR ENV SDLDIR - PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include + PATH_SUFFIXES SDL + # path suffixes to search inside ENV{SDLDIR} + include/SDL include/SDL12 include/SDL11 include ) if(CMAKE_SIZEOF_VOID_P EQUAL 8) diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index 3a6ab7b..8b22ff7 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -98,7 +98,9 @@ find_path(SDL_SOUND_INCLUDE_DIR SDL_sound.h HINTS ENV SDLSOUNDDIR ENV SDLDIR - PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include + PATH_SUFFIXES SDL + # path suffixes to search inside ENV{SDLDIR} + include/SDL include/SDL12 include/SDL11 include ) find_library(SDL_SOUND_LIBRARY diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake index 3f58ac1..4b527fa 100644 --- a/Modules/FindSDL_ttf.cmake +++ b/Modules/FindSDL_ttf.cmake @@ -54,7 +54,9 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h HINTS ENV SDLTTFDIR ENV SDLDIR - PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include + PATH_SUFFIXES SDL + # path suffixes to search inside ENV{SDLDIR} + include/SDL include/SDL12 include/SDL11 include ) if(CMAKE_SIZEOF_VOID_P EQUAL 8) diff --git a/Modules/Platform/Windows-GNU.cmake b/Modules/Platform/Windows-GNU.cmake index 2bb7a20..5c5b360 100644 --- a/Modules/Platform/Windows-GNU.cmake +++ b/Modules/Platform/Windows-GNU.cmake @@ -87,6 +87,7 @@ macro(__windows_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "") set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS ${__WINDOWS_GNU_LD_RESPONSE}) + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES ${__WINDOWS_GNU_LD_RESPONSE}) set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 1) # We prefer "@" for response files but it is not supported by gcc 3. @@ -103,7 +104,9 @@ macro(__windows_compiler_gnu lang) endif() # The GNU 3.x compilers do not support response files (only linkers). set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_INCLUDES 0) - elseif(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS) + # Link libraries are generated only for the front-end. + set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_LIBRARIES 0) + else() # Use "@" to pass the response file to the front-end. set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "@") endif() diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake index df2318b..8baf896 100644 --- a/Modules/Qt4Macros.cmake +++ b/Modules/Qt4Macros.cmake @@ -342,7 +342,7 @@ macro(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optional if(_optionalClassName) add_custom_command(OUTPUT "${_impl}" "${_header}" - COMMAND Qt4::qdbuscpp2xml -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} + COMMAND Qt4::qdbusxml2cpp -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} DEPENDS ${_infile} VERBATIM ) else() |