Skip to content

Commit a917939

Browse files
authored
Toolchain block for XXX_DIRS (#2108)
* Toolchain block for XXX_DIRS * Update section
1 parent 6f1b0a4 commit a917939

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reference/conanfile/tools/cmake.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,12 @@ The following predefined blocks are available, and added in this order:
318318
- ``cmake_flags_init``: defines ``CMAKE_XXX_FLAGS`` variables based on previously defined Conan variables. The blocks above only define ``CONAN_XXX`` variables, and this block will define CMake ones like ``set(CMAKE_CXX_FLAGS_INIT "${CONAN_CXX_FLAGS}" CACHE STRING "" FORCE)```.
319319
- ``try_compile``: Stop processing the toolchain, skipping the blocks below this one, if ``IN_TRY_COMPILE`` CMake property is defined.
320320
- ``find_paths``: Defines ``CMAKE_FIND_PACKAGE_PREFER_CONFIG``, ``CMAKE_MODULE_PATH``, ``CMAKE_PREFIX_PATH`` so the generated files from ``CMakeDeps`` are found.
321+
Also defines ``XXX_DIR`` variable for each requirement when cross building to **iOS**, **tvOS** and **watchOS** where ``CMAKE_PREFIX_PATH`` and ``CMAKE_MODULE_PATH`` are ignored.
322+
321323
- ``rpath``: Defines ``CMAKE_SKIP_RPATH``. By default it is disabled, and it is needed to define ``self.blocks["rpath"].skip_rpath=True`` if you want to activate ``CMAKE_SKIP_RPATH``
322324
- ``shared``: defines ``BUILD_SHARED_LIBS``
323325

324326

325-
326327
Blocks can be customized in different ways:
327328

328329
.. code:: python

0 commit comments

Comments
 (0)