diff options
author | Michal Klocek <michal.klocek@qt.io> | 2023-10-09 12:12:43 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-12-01 21:56:19 +0000 |
commit | 172939db794a39b11c9be9263fcdf55bb00a4464 (patch) | |
tree | c06f62d637772ebc3846fab2f86f260ffab1f701 | |
parent | 180dbea2d8f8a016762520eed9738bef4c76bb4e (diff) |
Support pkg-config on mac
The user can compile qt with pkg-config support on mac,
in this case and only in this case we should also use pkg-config
in qtwebengine.
Use pkg-config feature from core. Add missing ldir flags to linker.
Fixes: QTBUG-115357
Change-Id: I401949a50c8199a7d400455db5fbbb4e0de652b0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7cb5bf9a3da8f445cd18d84d2ee0f90958feb2c5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | cmake/Functions.cmake | 2 | ||||
-rw-r--r-- | src/core/api/configure.cmake | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake index e32037fd5..7bbf8e759 100644 --- a/cmake/Functions.cmake +++ b/cmake/Functions.cmake @@ -476,7 +476,7 @@ function(add_linker_options target buildDir completeStatic) if(NOT completeStatic) target_link_options(${cmakeTarget} PRIVATE "$<$<CONFIG:${config}>:@${archives_rsp}>") endif() - target_link_options(${cmakeTarget} PRIVATE "$<$<CONFIG:${config}>:@${libs_rsp}>") + target_link_options(${cmakeTarget} PRIVATE "$<$<CONFIG:${config}>:@${ldir_rsp}>" "$<$<CONFIG:${config}>:@${libs_rsp}>") endif() if(WIN32) get_copy_of_response_file(objects_rsp ${target} objects) diff --git a/src/core/api/configure.cmake b/src/core/api/configure.cmake index df65aaa69..762f4bdd6 100644 --- a/src/core/api/configure.cmake +++ b/src/core/api/configure.cmake @@ -7,7 +7,7 @@ if(NOT QT_CONFIGURE_RUNNING) find_package(GLIB2 COMPONENTS GIO) find_package(GSSAPI) find_package(PkgConfig) - if(PkgConfig_FOUND) + if(PkgConfig_FOUND AND QT_FEATURE_pkg_config) pkg_check_modules(ALSA alsa IMPORTED_TARGET) pkg_check_modules(PULSEAUDIO libpulse>=0.9.10 libpulse-mainloop-glib) pkg_check_modules(XDAMAGE xdamage) |