helpers.cmake 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. # OBS CMake macOS helper functions module
  2. include_guard(GLOBAL)
  3. include(helpers_common)
  4. # set_target_xcode_properties: Sets Xcode-specific target attributes
  5. function(set_target_xcode_properties target)
  6. set(options "")
  7. set(oneValueArgs "")
  8. set(multiValueArgs PROPERTIES)
  9. cmake_parse_arguments(PARSE_ARGV 0 _STXP "${options}" "${oneValueArgs}" "${multiValueArgs}")
  10. message(DEBUG "Setting Xcode properties for target ${target}...")
  11. while(_STXP_PROPERTIES)
  12. list(POP_FRONT _STXP_PROPERTIES key value)
  13. set_property(TARGET ${target} PROPERTY XCODE_ATTRIBUTE_${key} "${value}")
  14. endwhile()
  15. endfunction()
  16. # set_target_properties_obs: Set target properties for use in obs-studio
  17. function(set_target_properties_obs target)
  18. set(options "")
  19. set(oneValueArgs "")
  20. set(multiValueArgs PROPERTIES)
  21. cmake_parse_arguments(PARSE_ARGV 0 _STPO "${options}" "${oneValueArgs}" "${multiValueArgs}")
  22. message(DEBUG "Setting additional properties for target ${target}...")
  23. while(_STPO_PROPERTIES)
  24. list(POP_FRONT _STPO_PROPERTIES key value)
  25. set_property(TARGET ${target} PROPERTY ${key} "${value}")
  26. endwhile()
  27. get_target_property(target_type ${target} TYPE)
  28. string(TIMESTAMP CURRENT_YEAR "%Y")
  29. # Target is a GUI or CLI application
  30. if(target_type STREQUAL EXECUTABLE)
  31. if(target STREQUAL obs-studio)
  32. set_target_properties(
  33. ${target}
  34. PROPERTIES
  35. OUTPUT_NAME OBS
  36. MACOSX_BUNDLE TRUE
  37. MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in"
  38. XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY YES
  39. XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY YES
  40. XCODE_EMBED_PLUGINS_REMOVE_HEADERS_ON_COPY YES
  41. XCODE_EMBED_PLUGINS_CODE_SIGN_ON_COPY YES
  42. )
  43. set_target_xcode_properties(
  44. ${target}
  45. PROPERTIES PRODUCT_BUNDLE_IDENTIFIER com.obsproject.obs-studio
  46. PRODUCT_NAME OBS
  47. ASSETCATALOG_COMPILER_APPICON_NAME AppIcon
  48. CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER}
  49. MARKETING_VERSION ${OBS_VERSION_CANONICAL}
  50. GENERATE_INFOPLIST_FILE YES
  51. COPY_PHASE_STRIP NO
  52. CLANG_ENABLE_OBJC_ARC YES
  53. SKIP_INSTALL NO
  54. INSTALL_PATH "$(LOCAL_APPS_DIR)"
  55. INFOPLIST_KEY_CFBundleDisplayName "OBS Studio"
  56. INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey"
  57. INFOPLIST_KEY_NSCameraUsageDescription "OBS needs to access the camera to enable camera sources to work."
  58. INFOPLIST_KEY_NSMicrophoneUsageDescription "OBS needs to access the microphone to enable audio input."
  59. )
  60. get_property(obs_dependencies GLOBAL PROPERTY _OBS_DEPENDENCIES)
  61. add_dependencies(${target} ${obs_dependencies})
  62. get_property(obs_frameworks GLOBAL PROPERTY _OBS_FRAMEWORKS)
  63. set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${obs_frameworks})
  64. if(SPARKLE_APPCAST_URL AND SPARKLE_PUBLIC_KEY)
  65. set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${SPARKLE})
  66. endif()
  67. if(TARGET mac-syphon)
  68. set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${SYPHON})
  69. endif()
  70. get_property(obs_executables GLOBAL PROPERTY _OBS_EXECUTABLES)
  71. add_dependencies(${target} ${obs_executables})
  72. foreach(executable IN LISTS obs_executables)
  73. set_target_xcode_properties(${executable} PROPERTIES INSTALL_PATH
  74. "$(LOCAL_APPS_DIR)/$<TARGET_BUNDLE_DIR_NAME:${target}>/Contents/MacOS"
  75. )
  76. add_custom_command(
  77. TARGET ${target}
  78. POST_BUILD
  79. COMMAND
  80. "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${executable}>"
  81. "$<TARGET_BUNDLE_CONTENT_DIR:${target}>/MacOS/"
  82. COMMENT "Copy ${executable} to application bundle"
  83. )
  84. endforeach()
  85. if(VIRTUALCAM_DEVICE_UUID AND VIRTUALCAM_SOURCE_UUID AND VIRTUALCAM_SINK_UUID)
  86. set(has_virtualcam_uuids TRUE)
  87. else()
  88. set(has_virtualcam_uuids FALSE)
  89. endif()
  90. if(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE STREQUAL Automatic)
  91. if(has_virtualcam_uuids)
  92. set(entitlements_file "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements-extension.plist")
  93. else()
  94. set(entitlements_file "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist")
  95. endif()
  96. else()
  97. if(has_virtualcam_uuids AND OBS_PROVISIONING_PROFILE)
  98. set(entitlements_file "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements-extension.plist")
  99. set_target_properties(
  100. ${target}
  101. PROPERTIES XCODE_ATTRIBUTE_PROVISIONING_PROFILE_SPECIFIER "${OBS_PROVISIONING_PROFILE}"
  102. )
  103. configure_file(cmake/macos/exportOptions-extension.plist.in ${CMAKE_BINARY_DIR}/exportOptions.plist)
  104. else()
  105. set(entitlements_file "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist")
  106. configure_file(cmake/macos/exportOptions.plist.in ${CMAKE_BINARY_DIR}/exportOptions.plist)
  107. endif()
  108. endif()
  109. if(NOT EXISTS "${entitlements_file}")
  110. message(FATAL_ERROR "Target ${target} is missing an entitlements file in its cmake directory.")
  111. endif()
  112. set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${entitlements_file}")
  113. add_custom_command(
  114. TARGET ${target}
  115. POST_BUILD
  116. COMMAND /bin/ln -fs obs-frontend-api.dylib libobs-frontend-api.1.dylib
  117. WORKING_DIRECTORY "$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Frameworks"
  118. COMMENT "Create symlink for legacy obs-frontend-api"
  119. )
  120. if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/qt.conf")
  121. target_add_resource(${target} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/qt.conf")
  122. endif()
  123. target_add_resource(${target} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Assets.xcassets")
  124. target_add_resource(${target} "${CMAKE_CURRENT_SOURCE_DIR}/../AUTHORS")
  125. if(TARGET obs-dal-plugin)
  126. add_custom_command(
  127. TARGET ${target}
  128. POST_BUILD
  129. COMMAND
  130. "${CMAKE_COMMAND}" -E copy_directory "$<TARGET_BUNDLE_DIR:obs-dal-plugin>"
  131. "$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/$<TARGET_BUNDLE_DIR_NAME:obs-dal-plugin>"
  132. COMMENT "Add OBS DAL plugin to application bundle"
  133. )
  134. endif()
  135. if(TARGET obspython)
  136. add_custom_command(
  137. TARGET ${target}
  138. POST_BUILD
  139. COMMAND
  140. "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE_DIR:obspython>/obspython.py"
  141. "$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources"
  142. COMMENT "Add OBS::python import module"
  143. )
  144. endif()
  145. if(
  146. TARGET mac-camera-extension
  147. AND (CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_STYLE STREQUAL Automatic OR OBS_PROVISIONING_PROFILE)
  148. )
  149. target_enable_feature(mac-camera-extension "macOS CMIO Camera Extension")
  150. add_custom_command(
  151. TARGET ${target}
  152. POST_BUILD
  153. COMMAND
  154. "${CMAKE_COMMAND}" -E copy_directory "$<TARGET_BUNDLE_DIR:mac-camera-extension>"
  155. "$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Library/SystemExtensions/$<TARGET_BUNDLE_DIR_NAME:mac-camera-extension>"
  156. COMMENT "Add Camera Extension to application bundle"
  157. )
  158. else()
  159. target_disable_feature(mac-camera-extension "macOS CMIO Camera Extension")
  160. endif()
  161. _bundle_dependencies(${target})
  162. install(TARGETS ${target} BUNDLE DESTINATION "." COMPONENT Application)
  163. elseif(${target} STREQUAL mac-camera-extension)
  164. set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
  165. set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
  166. elseif(${target} STREQUAL obs-ffmpeg-mux)
  167. if(OBS_CODESIGN_IDENTITY STREQUAL "-")
  168. set_target_xcode_properties(${target} PROPERTIES ENABLE_HARDENED_RUNTIME NO)
  169. endif()
  170. set_target_xcode_properties(${target} PROPERTIES SKIP_INSTALL NO)
  171. set_property(GLOBAL APPEND PROPERTY _OBS_EXECUTABLES ${target})
  172. set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
  173. else()
  174. set_property(TARGET ${target} PROPERTY XCODE_ATTRIBUTE_SKIP_INSTALL NO)
  175. set_property(GLOBAL APPEND PROPERTY _OBS_EXECUTABLES ${target})
  176. set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
  177. _add_entitlements()
  178. endif()
  179. elseif(target_type STREQUAL SHARED_LIBRARY)
  180. set_target_properties(
  181. ${target}
  182. PROPERTIES
  183. NO_SONAME TRUE
  184. MACHO_COMPATIBILITY_VERSION 1.0
  185. MACHO_CURRENT_VERSION ${OBS_VERSION_MAJOR}
  186. SOVERSION 0
  187. VERSION 0
  188. )
  189. set_target_xcode_properties(
  190. ${target}
  191. PROPERTIES DYLIB_COMPATIBILITY_VERSION 1.0
  192. DYLIB_CURRENT_VERSION ${OBS_VERSION_MAJOR}
  193. PRODUCT_NAME ${target}
  194. PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
  195. SKIP_INSTALL YES
  196. )
  197. get_target_property(is_framework ${target} FRAMEWORK)
  198. if(is_framework)
  199. set_target_properties(
  200. ${target}
  201. PROPERTIES FRAMEWORK_VERSION A MACOSX_FRAMEWORK_IDENTIFIER com.obsproject.${target}
  202. )
  203. set_target_xcode_properties(
  204. ${target}
  205. PROPERTIES CODE_SIGN_IDENTITY ""
  206. DEVELOPMENT_TEAM ""
  207. SKIP_INSTALL YES
  208. PRODUCT_NAME ${target}
  209. PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
  210. CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER}
  211. MARKETING_VERSION ${OBS_VERSION_CANONICAL}
  212. GENERATE_INFOPLIST_FILE YES
  213. INFOPLIST_FILE ""
  214. INFOPLIST_KEY_CFBundleDisplayName ${target}
  215. INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey"
  216. )
  217. endif()
  218. set_property(GLOBAL APPEND PROPERTY _OBS_FRAMEWORKS ${target})
  219. set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
  220. elseif(target_type STREQUAL MODULE_LIBRARY)
  221. if(target STREQUAL obspython)
  222. set_target_xcode_properties(
  223. ${target}
  224. PROPERTIES PRODUCT_NAME ${target}
  225. PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
  226. )
  227. elseif(target STREQUAL obslua)
  228. set_target_xcode_properties(
  229. ${target}
  230. PROPERTIES PRODUCT_NAME ${target}
  231. PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
  232. )
  233. elseif(target STREQUAL obs-dal-plugin)
  234. set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
  235. set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
  236. return()
  237. else()
  238. set_target_properties(${target} PROPERTIES BUNDLE TRUE BUNDLE_EXTENSION plugin)
  239. set_target_xcode_properties(
  240. ${target}
  241. PROPERTIES PRODUCT_NAME ${target}
  242. PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}
  243. CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER}
  244. MARKETING_VERSION ${OBS_VERSION_CANONICAL}
  245. GENERATE_INFOPLIST_FILE YES
  246. INFOPLIST_KEY_CFBundleDisplayName ${target}
  247. INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey"
  248. )
  249. if(target STREQUAL obs-browser)
  250. # Good-enough for now as there are no other variants - in _theory_ we should only add the appropriate variant,
  251. # but that is only known at project generation and not build system configuration.
  252. get_target_property(imported_location CEF::Library IMPORTED_LOCATION_RELEASE)
  253. if(imported_location)
  254. list(APPEND cef_items "${imported_location}")
  255. endif()
  256. foreach(helper IN ITEMS _gpu _plugin _renderer "")
  257. if(TARGET OBS::browser-helper${helper})
  258. set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES OBS::browser-helper${helper})
  259. list(APPEND cef_items OBS::browser-helper${helper})
  260. endif()
  261. endforeach()
  262. set_property(GLOBAL APPEND PROPERTY _OBS_FRAMEWORKS ${cef_items})
  263. endif()
  264. endif()
  265. set_property(GLOBAL APPEND PROPERTY OBS_MODULES_ENABLED ${target})
  266. set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target})
  267. endif()
  268. target_install_resources(${target})
  269. get_target_property(target_sources ${target} SOURCES)
  270. set(target_ui_files ${target_sources})
  271. list(FILTER target_ui_files INCLUDE REGEX ".+\\.(ui|qrc)")
  272. source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "UI Files" FILES ${target_ui_files})
  273. if(${target} STREQUAL libobs)
  274. set(target_source_files ${target_sources})
  275. set(target_header_files ${target_sources})
  276. list(FILTER target_source_files INCLUDE REGEX ".+\\.(m|c[cp]?p?|swift)")
  277. list(FILTER target_header_files INCLUDE REGEX ".+\\.h(pp)?")
  278. source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${target_source_files})
  279. source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${target_header_files})
  280. endif()
  281. endfunction()
  282. # _check_entitlements: Macro to check if project ships with entitlements plist
  283. macro(_check_entitlements)
  284. if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist")
  285. message(FATAL_ERROR "Target ${target} is missing an entitlements.plist in its cmake directory.")
  286. endif()
  287. endmacro()
  288. # _add_entitlements: Macro to add entitlements shipped with project
  289. macro(_add_entitlements)
  290. if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist")
  291. set_target_xcode_properties(
  292. ${target}
  293. PROPERTIES CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist"
  294. )
  295. endif()
  296. endmacro()
  297. # target_export: Helper function to export target as CMake package
  298. function(target_export target)
  299. # Exclude CMake package from 'ALL' target
  300. set(exclude_variant EXCLUDE_FROM_ALL)
  301. _target_export(${target})
  302. endfunction()
  303. # target_install_resources: Helper function to add resources into bundle
  304. function(target_install_resources target)
  305. message(DEBUG "Installing resources for target ${target}...")
  306. if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/data")
  307. file(GLOB_RECURSE data_files "${CMAKE_CURRENT_SOURCE_DIR}/data/*")
  308. list(FILTER data_files EXCLUDE REGEX "\\.DS_Store$")
  309. foreach(data_file IN LISTS data_files)
  310. cmake_path(
  311. RELATIVE_PATH
  312. data_file
  313. BASE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
  314. OUTPUT_VARIABLE relative_path
  315. )
  316. cmake_path(GET relative_path PARENT_PATH relative_path)
  317. target_sources(${target} PRIVATE "${data_file}")
  318. set_property(SOURCE "${data_file}" PROPERTY MACOSX_PACKAGE_LOCATION "Resources/${relative_path}")
  319. source_group("Resources/${relative_path}" FILES "${data_file}")
  320. endforeach()
  321. endif()
  322. endfunction()
  323. # target_add_resource: Helper function to add a specific resource to a bundle
  324. function(target_add_resource target resource)
  325. message(DEBUG "Add resource ${resource} to target ${target} at destination ${destination}...")
  326. target_sources(${target} PRIVATE "${resource}")
  327. set_property(SOURCE "${resource}" PROPERTY MACOSX_PACKAGE_LOCATION Resources)
  328. source_group("Resources" FILES "${resource}")
  329. endfunction()
  330. # _bundle_dependencies: Resolve 3rd party dependencies and add them to macOS app bundle
  331. function(_bundle_dependencies target)
  332. message(DEBUG "Discover dependencies of target ${target}...")
  333. set(found_dependencies)
  334. find_dependencies(TARGET ${target} FOUND_VAR found_dependencies)
  335. get_property(obs_module_list GLOBAL PROPERTY OBS_MODULES_ENABLED)
  336. list(LENGTH obs_module_list num_modules)
  337. if(num_modules GREATER 0)
  338. add_dependencies(${target} ${obs_module_list})
  339. set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_PLUGINS ${obs_module_list})
  340. foreach(module IN LISTS obs_module_list)
  341. find_dependencies(TARGET ${module} FOUND_VAR found_dependencies)
  342. endforeach()
  343. endif()
  344. list(REMOVE_DUPLICATES found_dependencies)
  345. set(library_paths)
  346. set(plugins_list)
  347. file(GLOB sdk_library_paths /Applications/Xcode*.app)
  348. set(system_library_path "/usr/lib/")
  349. foreach(library IN LISTS found_dependencies)
  350. get_target_property(library_type ${library} TYPE)
  351. get_target_property(is_framework ${library} FRAMEWORK)
  352. get_target_property(is_imported ${library} IMPORTED)
  353. if(is_imported)
  354. get_target_property(imported_location ${library} LOCATION)
  355. if(NOT imported_location)
  356. continue()
  357. endif()
  358. set(is_xcode_framework FALSE)
  359. set(is_system_framework FALSE)
  360. foreach(sdk_library_path IN LISTS sdk_library_paths)
  361. if(is_xcode_framework)
  362. break()
  363. endif()
  364. cmake_path(IS_PREFIX sdk_library_path "${imported_location}" is_xcode_framework)
  365. endforeach()
  366. cmake_path(IS_PREFIX system_library_path "${imported_location}" is_system_framework)
  367. if(is_system_framework OR is_xcode_framework)
  368. continue()
  369. elseif(is_framework)
  370. file(REAL_PATH "../../.." library_location BASE_DIRECTORY "${imported_location}")
  371. elseif(NOT library_type STREQUAL "STATIC_LIBRARY")
  372. if(NOT imported_location MATCHES ".+\\.a")
  373. set(library_location "${imported_location}")
  374. else()
  375. continue()
  376. endif()
  377. else()
  378. continue()
  379. endif()
  380. if(library MATCHES "Qt6?::.+")
  381. find_qt_plugins(COMPONENT ${library} TARGET ${target} FOUND_VAR plugins_list)
  382. endif()
  383. list(APPEND library_paths ${library_location})
  384. elseif(NOT is_imported AND library_type STREQUAL "SHARED_LIBRARY")
  385. list(APPEND library_paths ${library})
  386. endif()
  387. endforeach()
  388. list(REMOVE_DUPLICATES plugins_list)
  389. foreach(plugin IN LISTS plugins_list)
  390. cmake_path(GET plugin PARENT_PATH plugin_path)
  391. set(plugin_base_dir "${plugin_path}/../")
  392. cmake_path(SET plugin_stem_dir NORMALIZE "${plugin_base_dir}")
  393. cmake_path(RELATIVE_PATH plugin_path BASE_DIRECTORY "${plugin_stem_dir}" OUTPUT_VARIABLE plugin_file_name)
  394. target_sources(${target} PRIVATE "${plugin}")
  395. set_source_files_properties(
  396. "${plugin}"
  397. PROPERTIES MACOSX_PACKAGE_LOCATION "plugins/${plugin_file_name}" XCODE_FILE_ATTRIBUTES "CodeSignOnCopy"
  398. )
  399. source_group("Qt plugins" FILES "${plugin}")
  400. endforeach()
  401. list(REMOVE_DUPLICATES library_paths)
  402. set_property(TARGET ${target} APPEND PROPERTY XCODE_EMBED_FRAMEWORKS ${library_paths})
  403. endfunction()