|
@@ -1,11 +1,5 @@
|
|
|
# OBS CMake Windows helper functions module
|
|
|
|
|
|
-# cmake-format: off
|
|
|
-# cmake-lint: disable=C0103
|
|
|
-# cmake-lint: disable=R0912
|
|
|
-# cmake-lint: disable=R0915
|
|
|
-# cmake-format: on
|
|
|
-
|
|
|
include_guard(GLOBAL)
|
|
|
|
|
|
include(helpers_common)
|
|
@@ -32,14 +26,10 @@ function(set_target_properties_obs target)
|
|
|
elseif(target STREQUAL inject-helper OR target STREQUAL get-graphics-offsets)
|
|
|
set(OBS_EXECUTABLE_DESTINATION "${OBS_DATA_DESTINATION}/obs-plugins/win-capture")
|
|
|
|
|
|
- # cmake-format: off
|
|
|
_target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION} 32BIT)
|
|
|
- # cmake-format: on
|
|
|
endif()
|
|
|
|
|
|
- # cmake-format: off
|
|
|
_target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION})
|
|
|
- # cmake-format: on
|
|
|
|
|
|
if(target STREQUAL obs-studio)
|
|
|
get_property(obs_executables GLOBAL PROPERTY _OBS_EXECUTABLES)
|
|
@@ -47,7 +37,8 @@ function(set_target_properties_obs target)
|
|
|
add_dependencies(${target} ${obs_executables} ${obs_modules})
|
|
|
_bundle_dependencies(${target})
|
|
|
target_add_resource(${target} "${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS"
|
|
|
- "${OBS_DATA_DESTINATION}/obs-studio/authors")
|
|
|
+ "${OBS_DATA_DESTINATION}/obs-studio/authors"
|
|
|
+ )
|
|
|
elseif(target STREQUAL obs-browser-helper)
|
|
|
set_property(GLOBAL APPEND PROPERTY _OBS_EXECUTABLES ${target})
|
|
|
return()
|
|
@@ -57,19 +48,16 @@ function(set_target_properties_obs target)
|
|
|
elseif(target_type STREQUAL SHARED_LIBRARY)
|
|
|
set_target_properties(${target} PROPERTIES VERSION ${OBS_VERSION_MAJOR} SOVERSION ${OBS_VERSION_CANONICAL})
|
|
|
|
|
|
- # cmake-format: off
|
|
|
_target_install_obs(
|
|
|
${target}
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
|
|
LIBRARY_DESTINATION "${OBS_LIBRARY_DESTINATION}"
|
|
|
- HEADER_DESTINATION "${OBS_INCLUDE_DESTINATION}")
|
|
|
- # cmake-format: on
|
|
|
+ HEADER_DESTINATION "${OBS_INCLUDE_DESTINATION}"
|
|
|
+ )
|
|
|
elseif(target_type STREQUAL MODULE_LIBRARY)
|
|
|
set_target_properties(${target} PROPERTIES VERSION 0 SOVERSION ${OBS_VERSION_CANONICAL})
|
|
|
|
|
|
- if(target STREQUAL libobs-d3d11
|
|
|
- OR target STREQUAL libobs-opengl
|
|
|
- OR target STREQUAL libobs-winrt)
|
|
|
+ if(target STREQUAL libobs-d3d11 OR target STREQUAL libobs-opengl OR target STREQUAL libobs-winrt)
|
|
|
set(target_destination "${OBS_EXECUTABLE_DESTINATION}")
|
|
|
elseif(target STREQUAL "obspython" OR target STREQUAL "obslua")
|
|
|
set(target_destination "${OBS_SCRIPT_PLUGIN_DESTINATION}")
|
|
@@ -78,22 +66,16 @@ function(set_target_properties_obs target)
|
|
|
target_add_resource(graphics-hook "${CMAKE_CURRENT_SOURCE_DIR}/obs-vulkan64.json" "${target_destination}")
|
|
|
target_add_resource(graphics-hook "${CMAKE_CURRENT_SOURCE_DIR}/obs-vulkan32.json" "${target_destination}")
|
|
|
|
|
|
- # cmake-format: off
|
|
|
_target_install_obs(${target} DESTINATION ${target_destination} 32BIT)
|
|
|
- # cmake-format: on
|
|
|
elseif(target STREQUAL obs-virtualcam-module)
|
|
|
set(target_destination "${OBS_DATA_DESTINATION}/obs-plugins/win-dshow")
|
|
|
|
|
|
- # cmake-format: off
|
|
|
_target_install_obs(${target} DESTINATION ${target_destination} 32BIT)
|
|
|
- # cmake-format: on
|
|
|
else()
|
|
|
set(target_destination "${OBS_PLUGIN_DESTINATION}")
|
|
|
endif()
|
|
|
|
|
|
- # cmake-format: off
|
|
|
_target_install_obs(${target} DESTINATION ${target_destination})
|
|
|
- # cmake-format: on
|
|
|
|
|
|
if(${target} STREQUAL obspython)
|
|
|
add_custom_command(
|
|
@@ -101,14 +83,17 @@ function(set_target_properties_obs target)
|
|
|
POST_BUILD
|
|
|
COMMAND "${CMAKE_COMMAND}" -E echo "Add obspython import module"
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
|
|
- "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
|
|
- COMMENT "")
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
|
|
+ "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_SCRIPT_PLUGIN_DESTINATION}/"
|
|
|
+ COMMENT ""
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES "$<TARGET_FILE_DIR:obspython>/obspython.py"
|
|
|
DESTINATION "${OBS_SCRIPT_PLUGIN_DESTINATION}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
elseif(${target} STREQUAL obs-browser)
|
|
|
message(DEBUG "Add Chromium Embedded Framework to project for obs-browser plugin...")
|
|
|
if(TARGET CEF::Library)
|
|
@@ -130,29 +115,34 @@ function(set_target_properties_obs target)
|
|
|
"${CMAKE_COMMAND}" -E copy_if_different "${cef_root_location}/Resources/chrome_100_percent.pak"
|
|
|
"${cef_root_location}/Resources/chrome_200_percent.pak" "${cef_root_location}/Resources/icudtl.dat"
|
|
|
"${cef_root_location}/Resources/resources.pak" "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${cef_root_location}/Resources/locales"
|
|
|
- "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/locales"
|
|
|
- COMMENT "")
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E copy_directory "${cef_root_location}/Resources/locales"
|
|
|
+ "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/locales"
|
|
|
+ COMMENT ""
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
- FILES "${imported_location}"
|
|
|
- "${cef_location}/chrome_elf.dll"
|
|
|
- "${cef_location}/libEGL.dll"
|
|
|
- "${cef_location}/libGLESv2.dll"
|
|
|
- "${cef_location}/snapshot_blob.bin"
|
|
|
- "${cef_location}/v8_context_snapshot.bin"
|
|
|
- "${cef_root_location}/Resources/chrome_100_percent.pak"
|
|
|
- "${cef_root_location}/Resources/chrome_200_percent.pak"
|
|
|
- "${cef_root_location}/Resources/icudtl.dat"
|
|
|
- "${cef_root_location}/Resources/resources.pak"
|
|
|
+ FILES
|
|
|
+ "${imported_location}"
|
|
|
+ "${cef_location}/chrome_elf.dll"
|
|
|
+ "${cef_location}/libEGL.dll"
|
|
|
+ "${cef_location}/libGLESv2.dll"
|
|
|
+ "${cef_location}/snapshot_blob.bin"
|
|
|
+ "${cef_location}/v8_context_snapshot.bin"
|
|
|
+ "${cef_root_location}/Resources/chrome_100_percent.pak"
|
|
|
+ "${cef_root_location}/Resources/chrome_200_percent.pak"
|
|
|
+ "${cef_root_location}/Resources/icudtl.dat"
|
|
|
+ "${cef_root_location}/Resources/resources.pak"
|
|
|
DESTINATION "${target_destination}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
DIRECTORY "${cef_root_location}/Resources/locales"
|
|
|
DESTINATION "${target_destination}"
|
|
|
USE_SOURCE_PERMISSIONS
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
endif()
|
|
|
endif()
|
|
|
endif()
|
|
@@ -166,10 +156,7 @@ function(set_target_properties_obs target)
|
|
|
get_target_property(target_sources ${target} SOURCES)
|
|
|
set(target_ui_files ${target_sources})
|
|
|
list(FILTER target_ui_files INCLUDE REGEX ".+\\.(ui|qrc)")
|
|
|
- source_group(
|
|
|
- TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
- PREFIX "UI Files"
|
|
|
- FILES ${target_ui_files})
|
|
|
+ source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "UI Files" FILES ${target_ui_files})
|
|
|
|
|
|
if(${target} STREQUAL libobs)
|
|
|
set(target_source_files ${target_sources})
|
|
@@ -177,14 +164,8 @@ function(set_target_properties_obs target)
|
|
|
list(FILTER target_source_files INCLUDE REGEX ".+\\.(m|c[cp]?p?|swift)")
|
|
|
list(FILTER target_header_files INCLUDE REGEX ".+\\.h(pp)?")
|
|
|
|
|
|
- source_group(
|
|
|
- TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
- PREFIX "Source Files"
|
|
|
- FILES ${target_source_files})
|
|
|
- source_group(
|
|
|
- TREE "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
- PREFIX "Header Files"
|
|
|
- FILES ${target_header_files})
|
|
|
+ source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${target_source_files})
|
|
|
+ source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${target_header_files})
|
|
|
endif()
|
|
|
endfunction()
|
|
|
|
|
@@ -214,7 +195,8 @@ function(_target_install_obs target)
|
|
|
FILES "${32bit_project_path}/$<CONFIG>/${target}32.${suffix}"
|
|
|
DESTINATION "${_TIO_DESTINATION}"
|
|
|
COMPONENT Runtime
|
|
|
- OPTIONAL)
|
|
|
+ OPTIONAL
|
|
|
+ )
|
|
|
else()
|
|
|
set(target_file "$<TARGET_FILE:${target}>")
|
|
|
set(target_pdb_file "$<TARGET_PDB_FILE:${target}>")
|
|
@@ -233,19 +215,14 @@ function(_target_install_obs target)
|
|
|
install(
|
|
|
TARGETS ${target}
|
|
|
RUNTIME DESTINATION "${_TIO_DESTINATION}"
|
|
|
- LIBRARY DESTINATION "${_TIO_LIBRARY_DESTINATION}"
|
|
|
- COMPONENT Runtime
|
|
|
- EXCLUDE_FROM_ALL
|
|
|
- PUBLIC_HEADER
|
|
|
- DESTINATION "${_TIO_HEADER_DESTINATION}"
|
|
|
- COMPONENT Development
|
|
|
- EXCLUDE_FROM_ALL)
|
|
|
+ LIBRARY DESTINATION "${_TIO_LIBRARY_DESTINATION}" COMPONENT Runtime EXCLUDE_FROM_ALL
|
|
|
+ PUBLIC_HEADER DESTINATION "${_TIO_HEADER_DESTINATION}" COMPONENT Development EXCLUDE_FROM_ALL
|
|
|
+ )
|
|
|
elseif(target_type STREQUAL MODULE_LIBRARY)
|
|
|
install(
|
|
|
TARGETS ${target}
|
|
|
- LIBRARY DESTINATION "${_TIO_DESTINATION}"
|
|
|
- COMPONENT Runtime
|
|
|
- NAMELINK_COMPONENT Development)
|
|
|
+ LIBRARY DESTINATION "${_TIO_DESTINATION}" COMPONENT Runtime NAMELINK_COMPONENT Development
|
|
|
+ )
|
|
|
endif()
|
|
|
endif()
|
|
|
|
|
@@ -255,17 +232,20 @@ function(_target_install_obs target)
|
|
|
COMMAND "${CMAKE_COMMAND}" -E echo "${comment}"
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
|
|
COMMAND "${CMAKE_COMMAND}" -E copy ${target_file} "${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E $<IF:$<CONFIG:Debug,RelWithDebInfo,Release>,copy,true> ${target_pdb_file}
|
|
|
- "${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E $<IF:$<CONFIG:Debug,RelWithDebInfo,Release>,copy,true> ${target_pdb_file}
|
|
|
+ "${OBS_OUTPUT_DIR}/$<CONFIG>/${_TIO_DESTINATION}"
|
|
|
COMMENT ""
|
|
|
- VERBATIM)
|
|
|
+ VERBATIM
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES ${target_pdb_file}
|
|
|
CONFIGURATIONS RelWithDebInfo Debug Release
|
|
|
DESTINATION "${_TIO_DESTINATION}"
|
|
|
COMPONENT Runtime
|
|
|
- OPTIONAL)
|
|
|
+ OPTIONAL
|
|
|
+ )
|
|
|
endfunction()
|
|
|
|
|
|
# target_export: Helper function to export target as CMake package
|
|
@@ -281,7 +261,8 @@ function(target_export target)
|
|
|
CONFIGURATIONS RelWithDebInfo Debug Release
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
|
|
COMPONENT Development
|
|
|
- OPTIONAL)
|
|
|
+ OPTIONAL
|
|
|
+ )
|
|
|
endif()
|
|
|
endfunction()
|
|
|
|
|
@@ -291,8 +272,12 @@ function(target_install_resources target)
|
|
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
|
|
|
file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
|
|
|
foreach(data_file IN LISTS data_files)
|
|
|
- cmake_path(RELATIVE_PATH data_file BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/" OUTPUT_VARIABLE
|
|
|
- relative_path)
|
|
|
+ cmake_path(
|
|
|
+ RELATIVE_PATH
|
|
|
+ data_file
|
|
|
+ BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
|
|
+ OUTPUT_VARIABLE relative_path
|
|
|
+ )
|
|
|
cmake_path(GET relative_path PARENT_PATH relative_path)
|
|
|
target_sources(${target} PRIVATE "${data_file}")
|
|
|
source_group("Resources/${relative_path}" FILES "${data_file}")
|
|
@@ -311,17 +296,20 @@ function(target_install_resources target)
|
|
|
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
|
|
DESTINATION "${target_destination}"
|
|
|
USE_SOURCE_PERMISSIONS
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
|
|
|
add_custom_command(
|
|
|
TARGET ${target}
|
|
|
POST_BUILD
|
|
|
COMMAND "${CMAKE_COMMAND}" -E echo "Copy ${target} resources to data directory"
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data"
|
|
|
- "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/data"
|
|
|
+ "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}"
|
|
|
COMMENT ""
|
|
|
- VERBATIM)
|
|
|
+ VERBATIM
|
|
|
+ )
|
|
|
endif()
|
|
|
endfunction()
|
|
|
|
|
@@ -340,10 +328,7 @@ function(target_add_resource target resource)
|
|
|
|
|
|
message(DEBUG "Add resource '${resource}' to target ${target} at destination '${target_destination}'...")
|
|
|
|
|
|
- install(
|
|
|
- FILES "${resource}"
|
|
|
- DESTINATION "${target_destination}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ install(FILES "${resource}" DESTINATION "${target_destination}" COMPONENT Runtime)
|
|
|
|
|
|
add_custom_command(
|
|
|
TARGET ${target}
|
|
@@ -352,7 +337,8 @@ function(target_add_resource target resource)
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
|
|
COMMAND "${CMAKE_COMMAND}" -E copy "${resource}" "${OBS_OUTPUT_DIR}/$<CONFIG>/${target_destination}/"
|
|
|
COMMENT ""
|
|
|
- VERBATIM)
|
|
|
+ VERBATIM
|
|
|
+ )
|
|
|
|
|
|
source_group("Resources" FILES "${resource}")
|
|
|
endfunction()
|
|
@@ -417,43 +403,51 @@ function(_bundle_dependencies target)
|
|
|
POST_BUILD
|
|
|
COMMAND "${CMAKE_COMMAND}" -E echo "Copy dependencies to binary directory (${OBS_EXECUTABLE_DESTINATION})..."
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>"
|
|
|
- "$<$<CONFIG:Debug>:${library_paths_DEBUG}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>" "$<$<CONFIG:Debug>:${library_paths_DEBUG}>"
|
|
|
+ "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
|
|
COMMAND
|
|
|
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:RelWithDebInfo>,copy_if_different,true>"
|
|
|
"$<$<CONFIG:RelWithDebInfo>:${library_paths_RELWITHDEBINFO}>"
|
|
|
"${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Release>,copy_if_different,true>"
|
|
|
- "$<$<CONFIG:Release>:${library_paths_RELEASE}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Release>,copy_if_different,true>"
|
|
|
+ "$<$<CONFIG:Release>:${library_paths_RELEASE}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
|
|
COMMAND
|
|
|
"${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:MinSizeRel>,copy_if_different,true>"
|
|
|
"$<$<CONFIG:MinSizeRel>:${library_paths_MINSIZEREL}>" "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}"
|
|
|
COMMENT "."
|
|
|
- VERBATIM COMMAND_EXPAND_LISTS)
|
|
|
+ VERBATIM
|
|
|
+ COMMAND_EXPAND_LISTS
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES ${library_paths_DEBUG}
|
|
|
CONFIGURATIONS Debug
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES ${library_paths_RELWITHDEBINFO}
|
|
|
CONFIGURATIONS RelWithDebInfo
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES ${library_paths_RELEASE}
|
|
|
CONFIGURATIONS Release
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES ${library_paths_MINSIZEREL}
|
|
|
CONFIGURATIONS MinSizeRel
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
|
|
|
list(REMOVE_DUPLICATES plugins_list)
|
|
|
foreach(plugin IN LISTS plugins_list)
|
|
@@ -478,27 +472,33 @@ function(_bundle_dependencies target)
|
|
|
add_custom_command(
|
|
|
TARGET ${target}
|
|
|
POST_BUILD
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E echo
|
|
|
- "Copy Qt plugins ${stem} to binary directory (${OBS_EXECUTABLE_DESTINATION}/${stem})"
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E echo "Copy Qt plugins ${stem} to binary directory (${OBS_EXECUTABLE_DESTINATION}/${stem})"
|
|
|
COMMAND "${CMAKE_COMMAND}" -E make_directory "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>" "${plugin_list_debug}"
|
|
|
- "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
|
|
- COMMAND "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,true,copy_if_different>" "${plugin_list}"
|
|
|
- "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,copy_if_different,true>" "${plugin_list_debug}"
|
|
|
+ "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
|
|
+ COMMAND
|
|
|
+ "${CMAKE_COMMAND}" -E "$<IF:$<CONFIG:Debug>,true,copy_if_different>" "${plugin_list}"
|
|
|
+ "${OBS_OUTPUT_DIR}/$<CONFIG>/${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
|
|
COMMENT ""
|
|
|
- VERBATIM COMMAND_EXPAND_LISTS)
|
|
|
+ VERBATIM
|
|
|
+ COMMAND_EXPAND_LISTS
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES ${plugin_list_debug}
|
|
|
CONFIGURATIONS Debug
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
|
|
|
install(
|
|
|
FILES ${plugin_list}
|
|
|
CONFIGURATIONS RelWithDebInfo Release MinSizeRel
|
|
|
DESTINATION "${OBS_EXECUTABLE_DESTINATION}/${stem}"
|
|
|
- COMPONENT Runtime)
|
|
|
+ COMPONENT Runtime
|
|
|
+ )
|
|
|
endforeach()
|
|
|
endfunction()
|
|
|
|
|
@@ -515,17 +515,9 @@ macro(_check_library_location location)
|
|
|
string(REPLACE ".lib" ".dll" _dll_name "${_dll_name}")
|
|
|
string(REPLACE ".dll" ".pdb" _pdb_name "${_dll_name}")
|
|
|
|
|
|
- find_program(
|
|
|
- _dll_path
|
|
|
- NAMES "${_dll_name}"
|
|
|
- HINTS ${_implib_path} ${_bin_path} NO_CACHE
|
|
|
- NO_DEFAULT_PATH)
|
|
|
-
|
|
|
- find_program(
|
|
|
- _pdb_path
|
|
|
- NAMES "${_pdb_name}"
|
|
|
- HINTS ${_implib_path} ${_bin_path} NO_CACHE
|
|
|
- NO_DEFAULT_PATH)
|
|
|
+ find_program(_dll_path NAMES "${_dll_name}" HINTS ${_implib_path} ${_bin_path} NO_CACHE NO_DEFAULT_PATH)
|
|
|
+
|
|
|
+ find_program(_pdb_path NAMES "${_pdb_name}" HINTS ${_implib_path} ${_bin_path} NO_CACHE NO_DEFAULT_PATH)
|
|
|
|
|
|
if(_dll_path)
|
|
|
set(library_location "${_dll_path}")
|