File: fix-building-gtk-example.patch

package info (click to toggle)
cppgir 2.0%2Bgit20240928.c8bb1c6%2Breally2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,228 kB
  • sloc: cpp: 14,307; ansic: 339; makefile: 11; sh: 9
file content (34 lines) | stat: -rw-r--r-- 1,577 bytes parent folder | download | duplicates (2)
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
Description: Link example-gtk against libgthread-2.0.
Author: Andrey Rakhmatullin <wrar@debian.org>
Last-Update: 2024-05-23

Index: cppgir-2.0/CMakeLists.txt
===================================================================
--- cppgir-2.0.orig/CMakeLists.txt
+++ cppgir-2.0/CMakeLists.txt
@@ -152,6 +152,7 @@ if (BUILD_EXAMPLES)
     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)
+    pkg_check_modules(GTHREAD gthread-2.0)
 endif ()
 
 ## TEST ##
@@ -263,7 +264,7 @@ if (GST_FOUND AND PLAIN_API)
         target_sources(example-gst PRIVATE ${GENSRC})
         set_property(SOURCE ${GENSRC} PROPERTY GENERATED true)
     endforeach ()
-    target_link_libraries(example-gst PRIVATE ${GST_LDFLAGS})
+    target_link_libraries(example-gst PRIVATE ${GST_LDFLAGS} ${GTHREAD_LIBRARIES})
     target_compile_options(example-gst PRIVATE ${GST_CFLAGS})
     # a lot of class methods are wrapped these days, so there is some overlap
     # however, no class implementation is used here, so arrange for suppression
@@ -281,7 +282,7 @@ endif ()
 if (GTK_FOUND AND PLAIN_API)
     add_executable(example-gtk EXCLUDE_FROM_ALL examples/gtk.cpp examples/gtk-obj.cpp)
     target_compile_options(example-gtk PRIVATE ${GTK_CFLAGS})
-    target_link_libraries(example-gtk PRIVATE ${GTK_LIBRARIES})
+    target_link_libraries(example-gtk PRIVATE ${GTK_LIBRARIES} ${GTHREAD_LIBRARIES})
     if (NEEDS_LARGE_GOT)
         set_property(SOURCE examples/gtk-obj.cpp APPEND PROPERTY COMPILE_OPTIONS "-mxgot")
     endif ()