39 lines
1.2 KiB
CMake
39 lines
1.2 KiB
CMake
# CMake macOS defaults module
|
|
|
|
include_guard(GLOBAL)
|
|
|
|
# Set empty codesigning team if not specified as cache variable
|
|
if(NOT CODESIGN_TEAM)
|
|
set(CODESIGN_TEAM "" CACHE STRING "OBS code signing team for macOS" FORCE)
|
|
|
|
# Set ad-hoc codesigning identity if not specified as cache variable
|
|
if(NOT CODESIGN_IDENTITY)
|
|
set(CODESIGN_IDENTITY "-" CACHE STRING "OBS code signing identity for macOS" FORCE)
|
|
endif()
|
|
endif()
|
|
|
|
include(xcode)
|
|
|
|
include(buildspec)
|
|
|
|
# Use Applications directory as default install destination
|
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
set(
|
|
CMAKE_INSTALL_PREFIX
|
|
"$ENV{HOME}/Library/Application Support/obs-studio/plugins"
|
|
CACHE STRING
|
|
"Default plugin installation directory"
|
|
FORCE
|
|
)
|
|
endif()
|
|
|
|
# Enable find_package targets to become globally available targets
|
|
set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)
|
|
# Enable RPATH support for generated binaries
|
|
set(CMAKE_MACOSX_RPATH TRUE)
|
|
# Use RPATHs from build tree _in_ the build tree
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
|
# Do not add default linker search paths to RPATH
|
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
|
|
# Use common bundle-relative RPATH for installed targets
|
|
set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
|