File: 010_use-cmake.patch

package info (click to toggle)
obs-time-source 0.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: ansic: 200; makefile: 27; cpp: 16
file content (48 lines) | stat: -rw-r--r-- 1,853 bytes parent folder | download | duplicates (3)
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
43
44
45
46
47
48
Description: using CMake instead of Meson
             Commonly, plugins for OBS build with CMake. This plugin uses
             Meson, and it is there FTBFS in some architectures (arm64, armel,
             armhf, mips64el and s390x). This patch implements a CMakeLists.txt
             file to use CMake as a builder. Some tests were made over Debian,
             Alpine and Fedora and the issue causing the FTBFS is present only
             on Debian. The Meson finds the libobs, but fails to build using
             it. Maybe it can be something related to #998853.
Author: Joao Eriberto Mota Filho <eriberto@debian.org>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Forwarded: yes, to upstream's email ~krystianch/public-inbox@lists.sr.ht
Last-Update: 2023-11-13
Index: obs-time-source/CMakeLists.txt
===================================================================
--- /dev/null
+++ obs-time-source/CMakeLists.txt
@@ -0,0 +1,31 @@
+cmake_minimum_required(VERSION 3.18)
+
+project(time-source VERSION 0.2)
+set(PROJECT_FULL_NAME "Time Source")
+
+add_library(${PROJECT_NAME} MODULE)
+
+target_sources(${PROJECT_NAME} PRIVATE
+	time-source.c)
+
+find_package(libobs REQUIRED)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(PANGO REQUIRED pango)
+
+include_directories(${PANGO_INCLUDE_DIRS} ${PANGOCAIRO_INCLUDE_DIRS})
+
+target_link_libraries(${PROJECT_NAME}
+	OBS::libobs
+	${PANGO_LIBRARIES} ${PANGOCAIRO_LIBRARIES})
+
+if(NOT LIB_OUT_DIR)
+    set(LIB_OUT_DIR "/lib/obs-plugins")
+endif()
+if(NOT DATA_OUT_DIR)
+    set(DATA_OUT_DIR "/share/obs/obs-plugins/${PROJECT_NAME}")
+endif()
+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
+install(TARGETS ${PROJECT_NAME}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR})
+install(DIRECTORY data/locale
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATA_OUT_DIR})