mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
Improve additional_install_files for debug/release
This improves dependency copying and adds separated debug/release install files.
This commit is contained in:
parent
fbf4d18399
commit
5c597102f2
8
additional_install_files/.gitignore
vendored
8
additional_install_files/.gitignore
vendored
@ -2,7 +2,15 @@
|
|||||||
!.gitignore
|
!.gitignore
|
||||||
!data/
|
!data/
|
||||||
!exec32/
|
!exec32/
|
||||||
|
!exec32r/
|
||||||
|
!exec32d/
|
||||||
!exec64/
|
!exec64/
|
||||||
|
!exec64r/
|
||||||
|
!exec64d/
|
||||||
!libs32/
|
!libs32/
|
||||||
|
!libs32r/
|
||||||
|
!libs32d/
|
||||||
!libs64/
|
!libs64/
|
||||||
|
!libs64r/
|
||||||
|
!libs64d/
|
||||||
!misc/
|
!misc/
|
||||||
|
2
additional_install_files/exec32d/.gitignore
vendored
Normal file
2
additional_install_files/exec32d/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec32r/.gitignore
vendored
Normal file
2
additional_install_files/exec32r/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec64d/.gitignore
vendored
Normal file
2
additional_install_files/exec64d/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/exec64r/.gitignore
vendored
Normal file
2
additional_install_files/exec64r/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs32d/.gitignore
vendored
Normal file
2
additional_install_files/libs32d/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs32r/.gitignore
vendored
Normal file
2
additional_install_files/libs32r/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs64d/.gitignore
vendored
Normal file
2
additional_install_files/libs64d/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
2
additional_install_files/libs64r/.gitignore
vendored
Normal file
2
additional_install_files/libs64r/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
@ -4,6 +4,10 @@
|
|||||||
# LIBAVCODEC_INCLUDE_DIRS
|
# LIBAVCODEC_INCLUDE_DIRS
|
||||||
# LIBAVCODEC_LIBRARIES
|
# LIBAVCODEC_LIBRARIES
|
||||||
#
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# FFMPEG_INCLUDE_DIR
|
||||||
|
#
|
||||||
|
|
||||||
if(LIBAVCODEC_INCLUDE_DIRS AND LIBAVCODEC_LIBRARIES)
|
if(LIBAVCODEC_INCLUDE_DIRS AND LIBAVCODEC_LIBRARIES)
|
||||||
set(LIBAVCODEC_FOUND TRUE)
|
set(LIBAVCODEC_FOUND TRUE)
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
# LIBFDK_INCLUDE_DIRS
|
# LIBFDK_INCLUDE_DIRS
|
||||||
# LIBFDK_LIBRARIES
|
# LIBFDK_LIBRARIES
|
||||||
#
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# Libfdk_INCLUDE_DIR
|
||||||
|
#
|
||||||
|
|
||||||
if(LIBFDK_INCLUDE_DIRS AND LIBFDK_LIBRARIES)
|
if(LIBFDK_INCLUDE_DIRS AND LIBFDK_LIBRARIES)
|
||||||
set(LIBFDK_FOUND TRUE)
|
set(LIBFDK_FOUND TRUE)
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
# LIBX264_INCLUDE_DIRS
|
# LIBX264_INCLUDE_DIRS
|
||||||
# LIBX264_LIBRARIES
|
# LIBX264_LIBRARIES
|
||||||
#
|
#
|
||||||
|
# For use in OBS:
|
||||||
|
#
|
||||||
|
# X264_INCLUDE_DIR
|
||||||
|
#
|
||||||
|
|
||||||
if(LIBX264_INCLUDE_DIRS AND LIBX264_LIBRARIES)
|
if(LIBX264_INCLUDE_DIRS AND LIBX264_LIBRARIES)
|
||||||
set(LIBX264_FOUND TRUE)
|
set(LIBX264_FOUND TRUE)
|
||||||
|
@ -91,11 +91,14 @@ function(obs_generate_multiarch_installer)
|
|||||||
USE_SOURCE_PERMISSIONS)
|
USE_SOURCE_PERMISSIONS)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(obs_helper_copy_dir target source dest)
|
function(obs_helper_copy_dir target target_configs source dest)
|
||||||
add_custom_command(TARGET ${target} POST_BUILD
|
add_custom_command(TARGET ${target} POST_BUILD
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy_directory
|
COMMAND "${CMAKE_COMMAND}"
|
||||||
"${source}"
|
"-DCONFIG=$<CONFIGURATION>"
|
||||||
"${dest}"
|
"-DTARGET_CONFIGS=${target_configs}"
|
||||||
|
"-DINPUT=${source}"
|
||||||
|
"-DOUTPUT=${dest}"
|
||||||
|
-P "${CMAKE_SOURCE_DIR}/cmake/copy_helper.cmake"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
@ -137,6 +140,48 @@ function(obs_install_additional maintarget)
|
|||||||
DESTINATION "${OBS_EXECUTABLE64_DESTINATION}"
|
DESTINATION "${OBS_EXECUTABLE64_DESTINATION}"
|
||||||
USE_SOURCE_PERMISSIONS
|
USE_SOURCE_PERMISSIONS
|
||||||
PATTERN ".gitignore" EXCLUDE)
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs32d/"
|
||||||
|
DESTINATION "${OBS_LIBRARY32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec32d/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/libs64d/"
|
||||||
|
DESTINATION "${OBS_LIBRARY64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec64d/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs32r/"
|
||||||
|
DESTINATION "${OBS_LIBRARY32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec32r/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE32_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/libs64r/"
|
||||||
|
DESTINATION "${OBS_LIBRARY64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec64r/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE64_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
else()
|
else()
|
||||||
install(DIRECTORY "${addfdir}/libs${_lib_suffix}/"
|
install(DIRECTORY "${addfdir}/libs${_lib_suffix}/"
|
||||||
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
@ -146,17 +191,55 @@ function(obs_install_additional maintarget)
|
|||||||
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||||
USE_SOURCE_PERMISSIONS
|
USE_SOURCE_PERMISSIONS
|
||||||
PATTERN ".gitignore" EXCLUDE)
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs${_lib_suffix}d/"
|
||||||
|
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec${_lib_suffix}d/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Debug
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
|
||||||
|
install(DIRECTORY "${addfdir}/libs${_lib_suffix}r/"
|
||||||
|
DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
|
install(DIRECTORY "${addfdir}/exec${_lib_suffix}r/"
|
||||||
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
||||||
|
USE_SOURCE_PERMISSIONS
|
||||||
|
CONFIGURATIONS Release RelWithDebInfo MinSizeRel
|
||||||
|
PATTERN ".gitignore" EXCLUDE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
obs_helper_copy_dir(${maintarget}
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
"${addfdir}/misc/"
|
"${addfdir}/misc/"
|
||||||
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/")
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/")
|
||||||
obs_helper_copy_dir(${maintarget}
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
"${addfdir}/data/"
|
"${addfdir}/data/"
|
||||||
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_DATA_DESTINATION}/")
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_DATA_DESTINATION}/")
|
||||||
obs_helper_copy_dir(${maintarget}
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
|
"${addfdir}/libs${_lib_suffix}/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_LIBRARY_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} ALL
|
||||||
"${addfdir}/exec${_lib_suffix}/"
|
"${addfdir}/exec${_lib_suffix}/"
|
||||||
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_EXECUTABLE_DESTINATION}/")
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_EXECUTABLE_DESTINATION}/")
|
||||||
|
|
||||||
|
obs_helper_copy_dir(${maintarget} "Release;MinSizeRel;RelWithDebInfo"
|
||||||
|
"${addfdir}/exec${_lib_suffix}r/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_EXECUTABLE_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} "Debug"
|
||||||
|
"${addfdir}/exec${_lib_suffix}d/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_EXECUTABLE_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} "Release;MinSizeRel;RelWithDebInfo"
|
||||||
|
"${addfdir}/libs${_lib_suffix}r/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_LIBRARY_DESTINATION}/")
|
||||||
|
obs_helper_copy_dir(${maintarget} "Debug"
|
||||||
|
"${addfdir}/libs${_lib_suffix}d/"
|
||||||
|
"${CMAKE_BINARY_DIR}/rundir/$<CONFIGURATION>/${OBS_LIBRARY_DESTINATION}/")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
macro(export_obs_core target exportname)
|
macro(export_obs_core target exportname)
|
||||||
|
17
cmake/copy_helper.cmake
Normal file
17
cmake/copy_helper.cmake
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
if(NOT EXISTS "${INPUT}")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(_do_pass FALSE)
|
||||||
|
foreach(target ${TARGET_CONFIGS})
|
||||||
|
if(target STREQUAL "${CONFIG}" OR target STREQUAL "ALL")
|
||||||
|
set(_do_pass TRUE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(NOT _do_pass)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(COPY "${INPUT}" DESTINATION "${OUTPUT}")
|
Loading…
Reference in New Issue
Block a user