summaryrefslogtreecommitdiffstats
path: root/Help/release
diff options
context:
space:
mode:
authorAlex Birch <51103-Birchlabs@users.noreply.gitlab.kitware.com>2021-12-31 16:48:56 (GMT)
committerBrad King <brad.king@kitware.com>2022-05-20 13:45:12 (GMT)
commit020976d637bc85ed688d57bb79828bc153a5369b (patch)
tree306a1702e665cacb00f8d35b24603a5dc4b327f8 /Help/release
parent3c5cc79adbbe8524eb712b8c36d5d29a1d968d75 (diff)
downloadCMake-020976d637bc85ed688d57bb79828bc153a5369b.zip
CMake-020976d637bc85ed688d57bb79828bc153a5369b.tar.gz
CMake-020976d637bc85ed688d57bb79828bc153a5369b.tar.bz2
FindPkgConfig: Populate _STATIC_LINK_LIBRARIES. Add STATIC_TARGET.
Add LINK_LIBRARIES test to demonstrate static linking of transitive dependencies. Add STATIC_TARGET argument to pkg_check_modules() and pkg_search_module(). Influences the properties of target produced by IMPORTED_TARGET. When enabled: target's properties will be populated from <XXX>_STATIC_* variables instead of from <XXX>_* variables. Update existing tests concerning properties of targets produced via IMPORTED_TARGET, to test STATIC_TARGET variant too. Update existing tests concerning <XXX>_* variables to test <XXX>_STATIC_* variables too. Breaking changes to pkg_check_modules() and pkg_search_module(): - Variables CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES can no longer be used to influence library lookup (i.e. the internal call to find_library()), because FindPkgConfig now internally relies on these variables to differentiate between shared and static library lookup. Prefer CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX, or CMAKE_STATIC_LIBRARY_PREFIX + CMAKE_STATIC_LIBRARY_SUFFIX, depending on whether you wish to impact static or shared lookup. - <XXX>_LINK_LIBRARIES will now be populated only with libraries located via CMAKE_SHARED_LIBRARY_PREFIX + CMAKE_SHARED_LIBRARY_SUFFIX match - <XXX>_STATIC_LIBRARIES now processes -framework options - <XXX>_STATIC_LDFLAGS_OTHER now processes -framework options - <XXX>_STATIC_CFLAGS_OTHER now processes -isystem options - <XXX>_STATIC_INCLUDE_DIRS now processes -isystem options Fixes: #21714
Diffstat (limited to 'Help/release')
-rw-r--r--Help/release/dev/pkgconfig-static-libs.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Help/release/dev/pkgconfig-static-libs.rst b/Help/release/dev/pkgconfig-static-libs.rst
new file mode 100644
index 0000000..8f7ab0e
--- /dev/null
+++ b/Help/release/dev/pkgconfig-static-libs.rst
@@ -0,0 +1,7 @@
+pkgconfig-static-libs
+---------------------
+
+* The :module:`FindPkgConfig` module learned to find static libraries
+ in addition to the default search for shared libraries.
+ :command:`pkg_check_modules` gained a ``STATIC_TARGET`` option
+ to make the imported target reference static libraries.