Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Schmidt <dev@dominik-schmidt.de>2018-06-05 18:48:38 +0300
committerDominik Schmidt <domme@tomahawk-player.org>2018-06-15 10:44:24 +0300
commit5989c8494978919489ae6458941e82a355193497 (patch)
tree01dd93ee5d32e4d3dab37d2c47201315afd04843
parent3e9dadc1edbf156ae6b1ccf34317adc8484656d6 (diff)
Move theme related logic into a single THEME.cmake
-rw-r--r--CMakeLists.txt40
-rw-r--r--THEME.cmake38
2 files changed, 40 insertions, 38 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a7856a0e3..335fa1290 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,48 +5,12 @@ project(client)
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+include("${CMAKE_CURRENT_LIST_DIR}/THEME.cmake")
-set(OEM_THEME_DIR "" CACHE STRING "Define directory containing a custom theme")
-if ( EXISTS ${OEM_THEME_DIR}/OEM.cmake )
- include ( ${OEM_THEME_DIR}/OEM.cmake )
-else ()
- include ( ${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake )
-endif()
-
-# Default suffix if the theme doesn't define one
-if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX)
- set(APPLICATION_VIRTUALFILE_SUFFIX "${APPLICATION_SHORTNAME}_virtual" CACHE STRING "Virtual file suffix (not including the .)")
-endif()
-
-# need this logic to not mess with re/uninstallations via macosx.pkgproj
-if(${APPLICATION_REV_DOMAIN} STREQUAL "com.owncloud.desktopclient")
- set(APPLICATION_REV_DOMAIN_INSTALLER "com.ownCloud.client")
-else()
- set(APPLICATION_REV_DOMAIN_INSTALLER ${APPLICATION_REV_DOMAIN})
-endif()
-
-# For usage in XML files we preprocess
-string(REPLACE "&" "&amp;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME}")
-string(REPLACE "<" "&lt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
-string(REPLACE ">" "&gt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
-
-if (NOT DEFINED LINUX_PACKAGE_SHORTNAME)
- set(LINUX_PACKAGE_SHORTNAME "${APPLICATION_SHORTNAME}")
-endif()
-
-if (NOT DEFINED PACKAGE)
- set(PACKAGE "${LINUX_PACKAGE_SHORTNAME}-client")
-endif()
-
-set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
-
-if(NOT CRASHREPORTER_EXECUTABLE)
- set(CRASHREPORTER_EXECUTABLE "${APPLICATION_EXECUTABLE}_crash_reporter")
-endif()
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
include(Warnings)
-include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
# For config.h
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
# Allows includes based on src/ like #include "common/utility.h" or #include "csync/csync.h"
diff --git a/THEME.cmake b/THEME.cmake
new file mode 100644
index 000000000..e0946dac0
--- /dev/null
+++ b/THEME.cmake
@@ -0,0 +1,38 @@
+set(OEM_THEME_DIR "" CACHE STRING "Define directory containing a custom theme")
+if (EXISTS "${OEM_THEME_DIR}/OEM.cmake")
+ include("${OEM_THEME_DIR}/OEM.cmake")
+else()
+ include ("${CMAKE_CURRENT_LIST_DIR}/OWNCLOUD.cmake")
+endif()
+
+# Default suffix if the theme doesn't define one
+if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX)
+ set(APPLICATION_VIRTUALFILE_SUFFIX "${APPLICATION_SHORTNAME}_virtual" CACHE STRING "Virtual file suffix (not including the .)")
+endif()
+
+# need this logic to not mess with re/uninstallations via macosx.pkgproj
+if(${APPLICATION_REV_DOMAIN} STREQUAL "com.owncloud.desktopclient")
+ set(APPLICATION_REV_DOMAIN_INSTALLER "com.ownCloud.client")
+else()
+ set(APPLICATION_REV_DOMAIN_INSTALLER ${APPLICATION_REV_DOMAIN})
+endif()
+
+# For usage in XML files we preprocess
+string(REPLACE "&" "&amp;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME}")
+string(REPLACE "<" "&lt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
+string(REPLACE ">" "&gt;" APPLICATION_NAME_XML_ESCAPED "${APPLICATION_NAME_XML_ESCAPED}")
+
+if (NOT DEFINED LINUX_PACKAGE_SHORTNAME)
+ set(LINUX_PACKAGE_SHORTNAME "${APPLICATION_SHORTNAME}")
+endif()
+
+if (NOT DEFINED PACKAGE)
+ set(PACKAGE "${LINUX_PACKAGE_SHORTNAME}-client")
+endif()
+
+if(NOT CRASHREPORTER_EXECUTABLE)
+ set(CRASHREPORTER_EXECUTABLE "${APPLICATION_EXECUTABLE}_crash_reporter")
+endif()
+
+
+include("${CMAKE_CURRENT_LIST_DIR}/VERSION.cmake")