summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/cpack_gen/ifw.rst4
-rw-r--r--Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst2
-rw-r--r--Help/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.rst2
-rw-r--r--Help/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.rst2
-rw-r--r--Help/prop_tgt/XXX_OUTPUT_DIRECTORY.txt11
-rw-r--r--Help/release/3.19.rst17
-rw-r--r--Help/release/3.20.rst54
-rw-r--r--Modules/CMakeDetermineCUDACompiler.cmake7
-rw-r--r--Modules/Compiler/IntelLLVM-C.cmake11
-rw-r--r--Modules/FindCUDA.cmake7
-rw-r--r--Modules/FindCUDAToolkit.cmake7
-rw-r--r--Modules/FindGDAL.cmake59
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx15
13 files changed, 129 insertions, 69 deletions
diff --git a/Help/cpack_gen/ifw.rst b/Help/cpack_gen/ifw.rst
index a940a95..6817eac 100644
--- a/Help/cpack_gen/ifw.rst
+++ b/Help/cpack_gen/ifw.rst
@@ -111,9 +111,11 @@ Package
.. variable:: CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST
+ .. versionadded:: 3.20
+
Set to ``OFF`` if the widget listing installer pages on the left side of the wizard should not be shown.
- Is ``ON`` by default.
+ It is ``ON`` by default, but will only have an effect if using QtIFW 4.0 or later.
.. variable:: CPACK_IFW_PACKAGE_TITLE_COLOR
diff --git a/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst b/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst
index 4221069..677e06d 100644
--- a/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst
+++ b/Help/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.rst
@@ -3,7 +3,7 @@ ARCHIVE_OUTPUT_DIRECTORY
.. |XXX| replace:: :ref:`ARCHIVE <Archive Output Artifacts>`
.. |xxx| replace:: archive
-.. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: CMAKE_ARCHIVE_OUTPUT_DIRECTORY
+.. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: :variable:`CMAKE_ARCHIVE_OUTPUT_DIRECTORY`
.. include:: XXX_OUTPUT_DIRECTORY.txt
See also the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>` target property.
diff --git a/Help/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.rst b/Help/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.rst
index 785a57b..9fbe904 100644
--- a/Help/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.rst
+++ b/Help/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.rst
@@ -3,7 +3,7 @@ LIBRARY_OUTPUT_DIRECTORY
.. |XXX| replace:: :ref:`LIBRARY <Library Output Artifacts>`
.. |xxx| replace:: library
-.. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: CMAKE_LIBRARY_OUTPUT_DIRECTORY
+.. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: :variable:`CMAKE_LIBRARY_OUTPUT_DIRECTORY`
.. include:: XXX_OUTPUT_DIRECTORY.txt
See also the :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY_<CONFIG>` target property.
diff --git a/Help/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.rst b/Help/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.rst
index 12390f5..3c37546 100644
--- a/Help/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.rst
+++ b/Help/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.rst
@@ -3,7 +3,7 @@ RUNTIME_OUTPUT_DIRECTORY
.. |XXX| replace:: :ref:`RUNTIME <Runtime Output Artifacts>`
.. |xxx| replace:: runtime
-.. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: CMAKE_RUNTIME_OUTPUT_DIRECTORY
+.. |CMAKE_XXX_OUTPUT_DIRECTORY| replace:: :variable:`CMAKE_RUNTIME_OUTPUT_DIRECTORY`
.. include:: XXX_OUTPUT_DIRECTORY.txt
See also the :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY_<CONFIG>` target property.
diff --git a/Help/prop_tgt/XXX_OUTPUT_DIRECTORY.txt b/Help/prop_tgt/XXX_OUTPUT_DIRECTORY.txt
index 3ae5448..d38a96e 100644
--- a/Help/prop_tgt/XXX_OUTPUT_DIRECTORY.txt
+++ b/Help/prop_tgt/XXX_OUTPUT_DIRECTORY.txt
@@ -3,9 +3,10 @@ Output directory in which to build |XXX| target files.
This property specifies the directory into which |xxx| target files
should be built. The property value may use
:manual:`generator expressions <cmake-generator-expressions(7)>`.
-Multi-configuration generators (VS, Xcode) append a per-configuration
-subdirectory to the specified directory unless a generator expression
-is used.
+Multi-configuration generators (:ref:`Visual Studio <Visual Studio Generators>`,
+:generator:`Xcode`, :generator:`Ninja Multi-Config`) append a
+per-configuration subdirectory to the specified directory unless a generator
+expression is used.
-This property is initialized by the value of the variable
-|CMAKE_XXX_OUTPUT_DIRECTORY| if it is set when a target is created.
+This property is initialized by the value of the
+|CMAKE_XXX_OUTPUT_DIRECTORY| variable if it is set when a target is created.
diff --git a/Help/release/3.19.rst b/Help/release/3.19.rst
index d819e8c..d8f4f9d 100644
--- a/Help/release/3.19.rst
+++ b/Help/release/3.19.rst
@@ -408,3 +408,20 @@ Changes made since CMake 3.19.0 include the following.
variable introduced in 3.19.0 previously worked only with the
:generator:`Visual Studio 14 2015` generator. It has now been fixed to
work with :ref:`Visual Studio Generators` for later VS versions too.
+
+
+3.19.5
+------
+
+* When :prop_tgt:`IOS_INSTALL_COMBINED` is enabled and the :generator:`Xcode`
+ generator is used, it is now possible to initiate an install or package
+ creation by running ``cmake --install`` or ``cpack`` from the command line.
+ When using the Xcode new build system, these are the only supported methods
+ due to a limitation of Xcode. Initiating these operations by building the
+ ``install`` or ``package`` targets in Xcode is only supported when using
+ the legacy build system.
+
+* The framework handling introduced in 3.19.0 as part of supporting Xcode's
+ *Link Binaries With Libraries* build phase broke the ability to switch
+ between device and simulator builds without reconfiguring. That capability
+ has now been restored.
diff --git a/Help/release/3.20.rst b/Help/release/3.20.rst
index efe937b..b36d1c2 100644
--- a/Help/release/3.20.rst
+++ b/Help/release/3.20.rst
@@ -103,16 +103,16 @@ Commands
* The :command:`cmake_path` command was added for operations on
filesystem paths.
-* The :command:`configure_file` command gained a ``USE_SOURCE_PERMISSIONS``
- and ``FILE_PERMISSIONS`` option to support copying of permissions of source
- file and specifying user defined permissions.
+* The :command:`configure_file` command gained ``USE_SOURCE_PERMISSIONS``
+ and ``FILE_PERMISSIONS`` options to support copying of permissions of the
+ source file and using specified permissions respectively.
-* The :command:`file(GENERATE)` command gained ``NEWLINE_STYLE`` option to
- support newline style of the generated file.
+* The :command:`file(GENERATE)` command gained a ``NEWLINE_STYLE`` option to
+ specify how newlines are handled for the generated file.
* The :command:`file(GENERATE)` command gained ``NO_SOURCE_PERMISSIONS``,
- ``USE_SOURCE_PERMISSIONS``, and ``FILE_PERMISSIONS`` options to support
- permissions of the generated file.
+ ``USE_SOURCE_PERMISSIONS``, and ``FILE_PERMISSIONS`` options for controlling
+ the permissions of the generated file.
* The :command:`install(FILES)` command ``RENAME`` option learned to
support :manual:`generator expressions <cmake-generator-expressions(7)>`.
@@ -171,14 +171,14 @@ Modules
-------
* The :module:`ExternalData` module :command:`ExternalData_Add_Target`
- function gained a ``SHOW_PROGRESS <bool>`` option to suppress progress
- output during the build.
+ function gained a ``SHOW_PROGRESS <bool>`` option for controlling whether
+ or not to show progress output during the build.
* The :module:`ExternalProject` module :command:`ExternalProject_Add` function
- gained a ``CONFIGURE_HANDLED_BY_BUILD`` option to have subsequent runs of
- the configure step be triggered by the build step when an external project
- dependency rebuilds instead of always rerunning the configure step when
- an external project dependency rebuilds.
+ gained a ``CONFIGURE_HANDLED_BY_BUILD`` option. This can be used to make
+ subsequent runs of the configure step be triggered by the build step when
+ an external project dependency rebuilds instead of always re-running the
+ configure step in such cases.
* The :module:`FindBoost` module gained a ``Boost_NO_WARN_NEW_VERSIONS``
option to silence the warning about unknown dependencies for new
@@ -188,6 +188,12 @@ Modules
toolkits when ``nvcc`` is a symbolic link,
for example due to a ``ccache`` or ``colornvcc`` wrapper script.
+* The :module:`FindGDAL` module has been improved to document and mark as
+ advanced its cache variables. There is a new ``FindGDAL_SKIP_GDAL_CONFIG``
+ variable which may be used to skip over the ``gdal-config``-based search.
+ Users may also set ``GDAL_ADDITIONAL_LIBRARY_VERSIONS`` to add additional
+ versions to the library name search strategy.
+
* The :module:`FindIntl` module now provides an imported target.
* The :module:`FindOpenSSL` module learned to support a version range.
@@ -228,7 +234,7 @@ CPack
resolving private library dependencies when using
``dpkg-shlibdeps``.
-* The :cpack_gen:`CPack IFW Generator` gained new
+* The :cpack_gen:`CPack IFW Generator` gained a new
:variable:`CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST` variable to
control visibility of the widget listing installer pages on the left side
of the wizard. This feature available only since QtIFW 4.0.
@@ -238,9 +244,9 @@ CPack
:variable:`CPACK_NSIS_BRANDING_TEXT_TRIM_POSITION` variables to change
the text at the bottom of the install window and change its trim position
-* The :cpack_gen:`CPack NSIS Generator` now handles correctly Unicode characters.
- If you want to have a ``CPACK_RESOURCE_FILE_LICENSE`` with UTF-8 characters
- it needs to be encoded in UTF-8 BOM.
+* The :cpack_gen:`CPack NSIS Generator` now correctly handles Unicode
+ characters. If you want to have a :variable:`CPACK_RESOURCE_FILE_LICENSE`
+ with UTF-8 characters, it needs to be encoded in UTF-8 BOM.
* The :cpack_gen:`CPack NuGet Generator` gained options:
@@ -321,10 +327,12 @@ Other Changes
phase when the required content is already populated and
up-to-date.
-* The precompiled Linux binaries provided on ``cmake.org`` have changed
- their naming pattern to ``cmake-$ver-linux-$arch``, where ``$arch``
- is either ``x86_64`` or ``aarch64``.
+* The precompiled Linux binaries provided on
+ `cmake.org <https://cmake.org/download/>`_ have changed their naming pattern
+ to ``cmake-$ver-linux-$arch``, where ``$arch`` is either ``x86_64`` or
+ ``aarch64``.
-* The precompiled Windows binaries provided on ``cmake.org`` have changed
- their naming pattern to ``cmake-$ver-windows-$arch``, where ``$arch``
- is either ``x86_64`` or ``i386``.
+* The precompiled Windows binaries provided on
+ `cmake.org <https://cmake.org/download/>`_ have changed their naming pattern
+ to ``cmake-$ver-windows-$arch``, where ``$arch`` is either ``x86_64`` or
+ ``i386``.
diff --git a/Modules/CMakeDetermineCUDACompiler.cmake b/Modules/CMakeDetermineCUDACompiler.cmake
index 468b8a1..dd539b7 100644
--- a/Modules/CMakeDetermineCUDACompiler.cmake
+++ b/Modules/CMakeDetermineCUDACompiler.cmake
@@ -175,14 +175,15 @@ if(NOT CMAKE_CUDA_COMPILER_ID_RUN)
# Given that NVCC can be provided by multiple different sources (NVIDIA HPC SDK, CUDA Toolkit, distro)
# each of which has a different layout, we need to extract the CUDA toolkit root from the compiler
# itself, allowing us to support numerous different scattered toolkit layouts
- execute_process(COMMAND ${_CUDA_NVCC_EXECUTABLE} "-v" "__cmake_determine_cuda" ERROR_VARIABLE NVCC_ERR)
- if(NVCC_ERR MATCHES "TOP=([^\r\n]*)")
+ execute_process(COMMAND ${_CUDA_NVCC_EXECUTABLE} "-v" "__cmake_determine_cuda"
+ OUTPUT_VARIABLE _CUDA_NVCC_OUT ERROR_VARIABLE _CUDA_NVCC_OUT)
+ if(_CUDA_NVCC_OUT MATCHES "TOP=([^\r\n]*)")
get_filename_component(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT "${CMAKE_MATCH_1}" ABSOLUTE)
else()
get_filename_component(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT "${_CUDA_NVCC_EXECUTABLE}" DIRECTORY)
get_filename_component(CMAKE_CUDA_COMPILER_TOOLKIT_ROOT "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}" DIRECTORY)
endif()
- unset(NVCC_ERR)
+ unset(_CUDA_NVCC_OUT)
set(CMAKE_CUDA_DEVICE_LINKER "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}/bin/nvlink${CMAKE_EXECUTABLE_SUFFIX}")
set(CMAKE_CUDA_FATBINARY "${CMAKE_CUDA_COMPILER_TOOLKIT_ROOT}/bin/fatbinary${CMAKE_EXECUTABLE_SUFFIX}")
diff --git a/Modules/Compiler/IntelLLVM-C.cmake b/Modules/Compiler/IntelLLVM-C.cmake
index 0ad2f0d..fce2971 100644
--- a/Modules/Compiler/IntelLLVM-C.cmake
+++ b/Modules/Compiler/IntelLLVM-C.cmake
@@ -27,7 +27,6 @@ endif()
set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
-set(CMAKE_C17_STANDARD__HAS_FULL_SUPPORT ON)
if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
@@ -38,9 +37,6 @@ if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
-
- set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std=c17")
- set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17")
else()
# clang-cl doesn't have any of these
set(CMAKE_C90_STANDARD_COMPILE_OPTION "")
@@ -51,13 +47,12 @@ else()
set(CMAKE_C11_STANDARD_COMPILE_OPTION "")
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "")
-
- set(CMAKE_C17_STANDARD_COMPILE_OPTION "")
- set(CMAKE_C17_EXTENSION_COMPILE_OPTION "")
endif()
if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
- __compiler_check_default_language_standard(C 2020 17)
+ # FIXME: The compiler actually defaults to C17, but
+ # CMake does not yet model or detect that standard.
+ __compiler_check_default_language_standard(C 2020 11)
else()
set(CMAKE_C_STANDARD_DEFAULT "")
endif()
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 3d10aef..620e32a 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -837,14 +837,15 @@ if(NOT CUDA_TOOLKIT_ROOT_DIR AND NOT CMAKE_CROSSCOMPILING)
# Given that NVCC can be provided by multiple different sources (NVIDIA HPC SDK, CUDA Toolkit, distro)
# each of which has a different layout, we need to extract the CUDA toolkit root from the compiler
# itself, allowing us to support numerous different scattered toolkit layouts
- execute_process(COMMAND ${CUDA_TOOLKIT_ROOT_DIR_NVCC} "-v" "__cmake_determine_cuda" ERROR_VARIABLE NVCC_ERR)
- if(NVCC_ERR MATCHES "TOP=([^\r\n]*)")
+ execute_process(COMMAND ${CUDA_TOOLKIT_ROOT_DIR_NVCC} "-v" "__cmake_determine_cuda"
+ OUTPUT_VARIABLE _CUDA_NVCC_OUT ERROR_VARIABLE _CUDA_NVCC_OUT)
+ if(_CUDA_NVCC_OUT MATCHES "TOP=([^\r\n]*)")
get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CMAKE_MATCH_1}" ABSOLUTE CACHE)
else()
get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CUDA_TOOLKIT_ROOT_DIR_NVCC}" DIRECTORY)
get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CUDA_TOOLKIT_ROOT_DIR}" DIRECTORY CACHE)
endif()
- unset(NVCC_ERR)
+ unset(_CUDA_NVCC_OUT)
string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR})
# We need to force this back into the cache.
diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake
index 256c98f..de2b068 100644
--- a/Modules/FindCUDAToolkit.cmake
+++ b/Modules/FindCUDAToolkit.cmake
@@ -522,13 +522,14 @@ else()
# If NVCC exists then invoke it to find the toolkit location.
# This allows us to support wrapper scripts (e.g. ccache or colornvcc), CUDA Toolkit,
# NVIDIA HPC SDK, and distro's splayed layouts
- execute_process(COMMAND ${CUDAToolkit_NVCC_EXECUTABLE} "-v" "__cmake_determine_cuda" ERROR_VARIABLE NVCC_ERR)
- if(NVCC_ERR MATCHES "TOP=([^\r\n]*)")
+ execute_process(COMMAND ${CUDAToolkit_NVCC_EXECUTABLE} "-v" "__cmake_determine_cuda"
+ OUTPUT_VARIABLE _CUDA_NVCC_OUT ERROR_VARIABLE _CUDA_NVCC_OUT)
+ if(_CUDA_NVCC_OUT MATCHES "TOP=([^\r\n]*)")
get_filename_component(CUDAToolkit_BIN_DIR "${CMAKE_MATCH_1}/bin" ABSOLUTE)
else()
get_filename_component(CUDAToolkit_BIN_DIR "${CUDAToolkit_NVCC_EXECUTABLE}" DIRECTORY)
endif()
- unset(NVCC_ERR)
+ unset(_CUDA_NVCC_OUT)
mark_as_advanced(CUDAToolkit_BIN_DIR)
set(CUDAToolkit_BIN_DIR "${CUDAToolkit_BIN_DIR}" CACHE PATH "" FORCE)
diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake
index 406a738..5237e15 100644
--- a/Modules/FindGDAL.cmake
+++ b/Modules/FindGDAL.cmake
@@ -45,6 +45,15 @@ Hints
Set ``GDAL_DIR`` or ``GDAL_ROOT`` in the environment to specify the
GDAL installation prefix.
+
+The following variables may be set to modify the search strategy:
+
+``FindGDAL_SKIP_GDAL_CONFIG``
+ If set, ``gdal-config`` will not be used. This can be useful if there are
+ GDAL libraries built with autotools (which provide the tool) and CMake (which
+ do not) in the same environment.
+``GDAL_ADDITIONAL_LIBRARY_VERSIONS``
+ Extra versions of library names to search for.
#]=======================================================================]
# $GDALDIR is an environment variable that would
@@ -68,12 +77,14 @@ find_path(GDAL_INCLUDE_DIR gdal.h
ENV GDAL_DIR
ENV GDAL_ROOT
PATH_SUFFIXES
- include/gdal
- include/GDAL
- include
+ include/gdal
+ include/GDAL
+ include
+ DOC "Path to the GDAL include directory"
)
+mark_as_advanced(GDAL_INCLUDE_DIR)
-if(UNIX)
+if(UNIX AND NOT FindGDAL_SKIP_GDAL_CONFIG)
# Use gdal-config to obtain the library version (this should hopefully
# allow us to -lgdal1.x.y where x.y are correct version)
# For some reason, libgdal development packages do not contain
@@ -83,10 +94,12 @@ if(UNIX)
ENV GDAL_DIR
ENV GDAL_ROOT
PATH_SUFFIXES bin
+ DOC "Path to the gdal-config tool"
)
+ mark_as_advanced(GDAL_CONFIG)
if(GDAL_CONFIG)
- exec_program(${GDAL_CONFIG} ARGS --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
+ execute_process(COMMAND ${GDAL_CONFIG} --libs OUTPUT_VARIABLE GDAL_CONFIG_LIBS)
if(GDAL_CONFIG_LIBS)
# treat the output as a command line and split it up
@@ -134,14 +147,30 @@ if(UNIX)
endif()
endif()
+# GDAL name its library when built with CMake as `gdal${major}${minor}`.
+set(_gdal_versions
+ ${GDAL_ADDITIONAL_LIBRARY_VERSIONS} 3.0 2.4 2.3 2.2 2.1 2.0 1.11 1.10 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2)
+
+set(_gdal_libnames)
+foreach (_gdal_version IN LISTS _gdal_versions)
+ string(REPLACE "." "" _gdal_version "${_gdal_version}")
+ list(APPEND _gdal_libnames "gdal${_gdal_version}" "GDAL${_gdal_version}")
+endforeach ()
+unset(_gdal_version)
+unset(_gdal_versions)
+
find_library(GDAL_LIBRARY
- NAMES ${_gdal_lib} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
+ NAMES ${_gdal_lib} ${_gdal_libnames} gdal gdal_i gdal1.5.0 gdal1.4.0 gdal1.3.2 GDAL
HINTS
ENV GDAL_DIR
ENV GDAL_ROOT
${_gdal_libpath}
PATH_SUFFIXES lib
+ DOC "Path to the GDAL library"
)
+mark_as_advanced(GDAL_LIBRARY)
+unset(_gdal_libnames)
+unset(_gdal_lib)
if (EXISTS "${GDAL_INCLUDE_DIR}/gdal_version.h")
file(STRINGS "${GDAL_INCLUDE_DIR}/gdal_version.h" _gdal_version
@@ -157,12 +186,14 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL
VERSION_VAR GDAL_VERSION
REQUIRED_VARS GDAL_LIBRARY GDAL_INCLUDE_DIR)
-if (GDAL_FOUND AND NOT TARGET GDAL::GDAL)
- add_library(GDAL::GDAL UNKNOWN IMPORTED)
- set_target_properties(GDAL::GDAL PROPERTIES
- IMPORTED_LOCATION "${GDAL_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${GDAL_INCLUDE_DIR}")
-endif ()
+if (GDAL_FOUND)
+ set(GDAL_LIBRARIES ${GDAL_LIBRARY})
+ set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})
-set(GDAL_LIBRARIES ${GDAL_LIBRARY})
-set(GDAL_INCLUDE_DIRS ${GDAL_INCLUDE_DIR})
+ if (NOT TARGET GDAL::GDAL)
+ add_library(GDAL::GDAL UNKNOWN IMPORTED)
+ set_target_properties(GDAL::GDAL PROPERTIES
+ IMPORTED_LOCATION "${GDAL_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${GDAL_INCLUDE_DIR}")
+ endif ()
+endif ()
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 359fc56..e0dd06b 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -188,9 +188,11 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
} else {
cmCPackIFWLogger(
WARNING,
- "Option CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST is set to value \""
- << option << "\". But has no any effect for QtIFW less than 4.0 "
- << "and will be skipped." << std::endl);
+ "Option CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST is set to \""
+ << option
+ << "\", but it is only supported with QtIFW version 4.0 or later. "
+ "It is being ignored because you are using QtIFW version "
+ << this->Generator->FrameworkVersion.data() << std::endl);
}
}
@@ -275,9 +277,8 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
class cmCPackIFWResourcesParser : public cmXMLParser
{
public:
- cmCPackIFWResourcesParser(cmCPackIFWInstaller* i)
+ explicit cmCPackIFWResourcesParser(cmCPackIFWInstaller* i)
: installer(i)
- , file(false)
{
this->path = i->Directory + "/resources";
}
@@ -296,7 +297,9 @@ public:
}
cmCPackIFWInstaller* installer;
- bool file, hasFiles, hasErrors;
+ bool file = false;
+ bool hasFiles = false;
+ bool hasErrors = false;
std::string path, basePath;
protected: