Skip to content
Snippets Groups Projects
Commit 221a6929 authored by BtbN's avatar BtbN
Browse files

Add a new install function to install targets into the datadir structure

This is mainly intended to be used for preloaded/injected DLLs, which
don't belong into the libdir or plugindir.
parent acab80cb
No related branches found
No related tags found
No related merge requests found
...@@ -232,6 +232,25 @@ macro(install_obs_data target datadir datadest) ...@@ -232,6 +232,25 @@ macro(install_obs_data target datadir datadest)
endif() endif()
endmacro() endmacro()
macro(install_obs_datatarget target datadest)
install(TARGETS ${target}
LIBRARY DESTINATION "${OBS_DATA_DESTINATION}/${datadest}"
RUNTIME DESTINATION "${OBS_DATA_DESTINATION}/${datadest}")
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:${target}>"
"${OBS_OUTPUT_DIR}/$<CONFIGURATION>/data/${datadest}/$<TARGET_FILE_NAME:${target}>"
VERBATIM)
if(DEFINED ENV{obsInstallerTempDir})
add_custom_command(TARGET ${target} POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy
"$<TARGET_FILE:${target}>"
"$ENV{obsInstallerTempDir}/${OBS_DATA_DESTINATION}/${datadest}/$<TARGET_FILE_NAME:${target}>"
VERBATIM)
endif()
endmacro()
macro(install_obs_plugin_data target datadir) macro(install_obs_plugin_data target datadir)
install_obs_plugin(${target}) install_obs_plugin(${target})
install_obs_data(${target} "${datadir}" "obs-plugins/${target}") install_obs_data(${target} "${datadir}" "obs-plugins/${target}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment