cmake/Help/prop_tgt/IMPORTED_LOCATION.rst

39 lines
1.9 KiB
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
IMPORTED_LOCATION
-----------------
2019-11-11 23:01:05 +01:00
Full path to the main file on disk for an ``IMPORTED`` target.
2014-08-03 19:52:23 +02:00
2019-11-11 23:01:05 +01:00
Set this to the location of an ``IMPORTED`` target file on disk. For
2021-09-14 00:13:48 +02:00
executables this is the location of the executable file. For ``STATIC``
2014-08-03 19:52:23 +02:00
libraries and modules this is the location of the library or module.
2019-11-11 23:01:05 +01:00
For ``SHARED`` libraries on non-DLL platforms this is the location of the
2021-09-14 00:13:48 +02:00
shared library. For application bundles on macOS this is the location of
the executable file inside ``Contents/MacOS`` within the bundle folder.
For frameworks on macOS this is the location of the
2014-08-03 19:52:23 +02:00
library file symlink just inside the framework folder. For DLLs this
2019-11-11 23:01:05 +01:00
is the location of the ``.dll`` part of the library. For ``UNKNOWN``
2014-08-03 19:52:23 +02:00
libraries this is the location of the file to be linked. Ignored for
non-imported targets.
2023-12-07 09:12:54 +01:00
.. versionadded:: 3.28
2023-12-23 22:40:16 +01:00
For ordinary frameworks on Apple platforms, this may be the location of the
``.framework`` folder itself. For XCFrameworks, it may be the location of
the ``.xcframework`` folder, in which case any target that links against it
will get the selected library's ``Headers`` directory as a usage requirement.
2023-12-07 09:12:54 +01:00
2019-11-11 23:01:05 +01:00
The ``IMPORTED_LOCATION`` target property may be overridden for a
given configuration ``<CONFIG>`` by the configuration-specific
:prop_tgt:`IMPORTED_LOCATION_<CONFIG>` target property. Furthermore,
the :prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` target property may be
used to map between a project's configurations and those of an imported
target. If none of these is set then the name of any other configuration
listed in the :prop_tgt:`IMPORTED_CONFIGURATIONS` target property may be
selected and its :prop_tgt:`IMPORTED_LOCATION_<CONFIG>` value used.
To get the location of an imported target read one of the :prop_tgt:`LOCATION`
2024-04-14 22:45:38 +02:00
or :prop_tgt:`LOCATION_<CONFIG>` properties.
2020-02-01 23:06:01 +01:00
2023-12-23 22:40:16 +01:00
For platforms with import libraries (e.g. Windows, AIX or Apple) see also
2020-02-01 23:06:01 +01:00
:prop_tgt:`IMPORTED_IMPLIB`.