mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
cmake: Add support for local Unix installs
This commit is contained in:
parent
cc9d3486b2
commit
c13b9c3641
1 changed files with 59 additions and 29 deletions
|
@ -175,6 +175,10 @@ else()
|
|||
set(CMAKE_PACKAGE_NAME "${PROJECT_NAME}" CACHE STRING "Name for the generated archives.")
|
||||
set(CMAKE_PACKAGE_SUFFIX_OVERRIDE "" CACHE STRING "Override for the suffix.")
|
||||
|
||||
if(UNIX)
|
||||
set(UNIX_LOCAL_STRUCTURE TRUE CACHE BOOL "Package for a local linux install.")
|
||||
endif()
|
||||
|
||||
if(NOT ${PropertyPrefix}OBS_DOWNLOAD)
|
||||
set(${PropertyPrefix}OBS_STUDIO_DIR "" CACHE PATH "OBS Studio Source/Package Directory")
|
||||
set(${PropertyPrefix}OBS_DEPENDENCIES_DIR "" CACHE PATH "OBS Studio Dependencies Directory")
|
||||
|
@ -887,6 +891,31 @@ endif()
|
|||
if(${PropertyPrefix}OBS_NATIVE)
|
||||
install_obs_plugin_with_data(${PROJECT_NAME} data)
|
||||
else()
|
||||
if(UNIX_LOCAL_STRUCTURE)
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "./plugins/${PROJECT_NAME}/bin/${BITS}bit/" COMPONENT Runtime
|
||||
LIBRARY DESTINATION "./plugins/${PROJECT_NAME}/bin/${BITS}bit/" COMPONENT Runtime
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY "data/"
|
||||
DESTINATION "./plugins/${PROJECT_NAME}/data/"
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
PACKAGE_7Z
|
||||
${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.7z" --format=7zip --
|
||||
"${CMAKE_INSTALL_PREFIX}/plugins/${PROJECT_NAME}"
|
||||
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
add_custom_target(
|
||||
PACKAGE_ZIP
|
||||
${CMAKE_COMMAND} -E tar cfv "${_PACKAGE_FULL_NAME}.zip" --format=zip --
|
||||
"${CMAKE_INSTALL_PREFIX}/plugins/${PROJECT_NAME}"
|
||||
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
else()
|
||||
install(
|
||||
TARGETS ${PROJECT_NAME}
|
||||
RUNTIME DESTINATION "./obs-plugins/${BITS}bit/" COMPONENT Runtime
|
||||
|
@ -919,6 +948,7 @@ else()
|
|||
"${CMAKE_INSTALL_PREFIX}/data"
|
||||
WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
cmake_policy(POP)
|
||||
|
|
Loading…
Reference in a new issue