File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,17 +52,6 @@ function(set_target_properties_plugin target)
5252 target_link_libraries (${target} PRIVATE plugin-support )
5353 endif ()
5454
55- add_custom_command (
56- TARGET ${target}
57- POST_BUILD
58- COMMAND "${CMAKE_COMMAND } " -E make_directory "${CMAKE_CURRENT_BINARY_DIR } /rundir/$<CONFIG >"
59- COMMAND
60- "${CMAKE_COMMAND } " -E copy_if_different "$<TARGET_FILE :${target} >"
61- "$<$<CONFIG :Debug ,RelWithDebInfo ,Release >:$<TARGET_PDB_FILE :${target} >>"
62- "${CMAKE_CURRENT_BINARY_DIR } /rundir/$<CONFIG >"
63- COMMENT "Copy ${target} to rundir"
64- VERBATIM )
65-
6655 target_install_resources (${target} )
6756
6857 get_target_property (target_sources ${target} SOURCES )
@@ -103,17 +92,19 @@ function(target_install_resources target)
10392
10493 install (
10594 DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR } /data/"
106- DESTINATION "${target} /data "
95+ DESTINATION "data/obs-plugins/ ${target} "
10796 USE_SOURCE_PERMISSIONS)
10897
109- add_custom_command (
110- TARGET ${target}
111- POST_BUILD
112- COMMAND "${CMAKE_COMMAND } " -E make_directory "${CMAKE_CURRENT_BINARY_DIR } /rundir/$<CONFIG >/${target} "
113- COMMAND "${CMAKE_COMMAND } " -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR } /data"
114- "${CMAKE_CURRENT_BINARY_DIR } /rundir/$<CONFIG >/${target} "
115- COMMENT "Copy ${target} resources to rundir"
116- VERBATIM )
98+ if (OBS_BUILD_DIR)
99+ add_custom_command (
100+ TARGET ${target}
101+ POST_BUILD
102+ COMMAND "${CMAKE_COMMAND } " -E make_directory "${OBS_BUILD_DIR} /data/obs-plugins/${target} "
103+ COMMAND "${CMAKE_COMMAND } " -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR } /data"
104+ "${OBS_BUILD_DIR} /data/obs-plugins/${target} "
105+ COMMENT "Copy ${target} resources to data directory"
106+ VERBATIM )
107+ endif ()
117108 endif ()
118109endfunction ()
119110
You can’t perform that action at this time.
0 commit comments