修复了编译问题,去掉了x86这样的编译选项
This commit is contained in:
parent
c7130cbb07
commit
5cb2875ba6
@ -23,25 +23,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME)
|
|||||||
RESULT_VARIABLE _process_result
|
RESULT_VARIABLE _process_result
|
||||||
COMMAND_ERROR_IS_FATAL ANY
|
COMMAND_ERROR_IS_FATAL ANY
|
||||||
)
|
)
|
||||||
execute_process(
|
|
||||||
COMMAND
|
|
||||||
"${CMAKE_COMMAND}" -S ${CMAKE_CURRENT_SOURCE_DIR} -B ${CMAKE_SOURCE_DIR}/build_x86 -A
|
|
||||||
"Win32,version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}" -G "${CMAKE_GENERATOR}"
|
|
||||||
-DCMAKE_SYSTEM_VERSION:STRING='${CMAKE_SYSTEM_VERSION}' -DVIRTUALCAM_GUID:STRING=${VIRTUALCAM_GUID}
|
|
||||||
-DCMAKE_MESSAGE_LOG_LEVEL:STRING=${CMAKE_MESSAGE_LOG_LEVEL} -DOBS_PARENT_ARCHITECTURE:STRING=ARM64
|
|
||||||
RESULT_VARIABLE _process_result
|
|
||||||
COMMAND_ERROR_IS_FATAL ANY
|
|
||||||
)
|
|
||||||
elseif(OBS_PARENT_ARCHITECTURE STREQUAL x64)
|
|
||||||
execute_process(
|
|
||||||
COMMAND
|
|
||||||
"${CMAKE_COMMAND}" -S ${CMAKE_CURRENT_SOURCE_DIR} -B ${CMAKE_SOURCE_DIR}/build_x86 -A
|
|
||||||
"Win32,version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}" -G "${CMAKE_GENERATOR}"
|
|
||||||
-DCMAKE_SYSTEM_VERSION:STRING='${CMAKE_SYSTEM_VERSION}' -DVIRTUALCAM_GUID:STRING=${VIRTUALCAM_GUID}
|
|
||||||
-DCMAKE_MESSAGE_LOG_LEVEL:STRING=${CMAKE_MESSAGE_LOG_LEVEL} -DOBS_PARENT_ARCHITECTURE:STRING=x64
|
|
||||||
RESULT_VARIABLE _process_result
|
|
||||||
COMMAND_ERROR_IS_FATAL ANY
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
# target_disable_feature: Stub macro for child architecture builds
|
# target_disable_feature: Stub macro for child architecture builds
|
||||||
|
|||||||
@ -26,8 +26,6 @@ function(set_target_properties_obs target)
|
|||||||
elseif(target STREQUAL inject-helper OR target STREQUAL get-graphics-offsets)
|
elseif(target STREQUAL inject-helper OR target STREQUAL get-graphics-offsets)
|
||||||
set(OBS_EXECUTABLE_DESTINATION "${OBS_DATA_DESTINATION}/obs-plugins/win-capture")
|
set(OBS_EXECUTABLE_DESTINATION "${OBS_DATA_DESTINATION}/obs-plugins/win-capture")
|
||||||
|
|
||||||
_target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION} x86)
|
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64)
|
if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64)
|
||||||
_target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION} x64)
|
_target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION} x64)
|
||||||
endif()
|
endif()
|
||||||
@ -70,16 +68,12 @@ 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-vulkan64.json" "${target_destination}")
|
||||||
target_add_resource(graphics-hook "${CMAKE_CURRENT_SOURCE_DIR}/obs-vulkan32.json" "${target_destination}")
|
target_add_resource(graphics-hook "${CMAKE_CURRENT_SOURCE_DIR}/obs-vulkan32.json" "${target_destination}")
|
||||||
|
|
||||||
_target_install_obs(${target} DESTINATION ${target_destination} x86)
|
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64)
|
if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64)
|
||||||
_target_install_obs(${target} DESTINATION ${target_destination} x64)
|
_target_install_obs(${target} DESTINATION ${target_destination} x64)
|
||||||
endif()
|
endif()
|
||||||
elseif(target STREQUAL obs-virtualcam-module)
|
elseif(target STREQUAL obs-virtualcam-module)
|
||||||
set(target_destination "${OBS_DATA_DESTINATION}/obs-plugins/win-dshow")
|
set(target_destination "${OBS_DATA_DESTINATION}/obs-plugins/win-dshow")
|
||||||
|
|
||||||
_target_install_obs(${target} DESTINATION ${target_destination} x86)
|
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64)
|
if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64)
|
||||||
_target_install_obs(${target} DESTINATION ${target_destination} x64)
|
_target_install_obs(${target} DESTINATION ${target_destination} x64)
|
||||||
endif()
|
endif()
|
||||||
@ -182,33 +176,12 @@ endfunction()
|
|||||||
|
|
||||||
# _target_install_obs: Helper function to install build artifacts to rundir and install location
|
# _target_install_obs: Helper function to install build artifacts to rundir and install location
|
||||||
function(_target_install_obs target)
|
function(_target_install_obs target)
|
||||||
set(options "x86" "x64")
|
set(options "x64")
|
||||||
set(oneValueArgs "DESTINATION" "LIBRARY_DESTINATION" "HEADER_DESTINATION")
|
set(oneValueArgs "DESTINATION" "LIBRARY_DESTINATION" "HEADER_DESTINATION")
|
||||||
set(multiValueArgs "")
|
set(multiValueArgs "")
|
||||||
cmake_parse_arguments(PARSE_ARGV 0 _TIO "${options}" "${oneValueArgs}" "${multiValueArgs}")
|
cmake_parse_arguments(PARSE_ARGV 0 _TIO "${options}" "${oneValueArgs}" "${multiValueArgs}")
|
||||||
|
|
||||||
if(_TIO_x86)
|
if(_TIO_x64)
|
||||||
get_target_property(target_type ${target} TYPE)
|
|
||||||
if(target_type STREQUAL EXECUTABLE)
|
|
||||||
set(suffix exe)
|
|
||||||
else()
|
|
||||||
set(suffix dll)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
cmake_path(RELATIVE_PATH CMAKE_CURRENT_SOURCE_DIR BASE_DIRECTORY "${OBS_SOURCE_DIR}" OUTPUT_VARIABLE project_path)
|
|
||||||
|
|
||||||
set(32bit_project_path "${OBS_SOURCE_DIR}/build_x86/${project_path}")
|
|
||||||
set(target_file "${32bit_project_path}/$<CONFIG>/${target}32.${suffix}")
|
|
||||||
set(target_pdb_file "${32bit_project_path}/$<CONFIG>/${target}32.pdb")
|
|
||||||
set(comment "Copy ${target} (x86) to destination")
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES "${32bit_project_path}/$<CONFIG>/${target}32.${suffix}"
|
|
||||||
DESTINATION "${_TIO_DESTINATION}"
|
|
||||||
COMPONENT Runtime
|
|
||||||
OPTIONAL
|
|
||||||
)
|
|
||||||
elseif(_TIO_x64)
|
|
||||||
get_target_property(target_type ${target} TYPE)
|
get_target_property(target_type ${target} TYPE)
|
||||||
if(target_type STREQUAL EXECUTABLE)
|
if(target_type STREQUAL EXECUTABLE)
|
||||||
set(suffix exe)
|
set(suffix exe)
|
||||||
|
|||||||
@ -29,15 +29,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_NAME MATCHES "(ARM64|x64)")
|
|
||||||
add_custom_command(
|
|
||||||
TARGET get-graphics-offsets
|
|
||||||
POST_BUILD
|
|
||||||
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_SOURCE_DIR}/build_x86 --config $<CONFIG> -t get-graphics-offsets
|
|
||||||
COMMENT "Build x86 get-graphics-offsets"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_dependencies(win-capture get-graphics-offsets)
|
add_dependencies(win-capture get-graphics-offsets)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -64,15 +64,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_NAME MATCHES "(ARM64|x64)")
|
|
||||||
add_custom_command(
|
|
||||||
TARGET graphics-hook
|
|
||||||
POST_BUILD
|
|
||||||
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_SOURCE_DIR}/build_x86 --config $<CONFIG> -t graphics-hook
|
|
||||||
COMMENT "Build x86 graphics-hook"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_dependencies(win-capture graphics-hook)
|
add_dependencies(win-capture graphics-hook)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -24,15 +24,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_NAME MATCHES "(ARM64|x64)")
|
|
||||||
add_custom_command(
|
|
||||||
TARGET inject-helper
|
|
||||||
POST_BUILD
|
|
||||||
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_SOURCE_DIR}/build_x86 --config $<CONFIG> -t inject-helper
|
|
||||||
COMMENT "Build x86 inject-helper"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_dependencies(win-capture inject-helper)
|
add_dependencies(win-capture inject-helper)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@ -114,15 +114,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_VS_PLATFORM_NAME MATCHES "(ARM64|x64)")
|
|
||||||
add_custom_command(
|
|
||||||
TARGET obs-virtualcam-module
|
|
||||||
POST_BUILD
|
|
||||||
COMMAND "${CMAKE_COMMAND}" --build ${CMAKE_SOURCE_DIR}/build_x86 --config $<CONFIG> -t obs-virtualcam-module
|
|
||||||
COMMENT "Build x86 obs-virtualcam-module"
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_dependencies(win-dshow obs-virtualcam-module)
|
add_dependencies(win-dshow obs-virtualcam-module)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user