Warning, /sdk/kdesvn/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 ####
0002  #   Copyright (C) 2005-2009 by Rajko Albrecht  ral@alwins-world.de        #
0003  #   http://kdesvn.alwins-world.de/                                        #
0004  #                                                                         #
0005  #   This program is free software; you can redistribute it and/or modify  #
0006  #   it under the terms of the GNU General Public License as published by  #
0007  #   the Free Software Foundation; either version 2 of the License, or     #
0008  #   (at your option) any later version.                                   #
0009  #                                                                         #
0010  #   This program is distributed in the hope that it will be useful,       #
0011  #   but WITHOUT ANY WARRANTY; without even the implied warranty of        #
0012  #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         #
0013  #   GNU General Public License for more details.                          #
0014  #                                                                         #
0015  #   You should have received a copy of the GNU General Public License     #
0016  #   along with this program; if not, write to the                         #
0017  #   Free Software Foundation, Inc.,                                       #
0018  #   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         #
0019  ####
0020 project(kdesvn)
0021 set(PACKAGENAME "${CMAKE_PROJECT_NAME}")
0022 cmake_minimum_required(VERSION 3.1.0)
0023 if(POLICY CMP0063)
0024   CMAKE_POLICY(SET CMP0063 NEW) # Honor visibility properties for all target types.
0025 endif()
0026 
0027 if(POLICY CMP0063)
0028   cmake_policy(SET CMP0063 NEW) # Honor visibility properties for all target types (since cmake 3.3)
0029 endif()
0030 
0031 # Where to look for Findxxx.cmake modules
0032 find_package(ECM 5.10.0 REQUIRED NO_MODULE)
0033 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/src/svnqt/cmake)
0034 # Automatically include the current source and binary dirs
0035 set(CMAKE_INCLUDE_CURRENT_DIR ON)
0036 set(CMAKE_AUTOMOC ON)
0037 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
0038 set(CXX_STANDARD 11)
0039 set(CMAKE_CXX_STANDARD_REQUIRED 11)
0040 add_definitions(-DTRANSLATION_DOMAIN="kdesvn")
0041 
0042 include(KDEInstallDirs)
0043 include(KDECompilerSettings)
0044 include(KDECMakeSettings)
0045 include(FeatureSummary)
0046 include(ECMInstallIcons)
0047 
0048 find_package(KF5 REQUIRED COMPONENTS
0049     Bookmarks Codecs Completion Config
0050     ConfigWidgets CoreAddons DBusAddons DocTools
0051     I18n IconThemes ItemViews JobWidgets KIO
0052     Notifications Parts Service TextWidgets
0053     Wallet WidgetsAddons XmlGui
0054 )
0055 set(QT_MIN_VERSION 5.9.0)
0056 find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS
0057     Core DBus Gui Sql Widgets Xml
0058 )
0059 
0060 # Set the version
0061 set(KDESVN_VERSION_MAJOR 2)
0062 set(KDESVN_VERSION_MINOR 1)
0063 set(KDESVN_VERSION_PATCH 0)
0064 set(KDESVN_VERSION_STRING ${KDESVN_VERSION_MAJOR}.${KDESVN_VERSION_MINOR}.${KDESVN_VERSION_PATCH})
0065 
0066 # Append the git revision if available
0067 # If Git is installed and a '.git' directory is found,
0068 # we append the Git revision to KDESVN_VERSION_STRING
0069 if(EXISTS "${kdesvn_SOURCE_DIR}/.git")
0070   find_package(Git)
0071   if(GIT_FOUND)
0072     message(STATUS "Found git: ${GIT_EXECUTABLE}")
0073     execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
0074                     WORKING_DIRECTORY ${kdesvn_SOURCE_DIR}
0075                     OUTPUT_VARIABLE kdesvn_git_revision
0076                     OUTPUT_STRIP_TRAILING_WHITESPACE)
0077     set(KDESVN_VERSION_STRING "${KDESVN_VERSION_STRING} (rev: ${kdesvn_git_revision})")
0078   endif()
0079 endif()
0080 
0081 option(TESTINGBUILD "Enable/Disable special testing flags" OFF)
0082 if(TESTINGBUILD)
0083     add_definitions(-DTESTING_RC=\"\\\"${CMAKE_SOURCE_DIR}/src/kdesvnui.rc\\\"\" -DTESTING_PARTRC=\"\\\"${CMAKE_SOURCE_DIR}/src/kdesvn_part.rc\\\"\")
0084     add_definitions(-DFORCE_ASKPASS=\"\\\"${CMAKE_BINARY_DIR}/bin/kdesvnaskpass\\\"\")
0085     add_definitions(-DEXTRA_KDE_LIBPATH=\"\\\"${PROJECT_BINARY_DIR}/lib\\\"\")
0086     add_definitions(-DDEBUG_TIMER=1)
0087 endif()
0088 
0089 add_definitions(-DQT_USE_QSTRINGBUILDER)
0090 add_definitions(-DQT_NO_CAST_TO_ASCII)
0091 # not (yet) possible
0092 #add_definitions(-DQT_NO_CAST_FROM_ASCII)
0093 add_definitions(-DQT_RESTRICTED_CAST_FROM_ASCII)
0094 add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
0095 # kde headers still use Q_FOREACH... :(
0096 # add_definitions(-DQT_NO_FOREACH)
0097 add_definitions(-DQT_DEPRECATED_WARNINGS)
0098 add_definitions(-DQT_STRICT_ITERATORS)
0099 add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050900)
0100 add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
0101 
0102 # include(MacroEnsureVersion)
0103 include(FindSubversion)
0104 include(kdesvn-macros)
0105 
0106 # Enable exceptions
0107 kde_enable_exceptions()
0108 
0109 include_directories(
0110     ${CMAKE_BINARY_DIR}
0111     ${APR_INCLUDE_DIR}
0112     ${APU_INCLUDE_DIR}
0113     ${SUBVERSION_INCLUDE_DIR}
0114 )
0115 
0116 add_definitions(${APR_CPP_FLAGS})
0117 
0118 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
0119 
0120 add_subdirectory(src)
0121 add_subdirectory(doc)
0122 kdoctools_install(po)
0123 
0124 configure_file(kdesvn-config.h.in kdesvn-config.h @ONLY)
0125 configure_file(Doxyfile.in Doxyfile @ONLY)
0126 configure_file(Doxyfile.svnqt.in Doxyfile.svnqt @ONLY)
0127 
0128 set(DIST_EXCLUDE "Helperstuff/pic_design")
0129 
0130 set(MESSAGES_DIR ${CMAKE_SOURCE_DIR}/src)
0131 
0132 add_custom_target(apidox
0133     "doxygen" "${CMAKE_BINARY_DIR}/Doxyfile"
0134     DEPENDS "${CMAKE_BINARY_DIR}/Doxyfile")
0135 
0136 ki18n_install(po)
0137 
0138 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)