blob: 1eb2a5214baf0c54c9398360cf2c25cf6cd08e0f (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
From 27dedd5c11194b4de4e6c205fdba8454d5be8823 Mon Sep 17 00:00:00 2001
From: Adel KARA SLIMANE <adel.ks@zegrapher.com>
Date: Mon, 30 Dec 2024 23:47:44 +0100
Subject: [PATCH] Sync with upstream plugin template
When installing on linux, currently the project has things
hard-coded in cmake to install to
- usr/dist/obs-multi-rtmp/data/locale for the translation files
- usr/dist/obs-multi-rtmp/bin/64bit/obs-multi-rtmp.so for
the shared library
Yet we want things to go to these two folders instead
- usr/share/obs/obs-plugins/obs-multi-rtmp/locale/
- usr/lib64/obs-plugins/obs-multi-rtmp.so
Use upstream template code [1] that enables using these vars
to decide where things get installed
- CMAKE_INSTALL_BINDIR
- CMAKE_INSTALL_LIBDIR
- CMAKE_INSTALL_DATAROOTDIR
[1] https://github.com/obsproject/obs-plugintemplate
---
cmake/common/buildspec_common.cmake | 4 ++--
cmake/linux/helpers.cmake | 30 ++++-------------------------
2 files changed, 6 insertions(+), 28 deletions(-)
diff --git a/cmake/common/buildspec_common.cmake b/cmake/common/buildspec_common.cmake
index b991e9d..b2c2414 100644
--- a/cmake/common/buildspec_common.cmake
+++ b/cmake/common/buildspec_common.cmake
@@ -90 +90 @@ function(_setup_obs_studio)
- COMMAND "${CMAKE_COMMAND}" --build build_${arch} --target obs-frontend-api --config RelWithDebInfo --parallel
+ COMMAND "${CMAKE_COMMAND}" --build build_${arch} --target obs-frontend-api --config Debug --parallel
@@ -103 +103 @@ function(_setup_obs_studio)
- COMMAND "${CMAKE_COMMAND}" --install build_${arch} --component Development --config RelWithDebInfo --prefix
+ COMMAND "${CMAKE_COMMAND}" --install build_${arch} --component Development --config Debug --prefix
diff --git a/cmake/linux/helpers.cmake b/cmake/linux/helpers.cmake
index 92974fd..e662f96 100644
--- a/cmake/linux/helpers.cmake
+++ b/cmake/linux/helpers.cmake
@@ -7,2 +6,0 @@ include(helpers_common)
-set(PLUGIN_FOLDER ${CMAKE_PROJECT_NAME})
-
@@ -29,13 +26,0 @@ function(set_target_properties_plugin target)
- # install(
- # TARGETS ${target}
- # RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
- # LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/obs-plugins)
-
- if (${CMAKE_SIZEOF_VOID_P} EQUAL 4)
- set(OBSARCHNAME "32bit")
- elseif (${CMAKE_SIZEOF_VOID_P} EQUAL 8)
- set(OBSARCHNAME "64bit")
- else ()
- message(FATAL_ERROR "Unsupport architecture")
- endif()
-
@@ -44,2 +29,2 @@ function(set_target_properties_plugin target)
- RUNTIME DESTINATION dist/${PLUGIN_FOLDER}/bin/${OBSARCHNAME}
- LIBRARY DESTINATION dist/${PLUGIN_FOLDER}/bin/${OBSARCHNAME})
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/obs-plugins)
@@ -82 +67 @@ function(target_install_resources target)
- DESTINATION dist/${PLUGIN_FOLDER}/data
+ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target}
@@ -91,3 +76 @@ function(target_add_resource target resource)
- # install(FILES "${resource}" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target})
-
- install(FILES "${resource}" DESTINATION dist/${PLUGIN_FOLDER}/data)
+ install(FILES "${resource}" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/obs/obs-plugins/${target})
|