set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
set(SHAREDIR ${CMAKE_INSTALL_DATADIR})
-#####
-## handle BUILD_OWNCLOUD_OSX_BUNDLE
-# BUILD_OWNCLOUD_OSX_BUNDLE was not initialized OR set to true on OSX
-if(APPLE AND (NOT DEFINED BUILD_OWNCLOUD_OSX_BUNDLE OR BUILD_OWNCLOUD_OSX_BUNDLE))
- set(BUILD_OWNCLOUD_OSX_BUNDLE ON)
+# Build MacOS app bundle if wished
+if(APPLE AND BUILD_OWNCLOUD_OSX_BUNDLE)
+ message(STATUS "Build MacOS app bundle")
set(OWNCLOUD_OSX_BUNDLE "${APPLICATION_NAME}.app")
set(LIB_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
set(BIN_INSTALL_DIR "${APPLICATION_NAME}.app/Contents/MacOS")
-
-# BUILD_OWNCLOUD_OSX_BUNDLE was disabled on OSX
-elseif(APPLE AND NOT BUILD_OWNCLOUD_OSX_BUNDLE)
- message(FATAL_ERROR "Building in non-bundle mode on OSX is currently not supported. Comment this error out if you want to work on/test it.")
-
-# any other platform
-else()
- set(BUILD_OWNCLOUD_OSX_BUNDLE OFF)
endif()
-#####
# this option removes Http authentication, keychain, shibboleth etc and is intended for
# external authentication mechanisms
if(APPLE)
-set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/${APPLICATION_ICON_NAME}.icns")
+ set(OC_OEM_SHARE_ICNS "${CMAKE_BINARY_DIR}/src/gui/${APPLICATION_ICON_NAME}.icns")
-# The bundle identifier and application group need to have compatible values with the client
-# to be able to open a Mach port across the extension's sandbox boundary.
-# Pass the info through the xcodebuild command line and make sure that the project uses
-# those user-defined settings to build the plist.
-add_custom_target( mac_overlayplugin ALL
- xcodebuild ARCHS=${CMAKE_OSX_ARCHITECTURES} ONLY_ACTIVE_ARCH=NO
- -project ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj
- -target FinderSyncExt -configuration Release "SYMROOT=${CMAKE_CURRENT_BINARY_DIR}"
- "OC_OEM_SHARE_ICNS=${OC_OEM_SHARE_ICNS}"
- "OC_APPLICATION_NAME=${APPLICATION_NAME}"
- "OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}"
- "OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}"
+ # The bundle identifier and application group need to have compatible values with the client
+ # to be able to open a Mach port across the extension's sandbox boundary.
+ # Pass the info through the xcodebuild command line and make sure that the project uses
+ # those user-defined settings to build the plist.
+ add_custom_target( mac_overlayplugin ALL
+ xcodebuild ARCHS=${CMAKE_OSX_ARCHITECTURES} ONLY_ACTIVE_ARCH=NO
+ -project ${CMAKE_SOURCE_DIR}/shell_integration/MacOSX/OwnCloudFinderSync/OwnCloudFinderSync.xcodeproj
+ -target FinderSyncExt -configuration Release "SYMROOT=${CMAKE_CURRENT_BINARY_DIR}"
+ "OC_OEM_SHARE_ICNS=${OC_OEM_SHARE_ICNS}"
+ "OC_APPLICATION_NAME=${APPLICATION_NAME}"
+ "OC_APPLICATION_REV_DOMAIN=${APPLICATION_REV_DOMAIN}"
+ "OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX=${SOCKETAPI_TEAM_IDENTIFIER_PREFIX}"
COMMENT building Mac Overlay icons
VERBATIM)
-add_dependencies(mac_overlayplugin nextcloud) # for the ownCloud.icns to be generated
+ add_dependencies(mac_overlayplugin nextcloud) # for the ownCloud.icns to be generated
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex
- DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns
- USE_SOURCE_PERMISSIONS)
-endif(APPLE)
+ if (BUILD_OWNCLOUD_OSX_BUNDLE)
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Release/FinderSyncExt.appex
+ DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/PlugIns
+ USE_SOURCE_PERMISSIONS)
+ endif()
+endif()