2014-02-19 14:55:08 +04:00
|
|
|
set(CMAKE_AUTOMOC TRUE)
|
2014-04-30 15:54:47 +04:00
|
|
|
include(GenerateExportHeader)
|
2014-02-19 14:55:08 +04:00
|
|
|
|
2012-03-08 14:37:36 +04:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
2013-08-24 16:57:55 +04:00
|
|
|
qt_add_resources(MIRALL_RC_SRC ../mirall.qrc)
|
2013-05-17 22:56:17 +04:00
|
|
|
if ( IS_DIRECTORY ${OEM_THEME_DIR} )
|
2013-08-24 16:57:55 +04:00
|
|
|
qt_add_resources(MIRALL_RC_SRC ${OEM_THEME_DIR}/theme.qrc)
|
2013-01-19 01:15:08 +04:00
|
|
|
set(theme_dir ${OEM_THEME_DIR}/theme)
|
2013-01-09 19:29:50 +04:00
|
|
|
else()
|
2013-08-24 16:57:55 +04:00
|
|
|
qt_add_resources(MIRALL_RC_SRC ../theme.qrc)
|
2013-01-19 01:15:08 +04:00
|
|
|
set(theme_dir ${CMAKE_CURRENT_SOURCE_DIR}/../theme)
|
2013-01-09 19:29:50 +04:00
|
|
|
endif()
|
2011-10-19 13:53:12 +04:00
|
|
|
|
2013-08-23 12:16:54 +04:00
|
|
|
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
|
2013-07-08 03:44:11 +04:00
|
|
|
|
2014-01-15 14:08:42 +04:00
|
|
|
if ( APPLE )
|
|
|
|
list(APPEND OS_SPECIFIC_LINK_LIBRARIES
|
|
|
|
/System/Library/Frameworks/CoreServices.framework
|
|
|
|
/System/Library/Frameworks/Foundation.framework
|
|
|
|
/System/Library/Frameworks/AppKit.framework
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-01-23 19:05:07 +04:00
|
|
|
IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
|
|
|
list(APPEND OS_SPECIFIC_LINK_LIBRARIES
|
|
|
|
inotify
|
|
|
|
)
|
|
|
|
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
2014-01-15 14:08:42 +04:00
|
|
|
|
2014-04-06 21:34:56 +04:00
|
|
|
if(SPARKLE_FOUND AND NOT BUILD_LIBRARIES_ONLY)
|
2014-01-30 16:07:32 +04:00
|
|
|
list (APPEND OS_SPECIFIC_LINK_LIBRARIES ${SPARKLE_LIBRARY})
|
2014-04-06 21:34:56 +04:00
|
|
|
endif()
|
2014-01-15 14:08:42 +04:00
|
|
|
|
2012-07-30 18:10:48 +04:00
|
|
|
set(3rdparty_SRC
|
|
|
|
3rdparty/qtsingleapplication/qtsingleapplication.cpp
|
|
|
|
3rdparty/qtsingleapplication/qtlocalpeer.cpp
|
|
|
|
3rdparty/qtsingleapplication/qtsinglecoreapplication.cpp
|
|
|
|
3rdparty/qtlockedfile/qtlockedfile.cpp
|
2013-02-28 18:04:38 +04:00
|
|
|
3rdparty/fancylineedit/fancylineedit.cpp
|
2013-04-26 12:47:17 +04:00
|
|
|
3rdparty/QProgressIndicator/QProgressIndicator.cpp
|
2012-07-30 18:10:48 +04:00
|
|
|
)
|
|
|
|
|
2014-02-14 06:02:59 +04:00
|
|
|
if (APPLE)
|
|
|
|
list(APPEND 3rdparty_SRC
|
|
|
|
3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
|
|
|
|
3rdparty/qtmacgoodies/src/macstandardicon.mm
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2012-07-30 18:10:48 +04:00
|
|
|
set(3rdparty_HEADER
|
|
|
|
3rdparty/qtsingleapplication/qtlocalpeer.h
|
|
|
|
3rdparty/qtsingleapplication/qtsingleapplication.h
|
|
|
|
3rdparty/qtsingleapplication/qtsinglecoreapplication.h
|
2013-02-28 18:04:38 +04:00
|
|
|
3rdparty/fancylineedit/fancylineedit.h
|
|
|
|
3rdparty/QProgressIndicator/QProgressIndicator.h
|
2012-07-30 18:10:48 +04:00
|
|
|
)
|
2013-10-21 23:42:52 +04:00
|
|
|
|
2014-02-14 06:02:59 +04:00
|
|
|
if (APPLE)
|
|
|
|
list(APPEND 3rdparty_HEADER
|
|
|
|
3rdparty/qtmacgoodies/src/macpreferenceswindow.h
|
|
|
|
3rdparty/qtmacgoodies/src/macstandardicon.h
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2013-05-03 21:11:00 +04:00
|
|
|
if(NOT WIN32)
|
2012-07-30 18:10:48 +04:00
|
|
|
list(APPEND 3rdparty_SRC 3rdparty/qtlockedfile/qtlockedfile_unix.cpp)
|
|
|
|
else()
|
|
|
|
list(APPEND 3rdparty_SRC 3rdparty/qtlockedfile/qtlockedfile_win.cpp )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(3rdparty_INC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtlockedfile
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtsingleapplication
|
2013-03-02 00:30:22 +04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/QProgressIndicator
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/fancylineedit
|
2013-10-18 04:00:19 +04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qjson
|
2014-02-14 06:02:59 +04:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/qtmacgoodies/src
|
2012-07-30 18:10:48 +04:00
|
|
|
)
|
|
|
|
|
2012-07-10 17:59:06 +04:00
|
|
|
set(libsync_SRCS
|
|
|
|
mirall/folderman.cpp
|
|
|
|
mirall/folder.cpp
|
|
|
|
mirall/folderwatcher.cpp
|
|
|
|
mirall/syncresult.cpp
|
|
|
|
mirall/mirallconfigfile.cpp
|
2014-03-17 14:34:51 +04:00
|
|
|
mirall/syncengine.cpp
|
2013-05-03 21:11:00 +04:00
|
|
|
mirall/owncloudpropagator.cpp
|
2014-02-18 14:52:38 +04:00
|
|
|
mirall/propagatorjobs.cpp
|
|
|
|
mirall/propagator_qnam.cpp
|
|
|
|
mirall/propagator_legacy.cpp
|
2013-10-03 17:27:29 +04:00
|
|
|
mirall/syncjournalfilerecord.cpp
|
|
|
|
mirall/syncjournaldb.cpp
|
2012-07-12 16:33:58 +04:00
|
|
|
mirall/theme.cpp
|
|
|
|
mirall/owncloudtheme.cpp
|
2012-12-05 19:45:28 +04:00
|
|
|
mirall/logger.cpp
|
2012-12-14 00:36:44 +04:00
|
|
|
mirall/utility.cpp
|
2014-02-18 15:54:40 +04:00
|
|
|
mirall/filesystem.cpp
|
2013-05-04 16:03:51 +04:00
|
|
|
mirall/connectionvalidator.cpp
|
2013-07-05 20:46:43 +04:00
|
|
|
mirall/progressdispatcher.cpp
|
2013-08-01 18:22:54 +04:00
|
|
|
mirall/mirallaccessmanager.cpp
|
2013-10-18 14:24:29 +04:00
|
|
|
mirall/networkjobs.cpp
|
2013-10-21 23:42:52 +04:00
|
|
|
mirall/account.cpp
|
2013-11-05 21:15:47 +04:00
|
|
|
mirall/quotainfo.cpp
|
2014-01-16 15:06:45 +04:00
|
|
|
mirall/clientproxy.cpp
|
2014-03-26 21:01:26 +04:00
|
|
|
mirall/syncrunfilelog.cpp
|
2014-05-14 13:11:45 +04:00
|
|
|
mirall/cookiejar.cpp
|
2013-07-30 13:19:22 +04:00
|
|
|
creds/dummycredentials.cpp
|
2014-02-06 15:56:34 +04:00
|
|
|
creds/abstractcredentials.cpp
|
2013-07-30 13:19:22 +04:00
|
|
|
creds/credentialsfactory.cpp
|
|
|
|
creds/http/httpconfigfile.cpp
|
2013-08-06 13:50:08 +04:00
|
|
|
creds/credentialscommon.cpp
|
2013-10-18 04:00:19 +04:00
|
|
|
3rdparty/qjson/json.cpp
|
2012-07-12 16:33:58 +04:00
|
|
|
)
|
2014-03-11 19:55:53 +04:00
|
|
|
if(TOKEN_AUTH_ONLY)
|
|
|
|
set (libsync_SRCS
|
|
|
|
${libsync_SRCS}
|
|
|
|
creds/tokencredentials.cpp
|
|
|
|
)
|
2014-04-22 13:33:38 +04:00
|
|
|
else()
|
|
|
|
set (libsync_SRCS
|
|
|
|
${libsync_SRCS}
|
|
|
|
creds/httpcredentials.cpp
|
|
|
|
creds/shibbolethcredentials.cpp
|
|
|
|
creds/shibboleth/shibbolethwebview.cpp
|
|
|
|
creds/shibboleth/shibbolethrefresher.cpp
|
|
|
|
creds/shibboleth/authenticationdialog.cpp
|
|
|
|
creds/shibboleth/shibbolethuserjob.cpp
|
|
|
|
)
|
2014-03-11 19:55:53 +04:00
|
|
|
endif()
|
|
|
|
|
2014-01-14 18:05:29 +04:00
|
|
|
IF( NOT WIN32 AND NOT APPLE )
|
2014-01-23 16:17:53 +04:00
|
|
|
set(libsync_SRCS ${libsync_SRCS} mirall/folderwatcher_linux.cpp)
|
2012-12-05 21:23:35 +04:00
|
|
|
ENDIF()
|
2013-05-03 21:11:00 +04:00
|
|
|
IF( WIN32 )
|
2012-12-05 21:23:35 +04:00
|
|
|
set(libsync_SRCS ${libsync_SRCS} mirall/folderwatcher_win.cpp)
|
2012-07-10 17:59:06 +04:00
|
|
|
ENDIF()
|
2012-12-06 21:48:36 +04:00
|
|
|
IF( APPLE )
|
2014-01-15 14:08:42 +04:00
|
|
|
list(APPEND libsync_SRCS mirall/folderwatcher_mac.cpp)
|
2012-12-06 21:48:36 +04:00
|
|
|
ENDIF()
|
|
|
|
|
2012-07-10 17:59:06 +04:00
|
|
|
|
2013-12-08 11:55:18 +04:00
|
|
|
# These headers are installed for libowncloudsync to be used by 3rd party apps
|
|
|
|
set(owncloudsync_HEADERS
|
|
|
|
mirall/account.h
|
2014-03-17 14:34:51 +04:00
|
|
|
mirall/syncengine.h
|
2013-12-08 11:55:18 +04:00
|
|
|
mirall/folder.h
|
|
|
|
mirall/folderman.h
|
|
|
|
mirall/folderwatcher.h
|
|
|
|
mirall/mirallconfigfile.h
|
|
|
|
mirall/networkjobs.h
|
|
|
|
mirall/progressdispatcher.h
|
|
|
|
mirall/syncfileitem.h
|
|
|
|
mirall/syncjournaldb.h
|
|
|
|
mirall/syncresult.h
|
|
|
|
)
|
|
|
|
|
|
|
|
set(creds_HEADERS
|
|
|
|
creds/abstractcredentials.h
|
|
|
|
creds/httpcredentials.h
|
|
|
|
)
|
|
|
|
|
2013-12-09 23:39:55 +04:00
|
|
|
IF (NOT APPLE)
|
|
|
|
INSTALL(
|
|
|
|
FILES ${owncloudsync_HEADERS}
|
2014-03-07 16:05:17 +04:00
|
|
|
DESTINATION ${INCLUDE_INSTALL_DIR}/${synclib_NAME}/mirall
|
2013-12-09 23:39:55 +04:00
|
|
|
)
|
|
|
|
INSTALL(
|
|
|
|
FILES ${creds_HEADERS}
|
2014-03-07 16:05:17 +04:00
|
|
|
DESTINATION ${INCLUDE_INSTALL_DIR}/${synclib_NAME}/creds
|
2013-12-09 23:39:55 +04:00
|
|
|
)
|
|
|
|
ENDIF(NOT APPLE)
|
2013-05-03 21:11:00 +04:00
|
|
|
|
2012-11-13 14:20:55 +04:00
|
|
|
list(APPEND libsync_LINK_TARGETS
|
|
|
|
${QT_LIBRARIES}
|
2014-01-15 15:20:03 +04:00
|
|
|
ocsync
|
|
|
|
httpbf
|
2014-01-15 14:08:42 +04:00
|
|
|
${OS_SPECIFIC_LINK_LIBRARIES}
|
2012-11-13 14:20:55 +04:00
|
|
|
)
|
|
|
|
|
2014-04-08 12:55:30 +04:00
|
|
|
if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
|
2012-11-13 14:20:55 +04:00
|
|
|
list(APPEND libsync_LINK_TARGETS ${QTKEYCHAIN_LIBRARY})
|
|
|
|
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
|
|
|
|
endif()
|
|
|
|
|
2013-09-10 21:50:44 +04:00
|
|
|
if(NEON_FOUND)
|
|
|
|
list(APPEND libsync_LINK_TARGETS ${NEON_LIBRARIES})
|
|
|
|
include_directories(${NEON_INCLUDE_DIRS})
|
2013-12-10 19:13:07 +04:00
|
|
|
|
|
|
|
if(NEON_WITH_LFS)
|
|
|
|
add_definitions(-DNE_LFS)
|
|
|
|
endif()
|
|
|
|
|
2013-09-10 21:50:44 +04:00
|
|
|
endif()
|
|
|
|
|
2013-07-08 03:44:11 +04:00
|
|
|
add_library(${synclib_NAME} SHARED ${libsync_SRCS} ${syncMoc})
|
2014-04-30 15:54:47 +04:00
|
|
|
GENERATE_EXPORT_HEADER( ${synclib_NAME}
|
|
|
|
BASE_NAME ${synclib_NAME}
|
|
|
|
EXPORT_MACRO_NAME OWNCLOUDSYNC_EXPORT
|
|
|
|
EXPORT_FILE_NAME owncloudlib.h
|
|
|
|
STATIC_DEFINE OWNCLOUD_BUILT_AS_STATIC
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2014-04-06 21:34:56 +04:00
|
|
|
if(TOKEN_AUTH_ONLY)
|
|
|
|
qt5_use_modules(${synclib_NAME} Network Xml Sql)
|
|
|
|
else()
|
|
|
|
qt5_use_modules(${synclib_NAME} Widgets Network Xml WebKitWidgets Sql)
|
|
|
|
endif()
|
2013-08-24 16:57:55 +04:00
|
|
|
|
2013-07-08 03:44:11 +04:00
|
|
|
set_target_properties( ${synclib_NAME} PROPERTIES
|
2013-12-09 19:35:30 +04:00
|
|
|
VERSION ${MIRALL_VERSION}
|
|
|
|
SOVERSION ${MIRALL_SOVERSION}
|
2013-02-08 21:21:59 +04:00
|
|
|
)
|
2014-04-11 15:27:41 +04:00
|
|
|
set_target_properties( ${synclib_NAME} PROPERTIES
|
|
|
|
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}" )
|
2013-02-08 21:21:59 +04:00
|
|
|
|
2013-07-08 03:44:11 +04:00
|
|
|
target_link_libraries(${synclib_NAME} ${libsync_LINK_TARGETS} )
|
2014-03-28 12:34:21 +04:00
|
|
|
|
|
|
|
if(BUILD_LIBRARIES_ONLY)
|
2014-04-06 21:34:56 +04:00
|
|
|
#add_library(${synclib_NAME}_static STATIC ${libsync_SRCS} ${syncMoc})
|
|
|
|
#qt5_use_modules(${synclib_NAME}_static Widgets Network Xml Sql)
|
2014-03-28 12:34:21 +04:00
|
|
|
|
2014-04-06 21:34:56 +04:00
|
|
|
#set_target_properties( ${synclib_NAME}_static PROPERTIES
|
|
|
|
# VERSION ${MIRALL_VERSION}
|
|
|
|
# SOVERSION ${MIRALL_SOVERSION}
|
|
|
|
#)
|
2014-03-28 12:34:21 +04:00
|
|
|
|
2014-04-06 21:34:56 +04:00
|
|
|
#target_link_libraries(${synclib_NAME}_static ${libsync_LINK_TARGETS} )
|
2014-03-28 12:34:21 +04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2012-07-12 16:33:58 +04:00
|
|
|
|
2012-07-17 17:16:02 +04:00
|
|
|
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
2013-07-08 03:44:11 +04:00
|
|
|
install(TARGETS ${synclib_NAME}
|
2012-07-17 17:16:02 +04:00
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
)
|
2013-01-14 14:41:30 +04:00
|
|
|
if(NOT WIN32)
|
|
|
|
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
2013-08-26 22:17:53 +04:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop)
|
2013-08-26 22:35:56 +04:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION share/applications )
|
2013-01-14 14:41:30 +04:00
|
|
|
endif()
|
2012-07-17 17:16:02 +04:00
|
|
|
else()
|
2013-07-08 03:44:11 +04:00
|
|
|
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
2014-01-30 16:07:32 +04:00
|
|
|
if (SPARKLE_FOUND)
|
|
|
|
install(DIRECTORY "${SPARKLE_LIBRARY}"
|
2014-01-15 20:52:19 +04:00
|
|
|
DESTINATION "${OWNCLOUD_OSX_BUNDLE}/Contents/Frameworks")
|
2014-01-30 16:07:32 +04:00
|
|
|
endif (SPARKLE_FOUND)
|
2014-01-15 19:01:35 +04:00
|
|
|
|
2012-07-17 17:16:02 +04:00
|
|
|
endif()
|
2012-07-10 17:59:06 +04:00
|
|
|
|
2013-08-24 16:57:55 +04:00
|
|
|
set(mirall_UI
|
|
|
|
mirall/folderwizardsourcepage.ui
|
|
|
|
mirall/folderwizardtargetpage.ui
|
|
|
|
mirall/sslerrordialog.ui
|
|
|
|
mirall/settingsdialog.ui
|
|
|
|
mirall/generalsettings.ui
|
|
|
|
mirall/networksettings.ui
|
|
|
|
mirall/accountsettings.ui
|
|
|
|
mirall/ignorelisteditor.ui
|
2013-10-08 16:12:05 +04:00
|
|
|
mirall/protocolwidget.ui
|
2013-08-24 16:57:55 +04:00
|
|
|
wizard/owncloudsetupnocredspage.ui
|
|
|
|
wizard/owncloudhttpcredspage.ui
|
|
|
|
wizard/owncloudwizardresultpage.ui
|
|
|
|
wizard/owncloudadvancedsetuppage.ui
|
|
|
|
)
|
|
|
|
|
|
|
|
qt_wrap_ui(mirall_UI_SRCS ${mirall_UI})
|
|
|
|
|
2011-02-17 02:21:45 +03:00
|
|
|
set(mirall_SRCS
|
2012-07-10 17:59:06 +04:00
|
|
|
mirall/application.cpp
|
2013-03-20 13:03:49 +04:00
|
|
|
mirall/systray.cpp
|
2012-07-10 17:59:06 +04:00
|
|
|
mirall/folderwizard.cpp
|
2013-07-04 21:59:40 +04:00
|
|
|
mirall/folderstatusmodel.cpp
|
2013-10-08 16:12:05 +04:00
|
|
|
mirall/protocolwidget.cpp
|
2013-10-28 23:01:59 +04:00
|
|
|
wizard/owncloudwizard.cpp
|
|
|
|
wizard/owncloudsetuppage.cpp
|
|
|
|
wizard/owncloudhttpcredspage.cpp
|
2014-02-23 14:02:03 +04:00
|
|
|
wizard/abstractcredswizardpage.cpp
|
2013-10-28 23:01:59 +04:00
|
|
|
wizard/owncloudwizardresultpage.cpp
|
|
|
|
wizard/owncloudwizardcommon.cpp
|
|
|
|
wizard/owncloudshibbolethcredspage.cpp
|
|
|
|
wizard/owncloudadvancedsetuppage.cpp
|
|
|
|
mirall/owncloudsetupwizard.cpp
|
2012-07-10 17:59:06 +04:00
|
|
|
mirall/sslerrordialog.cpp
|
|
|
|
mirall/logbrowser.cpp
|
2013-07-04 21:59:40 +04:00
|
|
|
mirall/settingsdialog.cpp
|
|
|
|
mirall/generalsettings.cpp
|
2013-07-24 21:53:05 +04:00
|
|
|
mirall/networksettings.cpp
|
2013-07-04 21:59:40 +04:00
|
|
|
mirall/accountsettings.cpp
|
2013-07-24 21:53:05 +04:00
|
|
|
mirall/ignorelisteditor.cpp
|
2013-10-01 15:52:07 +04:00
|
|
|
mirall/owncloudgui.cpp
|
2013-10-03 19:04:55 +04:00
|
|
|
mirall/socketapi.cpp
|
2014-01-21 04:45:02 +04:00
|
|
|
mirall/sslbutton.cpp
|
2011-03-18 03:14:45 +03:00
|
|
|
)
|
2011-10-26 15:59:06 +04:00
|
|
|
|
2014-03-11 19:55:53 +04:00
|
|
|
|
|
|
|
|
2012-03-01 19:10:08 +04:00
|
|
|
set(mirall_HEADERS
|
2012-04-14 06:17:27 +04:00
|
|
|
mirall/application.h
|
2013-03-20 13:03:49 +04:00
|
|
|
mirall/systray.h
|
2012-03-01 19:10:08 +04:00
|
|
|
mirall/folderwizard.h
|
2013-10-28 23:01:59 +04:00
|
|
|
mirall/owncloudsetupwizard.h
|
|
|
|
wizard/owncloudwizard.h
|
|
|
|
wizard/owncloudsetuppage.h
|
|
|
|
wizard/owncloudhttpcredspage.h
|
2014-02-23 14:02:03 +04:00
|
|
|
wizard/abstractcredswizardpage.h
|
2013-10-28 23:01:59 +04:00
|
|
|
wizard/owncloudwizardresultpage.h
|
|
|
|
wizard/owncloudwizardcommon.h
|
|
|
|
wizard/owncloudshibbolethcredspage.h
|
|
|
|
wizard/owncloudadvancedsetuppage.h
|
2013-07-04 21:59:40 +04:00
|
|
|
mirall/folderstatusmodel.h
|
2012-04-06 10:53:57 +04:00
|
|
|
mirall/sslerrordialog.h
|
2012-06-05 17:11:29 +04:00
|
|
|
mirall/logbrowser.h
|
2013-07-04 21:59:40 +04:00
|
|
|
mirall/settingsdialog.h
|
|
|
|
mirall/generalsettings.h
|
2013-07-24 21:53:05 +04:00
|
|
|
mirall/networksettings.h
|
2013-07-04 21:59:40 +04:00
|
|
|
mirall/accountsettings.h
|
2013-07-05 18:54:11 +04:00
|
|
|
mirall/ignorelisteditor.h
|
2013-10-08 16:12:05 +04:00
|
|
|
mirall/protocolwidget.h
|
2013-10-01 15:52:07 +04:00
|
|
|
mirall/owncloudgui.h
|
2013-10-03 19:04:55 +04:00
|
|
|
mirall/socketapi.h
|
2014-01-21 04:45:02 +04:00
|
|
|
mirall/sslbutton.h
|
2012-03-01 19:10:08 +04:00
|
|
|
)
|
|
|
|
|
2014-01-29 13:38:12 +04:00
|
|
|
set(updater_SRCS
|
|
|
|
updater/updateinfo.cpp
|
|
|
|
updater/updater.cpp
|
|
|
|
updater/ocupdater.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
set(updater_HEADERS
|
|
|
|
updater/updater.h
|
|
|
|
updater/ocupdater.h
|
|
|
|
)
|
|
|
|
|
2014-01-15 14:08:42 +04:00
|
|
|
IF( APPLE )
|
2014-01-29 13:38:12 +04:00
|
|
|
list(APPEND mirall_SRCS mirall/cocoainitializer_mac.mm)
|
|
|
|
list(APPEND mirall_HEADERS mirall/cocoainitializer.h)
|
|
|
|
|
2014-02-14 06:02:59 +04:00
|
|
|
list(APPEND mirall_SRCS mirall/settingsdialogmac.cpp)
|
|
|
|
list(APPEND mirall_HEADERS mirall/settingsdialogmac.h)
|
|
|
|
|
2014-02-03 19:31:24 +04:00
|
|
|
if(SPARKLE_FOUND)
|
|
|
|
# Define this, we need to check in updater.cpp
|
|
|
|
add_definitions( -DHAVE_SPARKLE )
|
|
|
|
list(APPEND updater_SRCS updater/sparkleupdater_mac.mm)
|
|
|
|
list(APPEND updater_HEADERS updater/sparkleupdater.h)
|
|
|
|
endif()
|
2014-01-15 14:08:42 +04:00
|
|
|
ENDIF()
|
|
|
|
|
2012-07-10 17:59:06 +04:00
|
|
|
# csync is required.
|
2014-01-15 15:20:03 +04:00
|
|
|
include_directories(../csync/src ../csync/src/httpbf/src ${CMAKE_CURRENT_BINARY_DIR}/../csync ${CMAKE_CURRENT_BINARY_DIR}/../csync/src )
|
2012-07-30 18:10:48 +04:00
|
|
|
include_directories(${3rdparty_INC})
|
2011-11-07 20:09:02 +04:00
|
|
|
|
2013-08-24 16:57:55 +04:00
|
|
|
qt_add_translation(mirall_I18N ${TRANSLATIONS})
|
2012-03-26 11:48:30 +04:00
|
|
|
|
2012-04-16 12:51:20 +04:00
|
|
|
set( final_src
|
|
|
|
${mirall_HEADERS}
|
|
|
|
${MIRALL_RC_SRC}
|
|
|
|
${mirall_SRCS}
|
|
|
|
${mirall_UI_SRCS}
|
|
|
|
${mirallMoc}
|
|
|
|
${mirall_HEADERS}
|
|
|
|
${mirall_I18N}
|
2012-07-30 18:10:48 +04:00
|
|
|
${3rdparty_SRC}
|
|
|
|
${3rdparty_MOC}
|
2012-04-16 12:51:20 +04:00
|
|
|
)
|
2012-03-01 19:10:08 +04:00
|
|
|
|
2012-04-02 15:44:00 +04:00
|
|
|
# add executable icon on windows and osx
|
|
|
|
include( AddAppIconMacro )
|
2012-04-16 12:51:20 +04:00
|
|
|
set(ownCloud_old ${ownCloud})
|
2013-01-19 01:15:08 +04:00
|
|
|
|
2013-09-24 14:19:29 +04:00
|
|
|
# set an icon_app_name. For historical reasons we can not use the
|
|
|
|
# application_shortname for ownCloud but must rather set it manually.
|
|
|
|
if ( EXISTS ${OEM_THEME_DIR}/OEM.cmake )
|
|
|
|
set(ICON_APP_NAME ${APPLICATION_SHORTNAME})
|
|
|
|
else()
|
|
|
|
set(ICON_APP_NAME "owncloud")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
kde4_add_app_icon( ownCloud "${theme_dir}/colored/${ICON_APP_NAME}-icon*.png")
|
2012-04-16 12:51:20 +04:00
|
|
|
list(APPEND final_src ${ownCloud})
|
|
|
|
set(ownCloud ${ownCloud_old})
|
2012-04-02 15:44:00 +04:00
|
|
|
|
2013-09-05 20:41:49 +04:00
|
|
|
if (WITH_DBUS)
|
|
|
|
set(ADDITIONAL_APP_MODULES DBus)
|
|
|
|
endif(WITH_DBUS)
|
|
|
|
|
2014-04-22 13:33:38 +04:00
|
|
|
if(NOT BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY)
|
2012-04-16 12:51:20 +04:00
|
|
|
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
2012-03-01 19:56:08 +04:00
|
|
|
|
2014-04-22 13:33:38 +04:00
|
|
|
if(NOT WIN32)
|
|
|
|
file( GLOB _icons "${theme_dir}/colored/${ICON_APP_NAME}-icon-*.png" )
|
|
|
|
foreach( _file ${_icons} )
|
|
|
|
string( REPLACE "${theme_dir}/colored/${ICON_APP_NAME}-icon-" "" _res ${_file} )
|
|
|
|
string( REPLACE ".png" "" _res ${_res} )
|
|
|
|
install( FILES ${_file} RENAME ${ICON_APP_NAME}.png DESTINATION ${DATADIR}/icons/hicolor/${_res}x${_res}/apps )
|
|
|
|
endforeach( _file )
|
|
|
|
endif(NOT WIN32)
|
2012-05-11 12:28:33 +04:00
|
|
|
|
2013-08-26 23:18:56 +04:00
|
|
|
install(FILES ${mirall_I18N} DESTINATION share/${APPLICATION_EXECUTABLE}/i18n)
|
2012-04-16 12:51:20 +04:00
|
|
|
|
|
|
|
# we may not add MACOSX_BUNDLE here, if not building one
|
2012-05-11 12:09:27 +04:00
|
|
|
|
2012-09-20 11:19:26 +04:00
|
|
|
# add_executable( ${APPLICATION_EXECUTABLE} main.cpp ${final_src})
|
|
|
|
add_executable( ${APPLICATION_EXECUTABLE} WIN32 main.cpp ${final_src})
|
2013-10-03 18:29:18 +04:00
|
|
|
qt5_use_modules(${APPLICATION_EXECUTABLE} Widgets Network Xml WebKitWidgets Sql ${ADDITIONAL_APP_MODULES})
|
2014-03-11 20:56:29 +04:00
|
|
|
elseif(NOT BUILD_LIBRARIES_ONLY)
|
2012-04-16 12:51:20 +04:00
|
|
|
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
2014-03-13 03:49:20 +04:00
|
|
|
if (Qt5Core_FOUND)
|
|
|
|
include(DeployQt5)
|
|
|
|
else(Qt5Core_FOUND)
|
|
|
|
include(DeployQt4)
|
|
|
|
endif(Qt5Core_FOUND)
|
2012-04-16 12:51:20 +04:00
|
|
|
|
|
|
|
set(CMAKE_INSTALL_PREFIX ".") # Examples use /Applications. hurmpf.
|
|
|
|
set(MACOSX_BUNDLE_ICON_FILE "ownCloud.icns")
|
|
|
|
|
|
|
|
# we must add MACOSX_BUNDLE only if building a bundle
|
2012-09-20 11:19:26 +04:00
|
|
|
add_executable( ${APPLICATION_EXECUTABLE} WIN32 MACOSX_BUNDLE main.cpp ${final_src})
|
2013-10-03 18:29:18 +04:00
|
|
|
qt5_use_modules(${APPLICATION_EXECUTABLE} Widgets Network Xml WebKitWidgets Sql ${ADDITIONAL_APP_MODULES})
|
2012-04-16 12:51:20 +04:00
|
|
|
|
2013-02-14 21:27:44 +04:00
|
|
|
set (QM_DIR ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/Translations)
|
|
|
|
install(FILES ${mirall_I18N} DESTINATION ${QM_DIR})
|
|
|
|
file(GLOB qt_I18N ${QT_TRANSLATIONS_DIR}/qt_??.qm ${QT_TRANSLATIONS_DIR}/qt_??_??.qm)
|
|
|
|
install(FILES ${qt_I18N} DESTINATION ${QM_DIR})
|
|
|
|
file(GLOB qtkeychain_I18N ${QT_TRANSLATIONS_DIR}/qtkeychain*.qm)
|
|
|
|
install(FILES ${qtkeychain_I18N} DESTINATION ${QM_DIR})
|
2012-04-16 12:51:20 +04:00
|
|
|
endif()
|
2012-03-01 19:56:08 +04:00
|
|
|
|
2014-03-11 19:55:53 +04:00
|
|
|
if(NOT BUILD_LIBRARIES_ONLY)
|
2014-04-06 21:34:56 +04:00
|
|
|
add_library(updater STATIC ${updater_SRCS} ${updaterMoc})
|
|
|
|
target_link_libraries(updater ${synclib_NAME})
|
|
|
|
qt5_use_modules(updater Widgets Network Xml)
|
|
|
|
|
2014-03-11 19:55:53 +04:00
|
|
|
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY}
|
|
|
|
)
|
2014-04-11 15:27:41 +04:00
|
|
|
set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES
|
|
|
|
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}" )
|
|
|
|
|
2014-03-11 19:55:53 +04:00
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${QT_LIBRARIES} )
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} updater )
|
|
|
|
target_link_libraries( ${APPLICATION_EXECUTABLE} ${OS_SPECIFIC_LINK_LIBRARIES} )
|
|
|
|
|
|
|
|
install(TARGETS ${APPLICATION_EXECUTABLE}
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
BUNDLE DESTINATION "."
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2011-11-07 20:09:02 +04:00
|
|
|
|
2013-02-09 15:46:08 +04:00
|
|
|
#FIXME: find a nice solution to make the second if(BUILD_OWNCLOUD_OSX_BUNDLE) unnecessary
|
2012-04-16 12:51:20 +04:00
|
|
|
# currently it needs to be done because the code right above needs to be executed no matter
|
|
|
|
# if building a bundle or not and the install_qt4_executable needs to be called afterwards
|
2014-03-11 19:55:53 +04:00
|
|
|
if(BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY)
|
2014-03-13 03:49:20 +04:00
|
|
|
if(Qt5Core_FOUND)
|
|
|
|
install_qt5_executable(${OWNCLOUD_OSX_BUNDLE} "qtaccessiblewidgets;qsqlite;qcocoa")
|
|
|
|
else(Qt5Core_FOUND)
|
|
|
|
install_qt4_executable(${OWNCLOUD_OSX_BUNDLE} "qtaccessiblewidgets;qsqlite")
|
|
|
|
endif(Qt5Core_FOUND)
|
2012-04-17 15:08:27 +04:00
|
|
|
endif()
|
2012-05-21 20:09:30 +04:00
|
|
|
|
2012-06-04 18:44:49 +04:00
|
|
|
find_program(KRAZY2_EXECUTABLE krazy2)
|
|
|
|
if(KRAZY2_EXECUTABLE)
|
2012-06-05 17:11:29 +04:00
|
|
|
# s/y k/y ALL k/ for building this target always
|
|
|
|
add_custom_target( krazy krazy2 --check-sets c++,qt4,foss
|
|
|
|
${PROJECT_SOURCE_DIR}/src/mirall/*.ui
|
|
|
|
${PROJECT_SOURCE_DIR}/src/mirall/*.h
|
|
|
|
${PROJECT_SOURCE_DIR}/src/mirall/*.cpp
|
2012-05-21 20:09:30 +04:00
|
|
|
)
|
2012-06-04 18:44:49 +04:00
|
|
|
endif()
|
|
|
|
|
2013-11-14 17:20:09 +04:00
|
|
|
set(owncloudcmd_NAME ${APPLICATION_EXECUTABLE}cmd)
|
2014-04-01 17:57:37 +04:00
|
|
|
set(OWNCLOUDCMD_SRC owncloudcmd/simplesslerrorhandler.cpp owncloudcmd/owncloudcmd.cpp)
|
2014-03-11 19:55:53 +04:00
|
|
|
if(NOT BUILD_LIBRARIES_ONLY)
|
2014-04-11 15:27:41 +04:00
|
|
|
|
2014-03-11 19:55:53 +04:00
|
|
|
add_executable(${owncloudcmd_NAME} ${OWNCLOUDCMD_SRC})
|
|
|
|
qt5_use_modules(${owncloudcmd_NAME} Network Sql)
|
|
|
|
set_target_properties(${owncloudcmd_NAME} PROPERTIES
|
2014-04-11 15:27:41 +04:00
|
|
|
RUNTIME_OUTPUT_DIRECTORY ${BIN_OUTPUT_DIRECTORY} )
|
|
|
|
set_target_properties(${owncloudcmd_NAME} PROPERTIES
|
|
|
|
INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE}" )
|
|
|
|
|
2014-03-11 19:55:53 +04:00
|
|
|
target_link_libraries(${owncloudcmd_NAME} ${synclib_NAME})
|
|
|
|
endif()
|
|
|
|
|
2013-05-04 15:52:35 +04:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/mirall)
|
2014-03-11 19:55:53 +04:00
|
|
|
if(BUILD_OWNCLOUD_OSX_BUNDLE AND NOT BUILD_LIBRARIES_ONLY)
|
2014-01-15 21:14:37 +04:00
|
|
|
install(TARGETS ${owncloudcmd_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
2014-02-04 20:32:26 +04:00
|
|
|
if (SPARKLE_FOUND)
|
2014-02-13 17:11:04 +04:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/admin/osx/deny_autoupdate_com.owncloud.desktopclient.plist
|
|
|
|
DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources)
|
2014-02-04 20:32:26 +04:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/admin/osx/sparkle/dsa_pub.pem
|
|
|
|
DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources)
|
|
|
|
endif()
|
2014-03-11 20:56:29 +04:00
|
|
|
elseif(NOT BUILD_LIBRARIES_ONLY)
|
2014-01-15 21:14:37 +04:00
|
|
|
install(TARGETS ${owncloudcmd_NAME}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
|
|
endif()
|