defaults.cmake 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # CMake macOS defaults module
  2. include_guard(GLOBAL)
  3. # Set empty codesigning team if not specified as cache variable
  4. if(NOT CODESIGN_TEAM)
  5. set(CODESIGN_TEAM "" CACHE STRING "OBS code signing team for macOS" FORCE)
  6. # Set ad-hoc codesigning identity if not specified as cache variable
  7. if(NOT CODESIGN_IDENTITY)
  8. set(CODESIGN_IDENTITY "-" CACHE STRING "OBS code signing identity for macOS" FORCE)
  9. endif()
  10. endif()
  11. include(xcode)
  12. include(buildspec)
  13. # Use Applications directory as default install destination
  14. if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  15. set(
  16. CMAKE_INSTALL_PREFIX
  17. "$ENV{HOME}/Library/Application Support/obs-studio/plugins"
  18. CACHE STRING
  19. "Default plugin installation directory"
  20. FORCE
  21. )
  22. endif()
  23. # Enable find_package targets to become globally available targets
  24. set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)
  25. # Enable RPATH support for generated binaries
  26. set(CMAKE_MACOSX_RPATH TRUE)
  27. # Use RPATHs from build tree _in_ the build tree
  28. set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
  29. # Do not add default linker search paths to RPATH
  30. set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
  31. # Use common bundle-relative RPATH for installed targets
  32. set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")