summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amir.abdol@qt.io>2023-04-26 13:05:33 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-04-26 18:34:24 +0000
commit8ac8881ed1dc0288bd05bd729cbf21aba577f4d9 (patch)
tree0681ae66af453003d9ca353ac1b6f9ba728492f9
parentf53d07091c91a052af6f9472cccfa21748fd9cb7 (diff)
downloadqtmultimedia-8ac8881ed1dc0288bd05bd729cbf21aba577f4d9.tar.gz
Add IMPORTED_LINK_INTERFACE_LANGUAGES to WMF::WMF target
To make sure that CMake sets and uses the `CMAKE_C_IMPLICIT_LINK_DIRECTORIES`, we need to specify the `IMPORTED_LINK_INTERFACE_LANGUAGES`, otherwise, if user projects don't enable C, CMake might not know where to look, as seen in the bug. Fixes: QTBUG-112832 Change-Id: I5f26563cbbe4532b39933b4ffdec44bbccaf4062 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 148cf063e4efb87fc1ff07429b5723ff35ad0ef0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--cmake/FindWMF.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/FindWMF.cmake b/cmake/FindWMF.cmake
index 2f4633c34..1f253fd41 100644
--- a/cmake/FindWMF.cmake
+++ b/cmake/FindWMF.cmake
@@ -44,7 +44,8 @@ find_package_handle_standard_args(WMF REQUIRED_VARS
if(WMF_FOUND AND NOT TARGET WMF::WMF)
add_library(WMF::WMF INTERFACE IMPORTED)
set_target_properties(WMF::WMF PROPERTIES
- INTERFACE_LINK_LIBRARIES "${WMF_LIBRARIES}")
+ INTERFACE_LINK_LIBRARIES "${WMF_LIBRARIES}"
+ IMPORTED_LINK_INTERFACE_LANGUAGES C)
endif()
mark_as_advanced(WMF_LIBRARIES)