diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindOpenGL.cmake | 7 | ||||
-rw-r--r-- | Modules/FindPerl.cmake | 7 | ||||
-rw-r--r-- | Modules/FindPython/Support.cmake | 13 | ||||
-rw-r--r-- | Modules/FindQt3.cmake | 7 | ||||
-rw-r--r-- | Modules/FindQt4.cmake | 8 | ||||
-rw-r--r-- | Modules/FindRuby.cmake | 3 | ||||
-rw-r--r-- | Modules/FindTCL.cmake | 6 | ||||
-rw-r--r-- | Modules/FindTclsh.cmake | 9 | ||||
-rw-r--r-- | Modules/FindX11.cmake | 8 |
9 files changed, 58 insertions, 10 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 74392da..17ffe85 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -424,8 +424,15 @@ if(OPENGL_EGL_INCLUDE_DIR) endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "GLU") + # FindGLU include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive to + # the contents, detect the case in this module and suppress it explicitly. + set(FPHSA_NAME_MISMATCHED 1) +endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGL REQUIRED_VARS ${_OpenGL_REQUIRED_VARS} HANDLE_COMPONENTS) +unset(FPHSA_NAME_MISMATCHED) unset(_OpenGL_REQUIRED_VARS) # OpenGL:: targets diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake index fd120bf..c14e059 100644 --- a/Modules/FindPerl.cmake +++ b/Modules/FindPerl.cmake @@ -73,8 +73,15 @@ endif() set(PERL ${PERL_EXECUTABLE}) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "PerlLibs") + # FindPerlLibs include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive to + # the contents, detect the case in this module and suppress it explicitly. + set(FPHSA_NAME_MISMATCHED 1) +endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl REQUIRED_VARS PERL_EXECUTABLE VERSION_VAR PERL_VERSION_STRING) +unset(FPHSA_NAME_MISMATCHED) mark_as_advanced(PERL_EXECUTABLE) diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 1be0625..9b65f39 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -5,17 +5,13 @@ # This file is a "template" file used by various FindPython modules. # -cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY) - -cmake_policy (VERSION 3.7) - -if (_${_PYTHON_PREFIX}_LOOKUP_POLICY) - cmake_policy (SET CMP0094 ${_${_PYTHON_PREFIX}_LOOKUP_POLICY}) -endif() - # # Initial configuration # + +# IN_LIST operator +cmake_policy (SET CMP0057 NEW) + if (NOT DEFINED _PYTHON_PREFIX) message (FATAL_ERROR "FindPython: INTERNAL ERROR") endif() @@ -1097,6 +1093,7 @@ endif() unset (${_PYTHON_PREFIX}_SOABI) # Define lookup strategy +cmake_policy (GET CMP0094 _${_PYTHON_PREFIX}_LOOKUP_POLICY) if (_${_PYTHON_PREFIX}_LOOKUP_POLICY STREQUAL "NEW") set (_${_PYTHON_PREFIX}_FIND_STRATEGY "LOCATION") else() diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake index 563ed46..b5bc8b1 100644 --- a/Modules/FindQt3.cmake +++ b/Modules/FindQt3.cmake @@ -201,9 +201,16 @@ endif() # if the include a library are found then we have it include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "Qt") + # FindQt include()'s this module. It's an old pattern, but rather than trying + # to suppress this from outside the module (which is then sensitive to the + # contents, detect the case in this module and suppress it explicitly. + set(FPHSA_NAME_MISMATCHED 1) +endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt3 REQUIRED_VARS QT_QT_LIBRARY QT_INCLUDE_DIR QT_MOC_EXECUTABLE VERSION_VAR QT_VERSION_STRING) +unset(FPHSA_NAME_MISMATCHED) set(QT_FOUND ${QT3_FOUND} ) if(QT_FOUND) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 3993968..2e3da74 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -1318,10 +1318,18 @@ if (NOT QT_VERSION_MAJOR EQUAL 4) endif() endif() else() + if (CMAKE_FIND_PACKAGE_NAME STREQUAL "Qt") + # FindQt include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive + # to the contents, detect the case in this module and suppress it + # explicitly. + set(FPHSA_NAME_MISMATCHED 1) + endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(Qt4 FOUND_VAR Qt4_FOUND REQUIRED_VARS ${_QT4_FOUND_REQUIRED_VARS} VERSION_VAR QTVERSION ) + unset(FPHSA_NAME_MISMATCHED) endif() ####################################### diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake index 1bdee60..3b8122e 100644 --- a/Modules/FindRuby.cmake +++ b/Modules/FindRuby.cmake @@ -50,7 +50,7 @@ This module will set the following variables in your project: Also: -``Ruby_INCLUDE_PATH`` +``RUBY_INCLUDE_PATH`` same as Ruby_INCLUDE_DIRS, only provided for compatibility reasons, don't use it Hints @@ -493,7 +493,6 @@ foreach(Camel Ruby_VERSION_MAJOR Ruby_VERSION_MINOR Ruby_VERSION_PATCH - Ruby_INCLUDE_PATH Ruby_ARCH_DIR Ruby_ARCH diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake index 960265f..9b771dc 100644 --- a/Modules/FindTCL.cmake +++ b/Modules/FindTCL.cmake @@ -223,6 +223,12 @@ find_path(TK_INCLUDE_PATH include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "TclStub") + # FindTclStub include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive to + # the contents, detect the case in this module and suppress it explicitly. + set(FPHSA_NAME_MISMATCHED 1) +endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH) set(FPHSA_NAME_MISMATCHED 1) set(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED}) diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake index 82be473..5555d59 100644 --- a/Modules/FindTclsh.cmake +++ b/Modules/FindTclsh.cmake @@ -92,8 +92,17 @@ if(TCL_TCLSH) endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +if (CMAKE_FIND_PACKAGE_NAME STREQUAL "TCL" OR + CMAKE_FIND_PACKAGE_NAME STREQUAL "TclStub") + # FindTCL include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive to + # the contents, detect the case in this module and suppress it explicitly. + # Transitively, FindTclStub includes FindTCL. + set(FPHSA_NAME_MISMATCHED 1) +endif () FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh REQUIRED_VARS TCL_TCLSH VERSION_VAR TCLSH_VERSION_STRING) +unset(FPHSA_NAME_MISMATCHED) mark_as_advanced(TCL_TCLSH) diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake index aa83575..ccd0252 100644 --- a/Modules/FindX11.cmake +++ b/Modules/FindX11.cmake @@ -404,9 +404,17 @@ if (UNIX) endif () include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) + if (CMAKE_FIND_PACKAGE_NAME STREQUAL "FLTK") + # FindFLTK include()'s this module. It's an old pattern, but rather than + # trying to suppress this from outside the module (which is then sensitive + # to the contents, detect the case in this module and suppress it + # explicitly. + set(FPHSA_NAME_MISMATCHED 1) + endif () find_package_handle_standard_args(X11 REQUIRED_VARS X11_X11_INCLUDE_PATH X11_X11_LIB HANDLE_COMPONENTS) + unset(FPHSA_NAME_MISMATCHED) if(X11_FOUND) include(${CMAKE_CURRENT_LIST_DIR}/CheckFunctionExists.cmake) |