@@ -86,26 +86,30 @@ function(set_target_properties_obs target)
8686 endif ()
8787
8888 get_property (obs_executables GLOBAL PROPERTY _OBS_EXECUTABLES )
89+
90+ if ("${obs_executables} " )
91+ message (STATUS "Add dependencies (${target} ) (${obs_executables} )" )
92+ add_dependencies (${target} ${obs_executables} )
93+
94+ foreach (executable IN LISTS obs_executables)
95+ message (STATUS "Set target xcode properties (${executable} ) ($(LOCAL_APPS_DIR)/$<TARGET_BUNDLE_DIR_NAME :${target} >/Contents/MacOS)" )
96+ set_target_xcode_properties (${executable} PROPERTIES INSTALL_PATH
97+ "$(LOCAL_APPS_DIR)/$<TARGET_BUNDLE_DIR_NAME :${target} >/Contents/MacOS"
98+ )
8999
90- message (STATUS "Add dependencies (${target} ) (${obs_executables} )" )
91- add_dependencies (${target} ${obs_executables} )
92-
93- foreach (executable IN LISTS obs_executables)
94- message (STATUS "Set target xcode properties (${executable} ) ($(LOCAL_APPS_DIR)/$<TARGET_BUNDLE_DIR_NAME :${target} >/Contents/MacOS)" )
95- set_target_xcode_properties (${executable} PROPERTIES INSTALL_PATH
96- "$(LOCAL_APPS_DIR)/$<TARGET_BUNDLE_DIR_NAME :${target} >/Contents/MacOS"
97- )
98-
99- message (STATUS "Add custom command (${target} ) (${CMAKE_COMMAND} " -E copy_if_different "$<TARGET_FILE :${executable} >) ($<TARGET_BUNDLE_CONTENT_DIR :${target} >/MacOS/)" )
100- add_custom_command (
101- TARGET ${target}
102- POST_BUILD
103- COMMAND
104- "${CMAKE_COMMAND} " -E copy_if_different "$<TARGET_FILE :${executable} >"
105- "$<TARGET_BUNDLE_CONTENT_DIR :${target} >/MacOS/"
106- COMMENT "Copy ${executable} to application bundle"
107- )
108- endforeach ()
100+ message (STATUS "Add custom command (${target} ) (${CMAKE_COMMAND} " -E copy_if_different "$<TARGET_FILE :${executable} >) ($<TARGET_BUNDLE_CONTENT_DIR :${target} >/MacOS/)" )
101+ add_custom_command (
102+ TARGET ${target}
103+ POST_BUILD
104+ COMMAND
105+ "${CMAKE_COMMAND} " -E copy_if_different "$<TARGET_FILE :${executable} >"
106+ "$<TARGET_BUNDLE_CONTENT_DIR :${target} >/MacOS/"
107+ COMMENT "Copy ${executable} to application bundle"
108+ )
109+ endforeach ()
110+ else ()
111+ message (STATUS "No dependencies (${target} )" )
112+ endif ()
109113
110114 if (VIRTUALCAM_DEVICE_UUID AND VIRTUALCAM_SOURCE_UUID AND VIRTUALCAM_SINK_UUID)
111115 set (has_virtualcam_uuids TRUE )
0 commit comments