CMakeLists.txt 3.39 KB
Newer Older
1 2
project( okteta )

3
cmake_minimum_required(VERSION 2.8.12)
4
set(QT_MIN_VERSION "5.2.0")
5 6

find_package(ECM 0.0.8 REQUIRED NO_MODULE)
7

8
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
9
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
Stephen Kelly's avatar
Stephen Kelly committed
10

11
include(ECMInstallIcons)
12
include(FeatureSummary)
13
include(GenerateExportHeader)
14

Stephen Kelly's avatar
Stephen Kelly committed
15 16 17
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
18

19 20 21 22 23 24 25 26 27 28 29
find_package(Qt5 REQUIRED NO_MODULE
    COMPONENTS
    Core
    Network
    Designer
    PrintSupport
    Script
    ScriptTools
    Widgets
    Xml
)
Alex Richardson's avatar
Alex Richardson committed
30
find_package(Qt5Test QUIET)
31 32 33 34
if (NOT Qt5Test_FOUND)
  message(STATUS "Qt5Test not found, unit tests will not be built.")
endif()

35

36
find_package(KF5 REQUIRED
37 38 39 40 41 42
    COMPONENTS
    Bookmarks
    Codecs
    Completion
    ConfigWidgets
    DBusAddons
43
    DocTools
44 45 46 47 48 49 50 51 52
    I18n
    KCMUtils
    KIO
    NewStuff
    Parts
    Service
    WidgetsAddons
    XmlGui
)
53

Alex Richardson's avatar
Alex Richardson committed
54
if( UNIX )
55 56 57
  add_compile_options(-Wall)
  # enable this to reduce the file sizes (might crash)
  # add_compile_options(-fno-rtti)
Alex Richardson's avatar
Alex Richardson committed
58 59
endif()

60 61 62
find_package(Qca-qt5 2.1.0)
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Qt Cryptographic Architecture"
                       URL "http:/download.kde.org/stable/qca-qt5" TYPE OPTIONAL
63
                       PURPOSE "Needed for most of the algorithms of the checksum tool")
64

65 66 67 68 69 70 71 72 73 74 75 76 77 78
# control build scope
# TODO: examples and templates not internal need headers and libs as installed
# so they can be only build after the installation was done
# How to handle this best, as in: they are per default always build after an install?
# set( KASTEN_BUILD_EXAMPLES  NOT OMIT_EXAMPLES )
# set( OKTETA_BUILD_EXAMPLES  NOT OMIT_EXAMPLES )
set( KASTEN_BUILD_INTERNAL_EXAMPLES  NOT OMIT_INTERNAL_EXAMPLES )
set( OKTETA_BUILD_INTERNAL_EXAMPLES  NOT OMIT_INTERNAL_EXAMPLES )

# set( KASTEN_BUILD_TEMPLATES NOT SKIPTEMPLATES )
# set( OKTETA_BUILD_TEMPLATES NOT SKIPTEMPLATES )
set( KASTEN_BUILD_INTERNAL_TEMPLATES NOT OMIT_INTERNAL_TEMPLATES )
set( OKTETA_BUILD_INTERNAL_TEMPLATES NOT OMIT_INTERNAL_TEMPLATES )

79
add_definitions(
80
    -DQT_USE_QSTRINGBUILDER
81 82
    -DQT_NO_CAST_TO_ASCII
    -DQT_NO_CAST_FROM_ASCII
83
    -DQT_NO_CAST_FROM_BYTEARRAY
84 85
)

86
# helper libs
87
add_subdirectory( libs )
88
add_subdirectory( doc )
89

90
set( OKTETALIBS_MAJOR_VERSION 0 )
91 92
set( OKTETALIBS_MINOR_VERSION 9 )
set( OKTETALIBS_PATCHLEVEL_VERSION 0 )
93
set( OKTETALIBS_VERSION "${OKTETALIBS_MAJOR_VERSION}.${OKTETALIBS_MINOR_VERSION}.${OKTETALIBS_PATCHLEVEL_VERSION}" )
94 95 96
set( OKTETALIBS_ABI_VERSION 2 )
set( OKTETALIBS_INCLUDE_INSTALL_DIR  ${INCLUDE_INSTALL_DIR}/okteta ) #${OKTETALIBS_ABI_VERSION} )
set( OKTETALIBS_CCINCLUDE_INSTALL_DIR  ${INCLUDE_INSTALL_DIR}/Okteta ) #${OKTETALIBS_ABI_VERSION} )
97

98 99 100 101
set( oktetacore_LIB  oktetacore )
set( oktetagui_LIB   oktetagui )
set( oktetacore_LIB_NAME  okteta${OKTETALIBS_ABI_VERSION}core )
set( oktetagui_LIB_NAME   okteta${OKTETALIBS_ABI_VERSION}gui )
102

103 104
set( OKTETALIBS_LIB_SOVERSION ${OKTETALIBS_ABI_VERSION} )
set( OKTETALIBS_LIB_VERSION ${OKTETALIBS_VERSION} )
105

106
# Okteta libs
107 108
add_subdirectory( core )
add_subdirectory( gui )
109
add_subdirectory( designer )
110

111
# Okteta Kasten components
112
add_subdirectory( kasten )
113
# special mimetypes
114
add_subdirectory( mimetypes )
115

116
# programs and parts for desktop
117 118
add_subdirectory( parts )
add_subdirectory( program )
119

120
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)