CMakeLists.txt 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. if(APPLE)
  2. set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/${APPLICATION_ICON_NAME}.icns")
  3. if (CMAKE_BUILD_TYPE MATCHES "Debug" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
  4. set(XCODE_TARGET_CONFIGURATION "Debug")
  5. else()
  6. set(XCODE_TARGET_CONFIGURATION "Release")
  7. endif()
  8. # The bundle identifier and application group need to have compatible values with the client
  9. # to be able to open a Mach port across the extension's sandbox boundary.
  10. # Pass the info through the xcodebuild command line and make sure that the project uses
  11. # those user-defined settings to build the plist.
  12. add_custom_target( mac_overlayplugin ALL
  13. xcodebuild ARCHS=${CMAKE_OSX_ARCHITECTURES} ONLY_ACTIVE_ARCH=NO
  14. -project ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj
  15. -target FinderSyncExt -configuration ${XCODE_TARGET_CONFIGURATION} "SYMROOT=${CMAKE_CURRENT_BINARY_DIR}"
  16. "OC_OEM_SHARE_ICNS=${OC_OEM_SHARE_ICNS}"
  17. "OC_APPLICATION_NAME=${APPLICATION_NAME}"
  18. "OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}"
  19. "OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}"
  20. COMMENT building Mac Overlay icons
  21. VERBATIM)
  22. if (BUILD_FILE_PROVIDER_MODULE)
  23. add_custom_target( mac_fileproviderplugin ALL
  24. xcodebuild ARCHS=${CMAKE_OSX_ARCHITECTURES} ONLY_ACTIVE_ARCH=NO
  25. -project ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/NextcloudIntegration/NextcloudIntegration.xcodeproj
  26. -target FileProviderExt -configuration ${XCODE_TARGET_CONFIGURATION} "SYMROOT=${CMAKE_CURRENT_BINARY_DIR}"
  27. "OC_APPLICATION_EXECUTABLE_NAME=${APPLICATION_EXECUTABLE}"
  28. "OC_APPLICATION_VENDOR=${APPLICATION_VENDOR}"
  29. "OC_APPLICATION_NAME=${APPLICATION_NAME}"
  30. "OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}"
  31. "OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}"
  32. COMMENT building macOS File Provider extension
  33. VERBATIM)
  34. add_dependencies(mac_overlayplugin mac_fileproviderplugin nextcloud) # for the ownCloud.icns to be generated
  35. else()
  36. add_dependencies(mac_overlayplugin nextcloud) # for the ownCloud.icns to be generated
  37. endif()
  38. if (BUILD_OWNCLOUD_OSX_BUNDLE)
  39. install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex
  40. DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns
  41. USE_SOURCE_PERMISSIONS)
  42. if (BUILD_FILE_PROVIDER_MODULE)
  43. install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FileProviderExt.appex
  44. DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns
  45. USE_SOURCE_PERMISSIONS)
  46. endif()
  47. endif()
  48. endif()