CMakeLists.txt 2.1 KB

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