2016-12-03 23:28:24 +01:00
|
|
|
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
|
|
|
|
-------------------------------------------
|
|
|
|
|
2021-09-14 00:13:48 +02:00
|
|
|
.. versionadded:: 3.7.1
|
|
|
|
|
2016-12-03 23:28:24 +01:00
|
|
|
CMake sets this variable to a ``TRUE`` value when the
|
|
|
|
:variable:`CMAKE_INSTALL_PREFIX` has just been initialized to
|
2024-04-14 22:45:38 +02:00
|
|
|
its default value, typically on the first
|
|
|
|
run of CMake within a new build tree and the :envvar:`CMAKE_INSTALL_PREFIX`
|
|
|
|
environment variable is not set on the first run of CMake. This can be used
|
|
|
|
by project code to change the default without overriding a user-provided value:
|
2016-12-03 23:28:24 +01:00
|
|
|
|
|
|
|
.. code-block:: cmake
|
|
|
|
|
|
|
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
2024-07-09 14:46:46 +02:00
|
|
|
set_property(CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "/my/default")
|
2016-12-03 23:28:24 +01:00
|
|
|
endif()
|