From 5cb2875ba6fa77923224da0d9416a52b6558428d Mon Sep 17 00:00:00 2001 From: "evan.liu" <583229071@qq.com> Date: Mon, 21 Sep 2026 06:22:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E5=8E=BB=E6=8E=89=E4=BA=86x86?= =?UTF-8?q?=E8=BF=99=E6=A0=B7=E7=9A=84=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- obs-studio/cmake/windows/architecture.cmake | 19 ------------ obs-studio/cmake/windows/helpers.cmake | 31 ++----------------- .../get-graphics-offsets/CMakeLists.txt | 9 ------ .../win-capture/graphics-hook/CMakeLists.txt | 9 ------ .../win-capture/inject-helper/CMakeLists.txt | 9 ------ .../virtualcam-module/CMakeLists.txt | 9 ------ 6 files changed, 2 insertions(+), 84 deletions(-) diff --git a/obs-studio/cmake/windows/architecture.cmake b/obs-studio/cmake/windows/architecture.cmake index 1dc2fbd..a41006a 100644 --- a/obs-studio/cmake/windows/architecture.cmake +++ b/obs-studio/cmake/windows/architecture.cmake @@ -23,25 +23,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME) RESULT_VARIABLE _process_result 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() else() # target_disable_feature: Stub macro for child architecture builds diff --git a/obs-studio/cmake/windows/helpers.cmake b/obs-studio/cmake/windows/helpers.cmake index 9a443f1..815ca0c 100644 --- a/obs-studio/cmake/windows/helpers.cmake +++ b/obs-studio/cmake/windows/helpers.cmake @@ -26,8 +26,6 @@ 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") - _target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION} x86) - if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64) _target_install_obs(${target} DESTINATION ${OBS_EXECUTABLE_DESTINATION} x64) 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-vulkan32.json" "${target_destination}") - _target_install_obs(${target} DESTINATION ${target_destination} x86) - if(CMAKE_VS_PLATFORM_NAME STREQUAL ARM64) _target_install_obs(${target} DESTINATION ${target_destination} x64) endif() elseif(target STREQUAL obs-virtualcam-module) 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) _target_install_obs(${target} DESTINATION ${target_destination} x64) endif() @@ -182,33 +176,12 @@ endfunction() # _target_install_obs: Helper function to install build artifacts to rundir and install location function(_target_install_obs target) - set(options "x86" "x64") + set(options "x64") set(oneValueArgs "DESTINATION" "LIBRARY_DESTINATION" "HEADER_DESTINATION") set(multiValueArgs "") cmake_parse_arguments(PARSE_ARGV 0 _TIO "${options}" "${oneValueArgs}" "${multiValueArgs}") - if(_TIO_x86) - 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}/$/${target}32.${suffix}") - set(target_pdb_file "${32bit_project_path}/$/${target}32.pdb") - set(comment "Copy ${target} (x86) to destination") - - install( - FILES "${32bit_project_path}/$/${target}32.${suffix}" - DESTINATION "${_TIO_DESTINATION}" - COMPONENT Runtime - OPTIONAL - ) - elseif(_TIO_x64) + if(_TIO_x64) get_target_property(target_type ${target} TYPE) if(target_type STREQUAL EXECUTABLE) set(suffix exe) diff --git a/obs-studio/plugins/win-capture/get-graphics-offsets/CMakeLists.txt b/obs-studio/plugins/win-capture/get-graphics-offsets/CMakeLists.txt index d51b2a1..45e25f4 100644 --- a/obs-studio/plugins/win-capture/get-graphics-offsets/CMakeLists.txt +++ b/obs-studio/plugins/win-capture/get-graphics-offsets/CMakeLists.txt @@ -29,15 +29,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME) ) 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 $ -t get-graphics-offsets - COMMENT "Build x86 get-graphics-offsets" - ) - endif() - add_dependencies(win-capture get-graphics-offsets) endif() diff --git a/obs-studio/plugins/win-capture/graphics-hook/CMakeLists.txt b/obs-studio/plugins/win-capture/graphics-hook/CMakeLists.txt index 2893620..8e3c320 100644 --- a/obs-studio/plugins/win-capture/graphics-hook/CMakeLists.txt +++ b/obs-studio/plugins/win-capture/graphics-hook/CMakeLists.txt @@ -64,15 +64,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME) ) 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 $ -t graphics-hook - COMMENT "Build x86 graphics-hook" - ) - endif() - add_dependencies(win-capture graphics-hook) endif() diff --git a/obs-studio/plugins/win-capture/inject-helper/CMakeLists.txt b/obs-studio/plugins/win-capture/inject-helper/CMakeLists.txt index 1c67473..a6830fd 100644 --- a/obs-studio/plugins/win-capture/inject-helper/CMakeLists.txt +++ b/obs-studio/plugins/win-capture/inject-helper/CMakeLists.txt @@ -24,15 +24,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME) ) 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 $ -t inject-helper - COMMENT "Build x86 inject-helper" - ) - endif() - add_dependencies(win-capture inject-helper) endif() diff --git a/obs-studio/plugins/win-dshow/virtualcam-module/CMakeLists.txt b/obs-studio/plugins/win-dshow/virtualcam-module/CMakeLists.txt index 8ac916e..735be76 100644 --- a/obs-studio/plugins/win-dshow/virtualcam-module/CMakeLists.txt +++ b/obs-studio/plugins/win-dshow/virtualcam-module/CMakeLists.txt @@ -114,15 +114,6 @@ if(OBS_PARENT_ARCHITECTURE STREQUAL CMAKE_VS_PLATFORM_NAME) ) 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 $ -t obs-virtualcam-module - COMMENT "Build x86 obs-virtualcam-module" - ) - endif() - add_dependencies(win-dshow obs-virtualcam-module) endif()