Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
obs-studio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yunxiang Li
obs-studio
Commits
351c4bfe
Commit
351c4bfe
authored
11 years ago
by
Palana
Browse files
Options
Downloads
Patches
Plain Diff
add cmake plugin helpers
parent
1b555c1c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/obs_helpers.cmake
+45
-0
45 additions, 0 deletions
cmake/obs_helpers.cmake
obs/CMakeLists.txt
+1
-0
1 addition, 0 deletions
obs/CMakeLists.txt
test/test-input/CMakeLists.txt
+4
-3
4 additions, 3 deletions
test/test-input/CMakeLists.txt
with
50 additions
and
3 deletions
cmake/obs_helpers.cmake
+
45
−
0
View file @
351c4bfe
...
@@ -41,6 +41,51 @@ function(obs_add_core_lib_target target)
...
@@ -41,6 +41,51 @@ function(obs_add_core_lib_target target)
endforeach
()
endforeach
()
endfunction
()
endfunction
()
set
(
OBS_PLUGINS
""
CACHE INTERNAL
"obs plugins"
)
set
(
OBS_PLUGIN_TARGETS
""
CACHE INTERNAL
"obs plugin targets"
)
function
(
obs_add_plugin plugin
)
get_property
(
location TARGET
${
plugin
}
PROPERTY LOCATION
)
list
(
APPEND OBS_PLUGINS
${
location
}
)
set
(
OBS_PLUGINS
${
OBS_PLUGINS
}
CACHE INTERNAL
""
)
get_filename_component
(
filename
${
location
}
NAME
)
foreach
(
target
${
OBS_PLUGIN_TARGETS
}
)
get_property
(
tar_location TARGET
${
target
}
PROPERTY LOCATION
)
get_filename_component
(
dir
${
tar_location
}
DIRECTORY
)
add_custom_command
(
TARGET
${
target
}
POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
location
}
"
${
dir
}
/../plugins/"
)
set_property
(
DIRECTORY
${
dir
}
APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
"
${
dir
}
/../plugins/
${
filename
}
"
)
endforeach
()
endfunction
()
function
(
obs_add_plugin_target target
)
list
(
APPEND OBS_CORE_LIB_DIRS
${
target
}
)
set
(
OBS_PLUGIN_TARGETS
${
OBS_PLUGIN_TARGETS
}
CACHE INTERNAL
""
)
get_property
(
tar_location TARGET
${
target
}
PROPERTY LOCATION
)
get_filename_component
(
dir
${
tar_location
}
DIRECTORY
)
add_custom_command
(
TARGET
${
target
}
POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
"
${
dir
}
/../plugins/"
)
foreach
(
plugin
${
OBS_PLUGINS
}
)
get_filename_component
(
filename
${
plugin
}
NAME
)
add_custom_command
(
TARGET
${
target
}
POST_BUILD
COMMAND
${
CMAKE_COMMAND
}
-E copy
${
plugin
}
"
${
dir
}
/../plugins/"
)
set_property
(
DIRECTORY APPEND PROPERTY
ADDITIONAL_MAKE_CLEAN_FILES
"
${
dir
}
/../plugins/
${
filename
}
"
)
endforeach
()
endfunction
()
set
(
OBS_DATA_DIRS
""
CACHE INTERNAL
"data_dirs"
)
set
(
OBS_DATA_DIRS
""
CACHE INTERNAL
"data_dirs"
)
set
(
OBS_DATA_SOURCES
""
CACHE INTERNAL
"source_dirs"
)
set
(
OBS_DATA_SOURCES
""
CACHE INTERNAL
"source_dirs"
)
...
...
This diff is collapsed.
Click to expand it.
obs/CMakeLists.txt
+
1
−
0
View file @
351c4bfe
...
@@ -102,6 +102,7 @@ if(APPLE)
...
@@ -102,6 +102,7 @@ if(APPLE)
MACOSX_BUNDLE
${
BUILD_APP_BUNDLE
}
)
MACOSX_BUNDLE
${
BUILD_APP_BUNDLE
}
)
if
(
BUILD_APP_BUNDLE
)
if
(
BUILD_APP_BUNDLE
)
obs_add_core_lib_target
(
obs
)
obs_add_core_lib_target
(
obs
)
obs_add_plugin_target
(
obs
)
obs_add_data_dir
(
/bin/obs.app/Contents/
)
obs_add_data_dir
(
/bin/obs.app/Contents/
)
endif
()
endif
()
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
test/test-input/CMakeLists.txt
+
4
−
3
View file @
351c4bfe
...
@@ -8,7 +8,8 @@ add_library(test-input MODULE
...
@@ -8,7 +8,8 @@ add_library(test-input MODULE
target_link_libraries
(
test-input
target_link_libraries
(
test-input
libobs
)
libobs
)
file
(
COPY
obs_add_plugin
(
test-input
)
obs_add_data_source
(
/data/obs-plugins/test-input/
${
obs_SOURCE_DIR
}
/build/data/obs-plugins/test-input/draw.effect
${
obs_SOURCE_DIR
}
/build/data/obs-plugins/test-input/draw.effect
${
obs_SOURCE_DIR
}
/build/data/obs-plugins/test-input/test.effect
${
obs_SOURCE_DIR
}
/build/data/obs-plugins/test-input/test.effect
)
DESTINATION
${
obs_BINARY_DIR
}
/data/obs-plugins/test-input/
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment