summaryrefslogtreecommitdiff
path: root/dev-cpp/cppgir/files/cppgir-0_p20230606-prevent-automagic.patch
blob: 8bb3ab5c4496776a256169d6fa5d8fa062eabd5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Remove checks for libraries that are completely unnecessary

--- cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e.orig/CMakeLists.txt
+++ cppgir-960fe054ffaab7cf55722fea6094c56a8ee8f18e/CMakeLists.txt
@@ -79,15 +79,14 @@
 find_package(expected-lite REQUIRED)
 target_link_libraries(gi PUBLIC expected-lite)
 
-include(FindPkgConfig)
-pkg_check_modules(GOBJECT gobject-2.0)
-pkg_check_modules(GIO gio-2.0 gio-unix-2.0)
-pkg_check_modules(GST gstreamer-1.0)
-pkg_check_modules(GTK gtk+-3.0)
+if (BUILD_TESTING)
+    include(FindPkgConfig REQUIRED)
+    pkg_check_modules(GOBJECT gobject-2.0 REQUIRED)
+endif()
 
 ## TEST ##
 
-if (BUILD_TESTING AND GOBJECT_FOUND)
+if (BUILD_TESTING)
     add_executable(gi-test test/main.cpp
         test/test_object.c test/test_object.h test/test_boxed.c test/test_boxed.h)
     target_include_directories(gi-test PRIVATE "gi" "override")
@@ -113,7 +112,7 @@
 set(EXAMPLE_TARGETS "")
 set(EXAMPLE_NS "")
 
-if (GOBJECT_FOUND)
+if (FALSE)
     add_executable(example-gobject EXCLUDE_FROM_ALL examples/gobject.cpp)
     target_compile_options(example-gobject PRIVATE ${GOBJECT_CFLAGS})
     target_link_libraries(example-gobject PRIVATE ${GOBJECT_LDFLAGS})
@@ -179,7 +178,6 @@
 endif ()
 
 # optional Qt example
-find_package(Qt5Core 5.9)
 if (Qt5Core_FOUND AND GIO_FOUND)
     set(CMAKE_INCLUDE_CURRENT_DIR ON)
     add_executable(example-gio-qt-async EXCLUDE_FROM_ALL examples/gio-qt-async.cpp)