summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-09-13 10:50:03 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-13 11:08:10 +0000
commit4328469c42429d51ec906c6535bf69cd02509b95 (patch)
tree9d3bb17c6781dfd977a525b47a0eabdf947f841e /cmake
parent47915e1ef2ee28376ce12c07b694d3f9ac2f9576 (diff)
Fix build without pkg-config support
Fix several issues in cmake/Find* in the code path that's hit when pkg-config is not used. Task-number: QTBUG-96401 Change-Id: Iac6af560976ba6408d877027ed44a0354d32d2b7 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 375d2c0ccb602df38ef8f49c5b3e0bf09c24bf46) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindGObject.cmake4
-rw-r--r--cmake/FindGStreamer.cmake4
2 files changed, 4 insertions, 4 deletions
diff --git a/cmake/FindGObject.cmake b/cmake/FindGObject.cmake
index dc207a2ca..19a8a678d 100644
--- a/cmake/FindGObject.cmake
+++ b/cmake/FindGObject.cmake
@@ -27,13 +27,13 @@ if(NOT TARGET GObject::GObject)
GLIB2::GLIB2
)
else()
- find_path(GGObject_INCLUDE_DIR
+ find_path(GObject_INCLUDE_DIR
NAMES gobject.h
PATH_SUFFIXES glib-2.0/gobject/
)
find_library(GObject_LIBRARY NAMES gobject-2.0)
if (GObject_LIBRARY AND GObject_INCLUDE_DIR)
- add_library(GObject::GObject IMPORTED)
+ add_library(GObject::GObject INTERFACE IMPORTED)
target_include_directories(GObject::GObject INTERFACE
${GObject_INCLUDE_DIR}
)
diff --git a/cmake/FindGStreamer.cmake b/cmake/FindGStreamer.cmake
index 0624c1a77..c3becd731 100644
--- a/cmake/FindGStreamer.cmake
+++ b/cmake/FindGStreamer.cmake
@@ -53,8 +53,8 @@ function(find_gstreamer_component component prefix header library)
endif()
if(GStreamer_${component}_LIBRARY AND GStreamer_${component}_INCLUDE_DIR)
add_library(GStreamer::${component} INTERFACE IMPORTED)
- target_include_directories(GStreamer::${component} INTERFACE GStreamer_${component}_INCLUDE_DIR)
- target_link_libraries(GStreamer::${component} INTERFACE GStreamer_${component}_LIBRARY)
+ target_include_directories(GStreamer::${component} INTERFACE ${GStreamer_${component}_INCLUDE_DIR})
+ target_link_libraries(GStreamer::${component} INTERFACE ${GStreamer_${component}_LIBRARY})
endif()
mark_as_advanced(GStreamer_${component}_INCLUDE_DIR GStreamer_${component}_LIBRARY)
endif()