diff --git a/UI/cmake/macos/Info.plist.in b/UI/cmake/macos/Info.plist.in index d55c2c0f8..ad702a1a7 100644 --- a/UI/cmake/macos/Info.plist.in +++ b/UI/cmake/macos/Info.plist.in @@ -2,40 +2,10 @@ - CFBundleExecutable - OBS - CFBundleIconFile - AppIcon - CFBundleIdentifier - com.obsproject.obs-studio - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - OBS Studio - CFBundleDisplayName - OBS Studio - CFBundlePackageType - APPL - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleSupportedPlatforms - - MacOSX - NSHighResolutionCapable - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} LSAppNapIsDisabled - NSCameraUsageDescription - OBS needs to access the camera to enable camera sources to work. - NSMicrophoneUsageDescription - OBS needs to access the microphone to enable audio input. - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey SUFeedURL ${SPARKLE_APPCAST_URL} SUPublicEDKey diff --git a/UI/frontend-plugins/aja-output-ui/cmake/macos/Info.plist.in b/UI/frontend-plugins/aja-output-ui/cmake/macos/Info.plist.in deleted file mode 100644 index 010046d85..000000000 --- a/UI/frontend-plugins/aja-output-ui/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - aja-output-ui - CFBundleIdentifier - com.obsproject.aja-output-ui - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - aja-output-ui - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/UI/frontend-plugins/decklink-captions/cmake/macos/Info.plist.in b/UI/frontend-plugins/decklink-captions/cmake/macos/Info.plist.in deleted file mode 100644 index dd637c575..000000000 --- a/UI/frontend-plugins/decklink-captions/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - decklink-captions - CFBundleIdentifier - com.obsproject.decklink-captions - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - decklink-captions - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/UI/frontend-plugins/decklink-output-ui/cmake/macos/Info.plist.in b/UI/frontend-plugins/decklink-output-ui/cmake/macos/Info.plist.in deleted file mode 100644 index 893ff64f0..000000000 --- a/UI/frontend-plugins/decklink-output-ui/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - decklink-output-ui - CFBundleIdentifier - com.obsproject.decklink-output-ui - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - decklink-output-ui - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/UI/frontend-plugins/frontend-tools/cmake/macos/Info.plist.in b/UI/frontend-plugins/frontend-tools/cmake/macos/Info.plist.in deleted file mode 100644 index a700c20c4..000000000 --- a/UI/frontend-plugins/frontend-tools/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - frontend-tools - CFBundleIdentifier - com.obsproject.frontend-tools - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - frontend-tools - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/cmake/macos/defaults.cmake b/cmake/macos/defaults.cmake index 36f9b2a73..257f53531 100644 --- a/cmake/macos/defaults.cmake +++ b/cmake/macos/defaults.cmake @@ -25,7 +25,6 @@ include(buildspec) # SWIG hard codes the directory to its library directory at compile time. As obs-deps need to be relocatable, we need to # force SWIG to look for its files in a directory relative to the PREFIX_PATH. The best way to ensure this is to set the # SWIG_LIB environment variable. - foreach(path IN LISTS CMAKE_PREFIX_PATH) if(NOT DEFINED ENV{SWIG_LIB} AND EXISTS "${path}/bin/swig") set(ENV{SWIG_LIB} "${path}/share/swig/CURRENT") @@ -33,16 +32,6 @@ foreach(path IN LISTS CMAKE_PREFIX_PATH) endif() endforeach() -# Set default values for CMake's bundle generator and created Info.plist files -set(MACOSX_BUNDLE_EXECUTABLE_NAME OBS) -set(MACOSX_BUNDLE_BUNDLE_NAME "${OBS_PRODUCT_NAME}") -set(MACOSX_BUNDLE_BUNDLE_VERSION ${OBS_BUILD_NUMBER}) -set(MACOSX_BUNDLE_COPYRIGHT "${OBS_LEGAL_COPYRIGHT}") -set(MACOSX_BUNDLE_GUI_IDENTIFIER com.obsproject.obs-studio) -set(MACOSX_BUNDLE_ICON_FILE AppIcon) -set(MACOSX_BUNDLE_SHORT_VERSION_STRING ${OBS_VERSION_CANONICAL}) -string(TIMESTAMP CURRENT_YEAR "%Y") - # Enable find_package targets to become globally available targets set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE) # Enable RPATH support for generated binaries diff --git a/cmake/macos/helpers.cmake b/cmake/macos/helpers.cmake index a04f1167e..1ddf05570 100644 --- a/cmake/macos/helpers.cmake +++ b/cmake/macos/helpers.cmake @@ -26,26 +26,36 @@ function(set_target_properties_obs target) endwhile() get_target_property(target_type ${target} TYPE) + string(TIMESTAMP CURRENT_YEAR "%Y") + # Target is a GUI or CLI application if(target_type STREQUAL EXECUTABLE) if(target STREQUAL obs-studio) - _check_info_plist() set_target_properties( ${target} PROPERTIES OUTPUT_NAME OBS MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in" - XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.obsproject.obs-studio - XCODE_ATTRIBUTE_PRODUCT_NAME OBS - XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY YES XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY YES XCODE_EMBED_PLUGINS_REMOVE_HEADERS_ON_COPY YES XCODE_EMBED_PLUGINS_CODE_SIGN_ON_COPY YES + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.obsproject.obs-studio + XCODE_ATTRIBUTE_PRODUCT_NAME OBS + XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME AppIcon + XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER} + XCODE_ATTRIBUTE_MARKETING_VERSION ${OBS_VERSION_CANONICAL} + XCODE_ATTRIBUTE_GENERATE_INFOPLIST_FILE YES XCODE_ATTRIBUTE_COPY_PHASE_STRIP NO XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES XCODE_ATTRIBUTE_SKIP_INSTALL NO - XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)") + XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)" + XCODE_ATTRIBUTE_INFOPLIST_KEY_CFBundleDisplayName "OBS Studio" + XCODE_ATTRIBUTE_INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey" + XCODE_ATTRIBUTE_INFOPLIST_KEY_NSCameraUsageDescription + "OBS needs to access the camera to enable camera sources to work." + XCODE_ATTRIBUTE_INFOPLIST_KEY_NSMicrophoneUsageDescription + "OBS needs to access the microphone to enable audio input.") get_property(obs_dependencies GLOBAL PROPERTY _OBS_DEPENDENCIES) add_dependencies(${target} ${obs_dependencies}) @@ -206,17 +216,21 @@ function(set_target_properties_obs target) get_target_property(is_framework ${target} FRAMEWORK) if(is_framework) - _check_info_plist() set_target_properties( ${target} PROPERTIES FRAMEWORK_VERSION A MACOSX_FRAMEWORK_IDENTIFIER com.obsproject.${target} - MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in" - XCODE_ATTRIBUTE_SKIP_INSTALL YES XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" - XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "") - else() - _add_entitlements() + XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "" + XCODE_ATTRIBUTE_SKIP_INSTALL YES + XCODE_ATTRIBUTE_PRODUCT_NAME ${target} + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target} + XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER} + XCODE_ATTRIBUTE_MARKETING_VERSION ${OBS_VERSION_CANONICAL} + XCODE_ATTRIBUTE_GENERATE_INFOPLIST_FILE YES + XCODE_ATTRIBUTE_INFOPLIST_FILE "" + XCODE_ATTRIBUTE_INFOPLIST_KEY_CFBundleDisplayName ${target} + XCODE_ATTRIBUTE_INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey") endif() set_property(GLOBAL APPEND PROPERTY _OBS_FRAMEWORKS ${target}) @@ -233,14 +247,17 @@ function(set_target_properties_obs target) set_property(GLOBAL APPEND PROPERTY _OBS_DEPENDENCIES ${target}) return() else() - _check_info_plist() set_target_properties( ${target} PROPERTIES BUNDLE TRUE BUNDLE_EXTENSION plugin - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in" XCODE_ATTRIBUTE_PRODUCT_NAME ${target} - XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target}) + XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.obsproject.${target} + XCODE_ATTRIBUTE_CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER} + XCODE_ATTRIBUTE_MARKETING_VERSION ${OBS_VERSION_CANONICAL} + XCODE_ATTRIBUTE_GENERATE_INFOPLIST_FILE YES + XCODE_ATTRIBUTE_INFOPLIST_KEY_CFBundleDisplayName ${target} + XCODE_ATTRIBUTE_INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2012-${CURRENT_YEAR} Lain Bailey") if(target STREQUAL obs-browser) # Good-enough for now as there are no other variants - in _theory_ we should only add the appropriate variant, @@ -292,13 +309,6 @@ function(set_target_properties_obs target) endif() endfunction() -# _check_info_plist: Macro to check if project ships with Info.plist template -macro(_check_info_plist) - if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in") - message(FATAL_ERROR "Target ${target} is missing an Info.plist template in its cmake directory.") - endif() -endmacro() - # _check_entitlements: Macro to check if project ships with entitlements plist macro(_check_entitlements) if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist") diff --git a/libobs/cmake/macos/Info.plist.in b/libobs/cmake/macos/Info.plist.in deleted file mode 100644 index 7fe549f8d..000000000 --- a/libobs/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - libobs - CFBundleIdentifier - com.obsproject.libobs - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - libobs - CFBundlePackageType - FMWK - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/aja/cmake/macos/Info.plist.in b/plugins/aja/cmake/macos/Info.plist.in deleted file mode 100644 index 7fb6314a2..000000000 --- a/plugins/aja/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - aja - CFBundleIdentifier - com.obsproject.aja - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - aja - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/coreaudio-encoder/cmake/macos/Info.plist.in b/plugins/coreaudio-encoder/cmake/macos/Info.plist.in deleted file mode 100644 index 2017f51e4..000000000 --- a/plugins/coreaudio-encoder/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - coreaudio-encoder - CFBundleIdentifier - com.obsproject.coreaudio-encoder - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - coreaudio-encoder - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/decklink/cmake/macos/Info.plist.in b/plugins/decklink/cmake/macos/Info.plist.in deleted file mode 100644 index 82d99f5c5..000000000 --- a/plugins/decklink/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - decklink - CFBundleIdentifier - com.obsproject.decklink - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - decklink - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/image-source/cmake/macos/Info.plist.in b/plugins/image-source/cmake/macos/Info.plist.in deleted file mode 100644 index 4e97f0de5..000000000 --- a/plugins/image-source/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - image-source - CFBundleIdentifier - com.obsproject.image-source - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - image-source - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/mac-avcapture/cmake/macos/Info.plist.in b/plugins/mac-avcapture/cmake/macos/Info.plist.in deleted file mode 100644 index e6f9e6e10..000000000 --- a/plugins/mac-avcapture/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - mac-avcapture - CFBundleIdentifier - com.obsproject.mac-avcapture - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - mac-avcapture - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/mac-capture/cmake/macos/Info.plist.in b/plugins/mac-capture/cmake/macos/Info.plist.in deleted file mode 100644 index 8ae63aa11..000000000 --- a/plugins/mac-capture/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - mac-capture - CFBundleIdentifier - com.obsproject.mac-capture - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - mac-capture - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/mac-syphon/cmake/macos/Info.plist.in b/plugins/mac-syphon/cmake/macos/Info.plist.in deleted file mode 100644 index 4c6bee1ed..000000000 --- a/plugins/mac-syphon/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - mac-syphon - CFBundleIdentifier - com.obsproject.mac-syphon - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - mac-syphon - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/mac-videotoolbox/cmake/macos/Info.plist.in b/plugins/mac-videotoolbox/cmake/macos/Info.plist.in deleted file mode 100644 index 1bb5af4e6..000000000 --- a/plugins/mac-videotoolbox/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - mac-videotoolbox - CFBundleIdentifier - com.obsproject.mac-videotoolbox - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - mac-videotoolbox - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/mac-virtualcam/src/camera-extension/CMakeLists.txt b/plugins/mac-virtualcam/src/camera-extension/CMakeLists.txt index ee22312f6..4ff8f6a4a 100644 --- a/plugins/mac-virtualcam/src/camera-extension/CMakeLists.txt +++ b/plugins/mac-virtualcam/src/camera-extension/CMakeLists.txt @@ -15,8 +15,6 @@ endforeach() project(mac-camera-extension LANGUAGES Swift) -set(_ORIG_DEPLOYMENT_TARGET ${CMAKE_OSX_DEPLOYMENT_TARGET}) - set(CMAKE_OSX_DEPLOYMENT_TARGET 13.0) add_executable(mac-camera-extension) @@ -24,27 +22,35 @@ add_executable(OBS:mac-camera-extension ALIAS mac-camera-extension) set(_placeholder_location "${CMAKE_CURRENT_SOURCE_DIR}/../common/data/placeholder.png") target_sources( - mac-camera-extension PRIVATE main.swift OBSCameraDeviceSource.swift OBSCameraProviderSource.swift - OBSCameraStreamSink.swift OBSCameraStreamSource.swift "${_placeholder_location}") + mac-camera-extension PRIVATE "${_placeholder_location}" main.swift OBSCameraDeviceSource.swift + OBSCameraProviderSource.swift OBSCameraStreamSink.swift OBSCameraStreamSource.swift) set_property(SOURCE "${_placeholder_location}" PROPERTY MACOSX_PACKAGE_LOCATION "Resources") source_group("Resources" FILES "${_placeholder_location}") -set_target_properties( +# cmake-format: off +set_target_properties_obs( mac-camera-extension - PROPERTIES BUNDLE_EXTENSION systemextension + PROPERTIES FOLDER plugins + OUTPUT_NAME com.obsproject.obs-studio.mac-camera-extension RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../" MACOSX_BUNDLE ON MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in" - XCODE_PRODUCT_TYPE com.apple.product-type.system-extension - XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist" - XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES - XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS NO - XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--timestamp" - XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET 13.0 - XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "com.obsproject.obs-studio.mac-camera-extension" - XCODE_ATTRIBUTE_SWIFT_VERSION 5.0 - XCODE_ATTRIBUTE_SKIP_INSTALL YES) + BUNDLE_EXTENSION systemextension + XCODE_PRODUCT_TYPE com.apple.product-type.system-extension) -set_target_properties_obs(mac-camera-extension PROPERTIES FOLDER plugins - OUTPUT_NAME "com.obsproject.obs-studio.mac-camera-extension") +string(TIMESTAMP CURRENT_YEAR "%Y") +set_target_xcode_properties( + mac-camera-extension + PROPERTIES SWIFT_VERSION 5.0 + MACOSX_DEPLOYMENT_TARGET 13.0 + CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/entitlements.plist" + PRODUCT_NAME com.obsproject.obs-studio.mac-camera-extension + PRODUCT_BUNDLE_IDENTIFIER com.obsproject.obs-studio.mac-camera-extension + CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER} + MARKETING_VERSION ${OBS_VERSION_CANONICAL} + COPY_PHASE_STRIP NO + GENERATE_INFOPLIST_FILE YES + INFOPLIST_KEY_NSHumanReadableCopyright "(c) 2022-${CURRENT_YEAR} Sebastian Beckmann, Patrick Heyer" + INFOPLIST_KEY_NSSystemExtensionUsageDescription "This Camera Extension enables virtual camera functionality in OBS Studio.") +# cmake-format: on diff --git a/plugins/mac-virtualcam/src/camera-extension/cmake/macos/Info.plist.in b/plugins/mac-virtualcam/src/camera-extension/cmake/macos/Info.plist.in index 265868415..e4b181a82 100644 --- a/plugins/mac-virtualcam/src/camera-extension/cmake/macos/Info.plist.in +++ b/plugins/mac-virtualcam/src/camera-extension/cmake/macos/Info.plist.in @@ -2,35 +2,11 @@ - CFBundleName - com.obsproject.obs-studio.mac-camera-extension - CFBundleIdentifier - com.obsproject.obs-studio.mac-camera-extension - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleExecutable - com.obsproject.obs-studio.mac-camera-extension - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - SYSX - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - 13.0 - NSHumanReadableCopyright - (c) 2022-${CURRENT_YEAR} Sebastian Beckmann, Patrick Heyer CMIOExtension CMIOExtensionMachServiceName $(TeamIdentifierPrefix)$(PRODUCT_BUNDLE_IDENTIFIER) - NSSystemExtensionUsageDescription - This Camera Extension enables virtual camera functionality in OBS Studio. OBSCameraDeviceUUID ${VIRTUALCAM_DEVICE_UUID} OBSCameraSourceUUID diff --git a/plugins/mac-virtualcam/src/dal-plugin/CMakeLists.txt b/plugins/mac-virtualcam/src/dal-plugin/CMakeLists.txt index 1814b8889..2790beccb 100644 --- a/plugins/mac-virtualcam/src/dal-plugin/CMakeLists.txt +++ b/plugins/mac-virtualcam/src/dal-plugin/CMakeLists.txt @@ -48,22 +48,25 @@ set_target_properties_obs( obs-dal-plugin PROPERTIES OUTPUT_NAME obs-mac-virtualcam FOLDER plugins - PREFIX "") + PREFIX "" + BUNDLE TRUE BUNDLE_EXTENSION plugin MACOSX_BUNDLE_INFO_PLIST + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../") +set_property(TARGET obs-dal-plugin PROPERTY OSX_ARCHITECTURES x86_64 arm64) + +string(TIMESTAMP CURRENT_YEAR "%Y") set_target_properties( obs-dal-plugin - PROPERTIES BUNDLE ON - BUNDLE_EXTENSION plugin - OSX_ARCHITECTURES "x86_64;arm64;arm64e" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../" - MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in" - XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES - XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.obsproject.obs-mac-virtualcam - XCODE_ATTRIBUTE_CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION YES - XCODE_ATTRIBUTE_GCC_WARN_SHADOW YES) - -set_target_properties_obs( - obs-dal-plugin - PROPERTIES OUTPUT_NAME obs-mac-virtualcam - FOLDER plugins - PREFIX "") + PROPERTIES CLANG_ENABLE_OBJC_ARC YES + CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION YES + GCC_WARN_SHADOW YES + PRODUCT_NAME obs-mac-virtualcam + PRODUCT_BUNDLE_IDENTIFIER com.obsproject.obs-mac-virtualcam + CURRENT_PROJECT_VERSION ${OBS_BUILD_NUMBER} + MARKETING_VERSION ${OBS_VERSION_CANONICAL} + GENERATE_INFOPLIST_FILE YES + INFOPLIST_KEY_CFBundleDisplayName obs-mac-virtualcam + INFOPLIST_KEY_NSHumanReadableCopyright + "(c) 2020-${CURRENT_YEAR} John Boiles, Patrick Heyer, Sebastian Beckmann") +# cmake-format: on diff --git a/plugins/mac-virtualcam/src/dal-plugin/Info.plist b/plugins/mac-virtualcam/src/dal-plugin/Info.plist deleted file mode 100644 index 4dd87c900..000000000 --- a/plugins/mac-virtualcam/src/dal-plugin/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - obs-mac-virtualcam - CFBundleIdentifier - com.obsproject.obs-mac-virtualcam.dal-plugin - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - OBS Virtual Camera - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - CFPlugInFactories - - 7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6 - PlugInMain - - CFPlugInTypes - - 30010C1C-93BF-11D8-8B5B-000A95AF9C6A - - 7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6 - - - LSMinimumSystemVersion - 10.13 - CMIOHardwareAssistantServiceNames - - com.obsproject.obs-mac-virtualcam.server - - - diff --git a/plugins/mac-virtualcam/src/dal-plugin/cmake/macos/Info.plist.in b/plugins/mac-virtualcam/src/dal-plugin/cmake/macos/Info.plist.in index d611d692a..077bfb3cb 100644 --- a/plugins/mac-virtualcam/src/dal-plugin/cmake/macos/Info.plist.in +++ b/plugins/mac-virtualcam/src/dal-plugin/cmake/macos/Info.plist.in @@ -2,28 +2,6 @@ - CFBundleName - obs-mac-virtualcam - CFBundleIdentifier - com.obsproject.obs-mac-virtualcam - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleExecutable - obs-mac-virtualcam - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey CFPlugInFactories 7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6 diff --git a/plugins/mac-virtualcam/src/obs-plugin/CMakeLists.txt b/plugins/mac-virtualcam/src/obs-plugin/CMakeLists.txt index 78a4a0f61..a3a52388a 100644 --- a/plugins/mac-virtualcam/src/obs-plugin/CMakeLists.txt +++ b/plugins/mac-virtualcam/src/obs-plugin/CMakeLists.txt @@ -19,6 +19,7 @@ set_target_properties_obs( mac-virtualcam PROPERTIES FOLDER plugins PREFIX "" + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/Info.plist.in" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../" XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES XCODE_ATTRIBUTE_CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION YES diff --git a/plugins/mac-virtualcam/src/obs-plugin/cmake/macos/Info.plist.in b/plugins/mac-virtualcam/src/obs-plugin/cmake/macos/Info.plist.in index d818aecc8..a627e7f3c 100644 --- a/plugins/mac-virtualcam/src/obs-plugin/cmake/macos/Info.plist.in +++ b/plugins/mac-virtualcam/src/obs-plugin/cmake/macos/Info.plist.in @@ -1,30 +1,8 @@ - + - CFBundleName - mac-virtualcam - CFBundleIdentifier - com.obsproject.mac-virtualcam - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - mac-virtualcam - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2020-${CURRENT_YEAR} John Boiles, Patrick Heyer, Sebastian Beckmann - OBSCameraDeviceUUID - ${VIRTUALCAM_DEVICE_UUID} + OBSCameraDeviceUUID + ${VIRTUALCAM_DEVICE_UUID} diff --git a/plugins/obs-ffmpeg/cmake/macos/Info.plist.in b/plugins/obs-ffmpeg/cmake/macos/Info.plist.in deleted file mode 100644 index 51f1ee46b..000000000 --- a/plugins/obs-ffmpeg/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - obs-ffmpeg - CFBundleIdentifier - com.obsproject.obs-ffmpeg - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - obs-ffmpeg - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/obs-filters/cmake/macos/Info.plist.in b/plugins/obs-filters/cmake/macos/Info.plist.in deleted file mode 100644 index 1d7360e30..000000000 --- a/plugins/obs-filters/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - obs-filters - CFBundleIdentifier - com.obsproject.obs-filters - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - obs-filters - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/obs-outputs/cmake/macos/Info.plist.in b/plugins/obs-outputs/cmake/macos/Info.plist.in deleted file mode 100644 index 2831c460c..000000000 --- a/plugins/obs-outputs/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - obs-outputs - CFBundleIdentifier - com.obsproject.obs-outputs - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - obs-outputs - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/obs-transitions/cmake/macos/Info.plist.in b/plugins/obs-transitions/cmake/macos/Info.plist.in deleted file mode 100644 index 85d3bdfaa..000000000 --- a/plugins/obs-transitions/cmake/macos/Info.plist.in +++ /dev/null @@ -1,44 +0,0 @@ - - - - - CFBundleExecutable - obs-transitions - CFBundleIconFile - AppIcon - CFBundleIdentifier - com.obsproject.obs-transitions - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - OBS - CFBundleDisplayName - OBS Studio - CFBundlePackageType - APPL - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleSupportedPlatforms - - MacOSX - - NSHighResolutionCapable - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - LSAppNapIsDisabled - - NSCameraUsageDescription - OBS needs to access the camera to enable camera sources to work. - NSMicrophoneUsageDescription - OBS needs to access the microphone to enable audio input. - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - SUFeedURL - ${OBS_SPARKLE_FEED_URL} - SUPublicDSAKeyFile - ${OBS_PUBLIC_KEY_NAME} - - diff --git a/plugins/obs-vst/cmake/macos/Info.plist.in b/plugins/obs-vst/cmake/macos/Info.plist.in deleted file mode 100644 index 8007af9bb..000000000 --- a/plugins/obs-vst/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - obs-vst - CFBundleIdentifier - com.obsproject.obs-vst - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - obs-vst - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/obs-x264/cmake/macos/Info.plist.in b/plugins/obs-x264/cmake/macos/Info.plist.in deleted file mode 100644 index cb6b73a51..000000000 --- a/plugins/obs-x264/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - obs-x264 - CFBundleIdentifier - com.obsproject.obs-x264 - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - obs-x264 - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/rtmp-services/cmake/macos/Info.plist.in b/plugins/rtmp-services/cmake/macos/Info.plist.in deleted file mode 100644 index 3ff6ba9fc..000000000 --- a/plugins/rtmp-services/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - rtmp-services - CFBundleIdentifier - com.obsproject.rtmp-services - CFBundleVersion - ${MACOSX_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - rtmp-services - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/text-freetype2/cmake/macos/Info.plist.in b/plugins/text-freetype2/cmake/macos/Info.plist.in deleted file mode 100644 index 57658ce6e..000000000 --- a/plugins/text-freetype2/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - text-freetype2 - CFBundleIdentifier - com.obsproject.text-freetype2 - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - text-freetype2 - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - - diff --git a/plugins/vlc-video/cmake/macos/Info.plist.in b/plugins/vlc-video/cmake/macos/Info.plist.in deleted file mode 100644 index 34decdbb4..000000000 --- a/plugins/vlc-video/cmake/macos/Info.plist.in +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleName - vlc-video - CFBundleIdentifier - com.obsproject.vlc-video - CFBundleVersion - ${MACOSX_BUNDLE_BUNDLE_VERSION} - CFBundleShortVersionString - ${MACOSX_BUNDLE_SHORT_VERSION_STRING} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleExecutable - vlc-video - CFBundlePackageType - BNDL - CFBundleSupportedPlatforms - - MacOSX - - LSMinimumSystemVersion - ${CMAKE_OSX_DEPLOYMENT_TARGET} - NSHumanReadableCopyright - (c) 2012-${CURRENT_YEAR} Lain Bailey - -