cmake: Remove legacy files for macOS builds

This commit is contained in:
PatTheMav 2023-04-24 18:19:21 +02:00 committed by Ryan Foster
parent 50a4e83251
commit 9805b706d1
50 changed files with 2 additions and 735 deletions

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -1,68 +0,0 @@
{
"images" : [
{
"filename" : "icon_16x16.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "16x16"
},
{
"filename" : "icon_16x16@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "16x16"
},
{
"filename" : "icon_32x32.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "32x32"
},
{
"filename" : "icon_32x32@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "32x32"
},
{
"filename" : "icon_128x128.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "128x128"
},
{
"filename" : "icon_128x128@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "128x128"
},
{
"filename" : "icon_256x256.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "256x256"
},
{
"filename" : "icon_256x256@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "256x256"
},
{
"filename" : "icon_512x512.png",
"idiom" : "mac",
"scale" : "1x",
"size" : "512x512"
},
{
"filename" : "icon_512x512@2x.png",
"idiom" : "mac",
"scale" : "2x",
"size" : "512x512"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -1,6 +0,0 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>NSHighResolutionCapable</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>LSAppNapIsDisabled</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>OBS needs to access the camera to enable camera sources to work.</string>
<key>NSMicrophoneUsageDescription</key>
<string>OBS needs to access the microphone to enable audio input.</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Lain Bailey</string>
</dict>
</plist>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>${MACOSX_PLUGIN_BUNDLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_PLUGIN_GUI_IDENTIFIER}</string>
<key>CFBundleVersion</key>
<string>${MACOSX_PLUGIN_BUNDLE_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_PLUGIN_SHORT_VERSION_STRING}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleExecutable</key>
<string>${MACOSX_PLUGIN_EXECUTABLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>${MACOSX_PLUGIN_BUNDLE_TYPE}</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Lain Bailey</string>
</dict>
</plist>

View file

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>${MACOSX_PLUGIN_BUNDLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_PLUGIN_GUI_IDENTIFIER}</string>
<key>CFBundleVersion</key>
<string>${MACOSX_PLUGIN_BUNDLE_VERSION}</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_PLUGIN_SHORT_VERSION_STRING}</string>
<key>CFBundleExecutable</key>
<string>obs-mac-virtualcam</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>${MACOSX_PLUGIN_BUNDLE_TYPE}</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
<key>NSHumanReadableCopyright</key>
<string>(c) 2012-${CURRENT_YEAR} Lain Bailey</string>
<key>CFPlugInFactories</key>
<dict>
<key>7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6</key>
<string>PlugInMain</string>
</dict>
<key>CFPlugInTypes</key>
<dict>
<key>30010C1C-93BF-11D8-8B5B-000A95AF9C6A</key>
<array>
<string>7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6</string>
</array>
</dict>
<key>CMIOHardwareAssistantServiceNames</key>
<array>
<string>com.obsproject.obs-mac-virtualcam.server</string>
</array>
</dict>
</plist>

Binary file not shown.

View file

@ -1,134 +0,0 @@
if(POLICY CMP0007)
cmake_policy(SET CMP0007 NEW)
endif()
if(POLICY CMP0009)
cmake_policy(SET CMP0009 NEW)
endif()
if(POLICY CMP0011)
cmake_policy(SET CMP0011 NEW)
endif()
# Add additional search paths for dylibbundler
list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks\"")
list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/lib\"")
list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/Frameworks\"")
foreach(_PREFIX_PATH IN LISTS _DEPENDENCY_PREFIX)
list(APPEND _FIXUP_BUNDLES "-s \"${_PREFIX_PATH}/lib\"")
file(GLOB _DYLIBS "${_PREFIX_PATH}/lib/*.dylib")
file(
COPY ${_DYLIBS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks
FOLLOW_SYMLINK_CHAIN)
unset(_DYLIBS)
endforeach()
# Unlinked modules need to be supplied manually to dylibbundler
# Find all modules (plugin and standalone)
file(GLOB _OBS_PLUGINS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/*.plugin")
file(GLOB _OBS_SCRIPTING_PLUGINS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/*.so")
# Add modules to fixups
foreach(_OBS_PLUGIN IN LISTS _OBS_PLUGINS)
get_filename_component(PLUGIN_NAME "${_OBS_PLUGIN}" NAME_WLE)
list(APPEND _FIXUP_BUNDLES "-x \"${_OBS_PLUGIN}/Contents/MacOS/${PLUGIN_NAME}\"")
endforeach()
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux")
list(APPEND _FIXUP_BUNDLES "-x \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux\"")
endif()
# Add scripting modules to fixups
foreach(_OBS_PLUGIN IN LISTS _OBS_SCRIPTING_PLUGINS)
list(APPEND _FIXUP_BUNDLES "-x \"${_OBS_PLUGIN}\"")
endforeach()
# Run dylibbbundler
if(DEFINED ENV{VERBOSE})
set(_VERBOSE_FLAG "--verbose")
endif()
if(DEFINED ENV{QUIET})
set(_QUIET_FLAG "OUTPUT_QUIET")
endif()
list(REMOVE_DUPLICATES _FIXUP_BUNDLES)
string(REPLACE ";" " " _FIXUP_BUNDLES "${_FIXUP_BUNDLES}")
message(STATUS "OBS: Bundle linked libraries and dependencies")
execute_process(
COMMAND
/bin/sh -c
"${_BUNDLER_COMMAND} -a \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}\" -cd -of -q -f ${_FIXUP_BUNDLES} ${_VERBOSE_FLAG}"
${_QUIET_FLAG})
# Find all dylibs, frameworks and other code elements inside bundle
file(GLOB _DYLIBS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/*.dylib")
file(GLOB _FRAMEWORKS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/*.framework")
file(GLOB_RECURSE _QT_PLUGINS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/*.dylib")
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux")
list(APPEND _OTHER_BINARIES "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux")
endif()
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Resources/obs-mac-virtualcam.plugin")
list(APPEND _OTHER_BINARIES "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Resources/obs-mac-virtualcam.plugin")
endif()
# Create libobs symlink for legacy plugin support
execute_process(
COMMAND
/bin/sh -c
"cd \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks\" && ln -fs libobs.framework/Versions/Current/libobs libobs.0.dylib && ln -fsv libobs.framework/Versions/Current/libobs libobs.dylib"
${_QUIET_FLAG})
# Python potentially leaves __pycache__ directories inside the bundle which will break codesigning
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/__pycache__")
file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/__pycache__")
endif()
# Codesign all binaries inside-out
message(STATUS "OBS: Codesign dependencies")
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/Chromium Embedded Framework.framework")
set(CEF_HELPER_OUTPUT_NAME "OBS Helper")
set(CEF_HELPER_APP_SUFFIXES ":" " (GPU):.gpu" " (Plugin):.plugin" " (Renderer):.renderer")
foreach(_SUFFIXES ${CEF_HELPER_APP_SUFFIXES})
string(REPLACE ":" ";" _SUFFIXES ${_SUFFIXES})
list(GET _SUFFIXES 0 _NAME_SUFFIX)
list(GET _SUFFIXES 1 _PLIST_SUFFIX)
set(_HELPER_OUTPUT_NAME "${CEF_HELPER_OUTPUT_NAME}${_NAME_SUFFIX}")
set(_HELPER_ENTITLEMENT_PLIST "entitlements-helper${_PLIST_SUFFIX}.plist")
execute_process(
COMMAND
/usr/bin/codesign --remove-signature
"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/OBS Helper${_NAME_SUFFIX}.app" ${_VERBOSE_FLAG}
${_QUIET_FLAG})
execute_process(
COMMAND
/usr/bin/codesign --force --sign "${_CODESIGN_IDENTITY}" --deep --options runtime --entitlements
"${_CODESIGN_ENTITLEMENTS}/entitlements-helper${_PLIST_SUFFIX}.plist"
"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/OBS Helper${_NAME_SUFFIX}.app" ${_VERBOSE_FLAG}
${_QUIET_FLAG})
endforeach()
endif()
foreach(_DEPENDENCY IN LISTS _OTHER_BINARIES _DYLIBS _FRAMEWORKS _OBS_PLUGINS _OBS_SCRIPTING_PLUGINS _QT_PLUGINS)
if(NOT IS_SYMLINK "${_DEPENDENCY}")
execute_process(COMMAND /usr/bin/codesign --remove-signature "${_DEPENDENCY}" ${_VERBOSE_FLAG} ${_QUIET_FLAG})
execute_process(
COMMAND /usr/bin/codesign --force --sign "${_CODESIGN_IDENTITY}" --options runtime --entitlements
"${_CODESIGN_ENTITLEMENTS}/entitlements.plist" "${_DEPENDENCY}" ${_VERBOSE_FLAG} ${_QUIET_FLAG})
endif()
endforeach()
# Codesign main app
message(STATUS "OBS: Codesign main app")
execute_process(COMMAND /usr/bin/codesign --remove-signature "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}" ${_VERBOSE_FLAG}
${_QUIET_FLAG})
execute_process(
COMMAND
/usr/bin/codesign --force --sign "${_CODESIGN_IDENTITY}" --options runtime --entitlements
"${_CODESIGN_ENTITLEMENTS}/entitlements.plist" "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}" ${_VERBOSE_FLAG}
${_QUIET_FLAG})

Binary file not shown.

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
</dict>
</plist>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>

View file

@ -1,17 +0,0 @@
<!--?xml version="1.0" encoding="UTF-8"?-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<!-- Allows @executable_path to load libaries from within the .app bundle. -->
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
</dict>
</plist>

View file

@ -1,66 +0,0 @@
on run (volumeName)
tell application "Finder"
tell disk (volumeName as string)
open
set theXOrigin to @_DMG_WINDOW_X@
set theYOrigin to @_DMG_WINDOW_Y@
set theWidth to @_DMG_WINDOW_WIDTH@
set theHeight to @_DMG_WINDOW_HEIGHT@
set theBottomRightX to (theXOrigin + theWidth)
set theBottomRightY to (theYOrigin + theHeight)
set dsStore to "\"" & "/Volumes/" & volumeName & "/" & ".DS_STORE\""
tell container window
set current view to icon view
set toolbar visible to false
set statusbar visible to false
set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY}
set statusbar visible to false
set position of every item to {theBottomRightX + 100, 100}
end tell
set opts to the icon view options of container window
tell opts
set icon size to @_DMG_ICON_SIZE@
set text size to @_DMG_TEXT_SIZE@
set arrangement to not arranged
end tell
set background picture of opts to file ".background:@CPACK_DMG_BACKGROUND_FILENAME@"
set position of item "@CPACK_PACKAGE_NAME@.app" to {@_DMG_OBS_X@, @_DMG_OBS_Y@}
set position of item "Applications" to {@_DMG_APP_LINK_X@, @_DMG_APP_LINK_Y@}
close
open
-- Force saving of the size
delay 1
tell container window
set statusbar visible to false
set the bounds to {theXOrigin, theYOrigin, theBottomRightX - 10, theBottomRightY - 10}
end tell
end tell
delay 1
tell disk (volumeName as string)
tell container window
set statusbar visible to false
set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY}
end tell
end tell
--give the finder some time to write the .DS_Store file
delay 3
set waitTime to 0
set ejectMe to false
repeat while ejectMe is false
delay 1
set waitTime to waitTime + 1
if (do shell script "[ -f " & dsStore & " ]; echo $?") = "0" then set ejectMe to true
end repeat
log "waited " & waitTime & " seconds for .DS_STORE to be created."
end tell
end run

View file

@ -61,5 +61,5 @@ set(_dmg_obs_y 180)
set(_dmg_app_link_x 416)
set(_dmg_app_link_y 180)
configure_file("${CMAKE_SOURCE_DIR}/cmake/macos/resources/package.applescript.in"
"${CMAKE_BINARY_DIR}/package.applescript" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/macos/resources/package.applescript.in"
"${CMAKE_CURRENT_BINARY_DIR}/package.applescript" @ONLY)

View file

@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.22...3.25)
legacy_check()
find_library(AVFOUNDATION AVFoundation)
find_library(COCOA Cocoa)
find_library(COREFOUNDATION CoreFoundation)

View file

@ -1,33 +0,0 @@
project(mac-avcapture)
find_library(AVFOUNDATION AVFoundation)
find_library(COCOA Cocoa)
find_library(COREFOUNDATION CoreFoundation)
find_library(COREMEDIA CoreMedia)
find_library(COREVIDEO CoreVideo)
find_library(COREMEDIAIO CoreMediaIO)
mark_as_advanced(AVFOUNDATION COCOA COREFOUNDATION COREMEDIA COREMEDIAIO COREVIDEO)
add_library(mac-avcapture MODULE)
add_library(OBS::avcapture ALIAS mac-avcapture)
target_sources(mac-avcapture PRIVATE av-capture.mm left-right.hpp scope-guard.hpp)
target_compile_features(mac-avcapture PRIVATE cxx_std_11)
set_source_files_properties(av-capture.mm PROPERTIES COMPILE_FLAGS -fobjc-arc)
target_link_libraries(
mac-avcapture
PRIVATE OBS::libobs
${AVFOUNDATION}
${COCOA}
${COREFOUNDATION}
${COREMEDIA}
${COREVIDEO}
${COREMEDIAIO})
set_target_properties(mac-avcapture PROPERTIES FOLDER "plugins" PREFIX "")
setup_plugin_target(mac-avcapture)

View file

@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.22...3.25)
legacy_check()
find_library(COREAUDIO CoreAudio)
find_library(AUDIOUNIT AudioUnit)
find_library(COREFOUNDATION CoreFoundation)

View file

@ -1,38 +0,0 @@
project(mac-capture)
find_library(COREAUDIO CoreAudio)
find_library(AUDIOUNIT AudioUnit)
find_library(COREFOUNDATION CoreFoundation)
find_library(IOSURF IOSurface)
find_library(COCOA Cocoa)
find_library(COREVIDEO CoreVideo)
find_library(COREMEDIA CoreMedia)
find_library(SCREENCAPTUREKIT ScreenCaptureKit)
add_library(mac-capture MODULE)
add_library(OBS::capture ALIAS mac-capture)
target_sources(
mac-capture
PRIVATE plugin-main.c
audio-device-enum.c
audio-device-enum.h
mac-audio.c
mac-display-capture.m
mac-screen-capture.m
mac-window-capture.m
window-utils.m
window-utils.h)
target_link_libraries(mac-capture PRIVATE OBS::libobs ${COREAUDIO} ${AUDIOUNIT} ${COREFOUNDATION} ${IOSURF} ${COCOA})
if(SCREENCAPTUREKIT)
target_link_libraries(mac-capture PRIVATE OBS::libobs ${COREVIDEO} ${COREMEDIA})
target_link_options(mac-capture PRIVATE SHELL:-weak_framework ScreenCaptureKit)
target_link_options(libobs PRIVATE SHELL:-weak_framework ScreenCaptureKit)
endif()
set_target_properties(mac-capture PROPERTIES FOLDER "plugins" PREFIX "")
setup_plugin_target(mac-capture)

View file

@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.22...3.25)
legacy_check()
option(ENABLE_SYPHON "Enable Syphon sharing support" ON)
if(NOT ENABLE_SYPHON)
target_disable(mac-syphon)

View file

@ -1,77 +0,0 @@
project(mac-syphon)
find_package(OpenGL REQUIRED)
find_library(COCOA Cocoa)
find_library(IOSURF IOSurface)
find_library(SCRIPTINGBRIDGE ScriptingBridge)
mark_as_advanced(COCOA IOSURF SCRIPTINGBRIDGE)
add_library(mac-syphon MODULE)
add_library(OBS::syphon ALIAS mac-syphon)
add_library(syphon-framework STATIC)
add_library(Syphon::Framework ALIAS syphon-framework)
target_sources(mac-syphon PRIVATE syphon.m plugin-main.c)
target_sources(
syphon-framework
PRIVATE syphon-framework/Syphon_Prefix.pch
syphon-framework/Syphon.h
syphon-framework/SyphonBuildMacros.h
syphon-framework/SyphonCFMessageReceiver.m
syphon-framework/SyphonCFMessageReceiver.h
syphon-framework/SyphonCFMessageSender.h
syphon-framework/SyphonCFMessageSender.m
syphon-framework/SyphonClient.m
syphon-framework/SyphonClient.h
syphon-framework/SyphonClientConnectionManager.m
syphon-framework/SyphonClientConnectionManager.h
syphon-framework/SyphonDispatch.c
syphon-framework/SyphonDispatch.h
syphon-framework/SyphonIOSurfaceImage.m
syphon-framework/SyphonIOSurfaceImage.h
syphon-framework/SyphonImage.m
syphon-framework/SyphonImage.h
syphon-framework/SyphonMachMessageReceiver.m
syphon-framework/SyphonMachMessageReceiver.h
syphon-framework/SyphonMachMessageSender.m
syphon-framework/SyphonMachMessageSender.h
syphon-framework/SyphonMessageQueue.m
syphon-framework/SyphonMessageQueue.h
syphon-framework/SyphonMessageReceiver.m
syphon-framework/SyphonMessageReceiver.h
syphon-framework/SyphonMessageSender.m
syphon-framework/SyphonMessageSender.h
syphon-framework/SyphonMessaging.m
syphon-framework/SyphonMessaging.h
syphon-framework/SyphonOpenGLFunctions.c
syphon-framework/SyphonOpenGLFunctions.h
syphon-framework/SyphonPrivate.m
syphon-framework/SyphonPrivate.h
syphon-framework/SyphonServer.m
syphon-framework/SyphonServer.h
syphon-framework/SyphonServerConnectionManager.m
syphon-framework/SyphonServerConnectionManager.h
syphon-framework/SyphonServerDirectory.m
syphon-framework/SyphonServerDirectory.h)
target_link_libraries(mac-syphon PRIVATE OBS::libobs Syphon::Framework ${SCRIPTINGBRIDGE})
target_link_libraries(syphon-framework PUBLIC OpenGL::GL ${COCOA} ${IOSURF})
target_compile_options(mac-syphon PRIVATE -include ${CMAKE_CURRENT_SOURCE_DIR}/syphon-framework/Syphon_Prefix.pch
-fobjc-arc)
target_compile_options(syphon-framework PRIVATE -include ${CMAKE_CURRENT_SOURCE_DIR}/syphon-framework/Syphon_Prefix.pch
-Wno-deprecated-declarations)
target_compile_definitions(syphon-framework PUBLIC "SYPHON_UNIQUE_CLASS_NAME_PREFIX=OBS_")
set_target_properties(mac-syphon PROPERTIES FOLDER "plugins" PREFIX "")
set_target_properties(syphon-framework PROPERTIES FOLDER "plugins/mac-syphon" PREFIX "")
setup_plugin_target(mac-syphon)

View file

@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.22...3.25)
legacy_check()
find_library(AVFOUNDATION AVFoundation)
find_library(COCOA Cocoa)
find_library(COREFOUNDATION CoreFoundation)

View file

@ -1,29 +0,0 @@
project(mac-videotoolbox)
find_library(AVFOUNDATION AVFoundation)
find_library(COCOA Cocoa)
find_library(COREFOUNDATION CoreFoundation)
find_library(COREVIDEO CoreVideo)
find_library(VIDEOTOOLBOX VideoToolbox)
find_library(COREMEDIA CoreMedia)
mark_as_advanced(AVFOUNDATION COCOA COREFOUNDATION COREVIDEO VIDEOTOOLBOX COREMEDIA)
add_library(mac-videotoolbox MODULE)
add_library(OBS::mac-videotoolbox ALIAS mac-videotoolbox)
target_sources(mac-videotoolbox PRIVATE encoder.c)
target_link_libraries(
mac-videotoolbox
PRIVATE OBS::libobs
${AVFOUNDATION}
${COCOA}
${COREFOUNDATION}
${COREVIDEO}
${VIDEOTOOLBOX}
${COREMEDIA})
set_target_properties(mac-videotoolbox PROPERTIES FOLDER "plugins" PREFIX "")
setup_plugin_target(mac-videotoolbox)

View file

@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.22...3.25)
legacy_check()
option(ENABLE_VIRTUALCAM "Build OBS Virtualcam" ON)
if(NOT ENABLE_VIRTUALCAM)

View file

@ -1,9 +0,0 @@
option(ENABLE_VIRTUALCAM "Build OBS Virtualcam" ON)
if(NOT ENABLE_VIRTUALCAM)
obs_status(DISABLED "mac-virtualcam")
return()
endif()
add_subdirectory(src/obs-plugin)
add_subdirectory(src/dal-plugin)

View file

@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.22...3.25)
legacy_check()
find_library(COCOA Cocoa)
find_library(COREMEDIA CoreMedia)
find_library(COREMEDIAIO CoreMediaIO)

View file

@ -1,61 +0,0 @@
project(mac-dal-plugin)
find_library(COCOA Cocoa)
find_library(COREMEDIA CoreMedia)
find_library(COREMEDIAIO CoreMediaIO)
find_library(COREVIDEO CoreVideo)
find_library(IOSURFACE IOSurface)
mark_as_advanced(COCOA COREMEDIA COREMEDIAIO COREVIDEO IOSURFACE)
add_library(mac-dal-plugin MODULE)
add_library(OBS::mac-dal-plugin ALIAS mac-dal-plugin)
target_sources(
mac-dal-plugin
PRIVATE OBSDALPlugIn.mm
OBSDALPlugIn.h
OBSDALPlugInMain.mm
OBSDALPlugInInterface.mm
OBSDALPlugInInterface.h
OBSDALObjectStore.mm
OBSDALObjectStore.h
OBSDALDevice.mm
OBSDALDevice.h
OBSDALMachClient.mm
OBSDALMachClient.h
CMSampleBufferUtils.mm
OBSDALStream.mm
OBSDALStream.h
CMSampleBufferUtils.h
Defines.h
Logging.h
${CMAKE_CURRENT_SOURCE_DIR}/../common/MachProtocol.h)
target_include_directories(mac-dal-plugin PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/../common")
target_compile_options(mac-dal-plugin PRIVATE -fobjc-arc -fobjc-weak)
target_link_libraries(mac-dal-plugin PRIVATE ${COCOA} ${COREMEDIA} ${COREMEDIAIO} ${COREVIDEO} ${IOSURFACE})
set(MACOSX_PLUGIN_BUNDLE_TYPE "BNDL")
target_sources(mac-dal-plugin PRIVATE placeholder.png)
set_source_files_properties(placeholder.png PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
source_group("Resources" FILES placeholder.png)
set_target_properties(
mac-dal-plugin
PROPERTIES BUNDLE ON
BUNDLE_EXTENSION "plugin"
OUTPUT_NAME "obs-mac-virtualcam"
FOLDER "plugins"
VERSION "0"
SOVERSION "0"
# Force the DAL plugin to be built for arm64e as well. Note that
# we cannot build OBS for arm64e, since its libraries are not
# built for this architecture at the moment.
OSX_ARCHITECTURES "x86_64;arm64;arm64e"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../"
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/Virtualcam-Info.plist.in")
setup_binary_target(mac-dal-plugin)

View file

@ -1,7 +1,5 @@
cmake_minimum_required(VERSION 3.22...3.25)
legacy_check()
add_library(mac-virtualcam MODULE)
add_library(OBS::virtualcam ALIAS mac-virtualcam)

View file

@ -1,29 +0,0 @@
project(mac-virtualcam)
find_library(APPKIT AppKit)
find_library(COREVIDEO CoreVideo)
find_library(IOSURFACE IOSurface)
mark_as_advanced(APPKIT COREVIDEO IOSURFACE)
add_library(mac-virtualcam MODULE)
add_library(OBS::virtualcam ALIAS mac-virtualcam)
target_sources(mac-virtualcam PRIVATE Defines.h plugin-main.mm OBSDALMachServer.mm OBSDALMachServer.h
../common/MachProtocol.h)
target_include_directories(mac-virtualcam PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/../common")
target_link_libraries(mac-virtualcam PRIVATE OBS::libobs OBS::frontend-api ${APPKIT} ${COREVIDEO} ${IOSURFACE})
target_compile_features(mac-virtualcam PRIVATE cxx_deleted_functions cxx_rvalue_references cxx_std_17)
target_compile_options(mac-virtualcam PRIVATE -fobjc-arc -fobjc-weak)
set_target_properties(
mac-virtualcam
PROPERTIES FOLDER "plugins"
PREFIX ""
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../../")
setup_plugin_target(mac-virtualcam)