diff --git a/CMakeLists.txt b/CMakeLists.txt index 619a4ce2..0df4c9ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,72 +1,72 @@ PROJECT(rkward) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12) # As required by KF5 IF(NOT "${CMAKE_VERSION}" VERSION_LESS 3.3.0) CMAKE_POLICY(SET CMP0063 NEW) # Shut up cmake warning ENDIF() IF(NOT CMAKE_VERBOSE_MAKEFILE) SET (FORCE_PRETTY_MAKEFILE ON) ENDIF(NOT CMAKE_VERBOSE_MAKEFILE) FIND_PACKAGE(ECM 0.0.11 REQUIRED NO_MODULE) SET(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) INCLUDE(KDEInstallDirs) INCLUDE(KDECMakeSettings) INCLUDE(KDECompilerSettings) INCLUDE(ECMInstallIcons) INCLUDE(ECMAddAppIcon) INCLUDE(ECMMarkNonGuiExecutable) INCLUDE(FeatureSummary) FIND_PACKAGE(Qt5 5.2 CONFIG REQUIRED COMPONENTS Widgets Core Xml Network Script PrintSupport) FIND_PACKAGE(KF5 5.2 REQUIRED COMPONENTS CoreAddons DocTools I18n XmlGui TextEditor WidgetsAddons Parts Config Notifications WindowSystem OPTIONAL_COMPONENTS Crash) IF(NOT NO_QT_WEBENGINE) FIND_PACKAGE(Qt5 OPTIONAL_COMPONENTS WebEngine) -ENDIF(NOT NoQtWebEngine) +ENDIF(NOT NO_QT_WEBENGINE) IF(NOT Qt5WebEngine_FOUND) FIND_PACKAGE(KF5 5.2 OPTIONAL_COMPONENTS WebKit) IF(NOT KF5_WebKit_FOUND) MESSAGE(FATAL_ERROR "At least one of KF5WebKit or QtWebEngine is required. Neither was found on this system.") ENDIF(NOT KF5_WebKit_FOUND) ADD_DEFINITIONS(-DNO_QT_WEBENGINE) # TODO: rather set it for rkhtmlwindow, only ELSE(Qt5WebEngine_FOUND) MESSAGE(STATUS "QtWebEngine will be used for rendering HTML. To use KF5WebKit, instead (if available), pass -DNO_QT_WEBENGINE in your call to cmake.") ENDIF(Qt5WebEngine_FOUND) FIND_PACKAGE(Gettext REQUIRED) # FindIntl in cmake is broken for MSVC on Windows, (and only included from 3.2.3 upwards). # Borrowing some code from ki18n instead (originally BSD licensed, copyright Copyright 2014 Alex Richardson ) FIND_PATH(LibIntl_INCLUDE_DIRS NAMES libintl.h) FIND_LIBRARY(LibIntl_LIBRARIES NAMES intl libintl) INCLUDE(CheckCXXSymbolExists) CHECK_CXX_SYMBOL_EXISTS(dngettext libintl.h LibIntl_SYMBOL_FOUND) INCLUDE(FindPackageHandleStandardArgs) IF(LibIntl_SYMBOL_FOUND) MESSAGE(STATUS "libintl is part of libc, no extra library is required.") SET(LibIntl_LIBRARIES "") FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibIntl REQUIRED_VARS LibIntl_INCLUDE_DIRS) ELSE() MESSAGE(STATUS "libintl is a separate library.") FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibIntl REQUIRED_VARS LibIntl_INCLUDE_DIRS LibIntl_LIBRARIES) ENDIF() IF(FORCE_PRETTY_MAKEFILE) SET(CMAKE_VERBOSE_MAKEFILE OFF) ENDIF(FORCE_PRETTY_MAKEFILE) ADD_DEFINITIONS(${QT_DEFINITIONS} -DQT_NO_CAST_TO_ASCII) ADD_DEFINITIONS(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) ADD_DEFINITIONS(-DQT_NO_URL_CAST_FROM_STRING) #uncomment the line below to save ~250-350kB in object size #ADD_DEFINITIONS(-DRKWARD_NO_TRACE) ADD_SUBDIRECTORY(rkward) ADD_SUBDIRECTORY(i18n) ADD_SUBDIRECTORY(doc) ADD_SUBDIRECTORY(tests) FEATURE_SUMMARY(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)