CMakeLists.txt 3.13 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 1.7.0 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(ECMGenerateHeaders)
13 14
include(ECMSetupVersion)
include(ECMPackageConfigHelpers)
15
include(ECMAddAppIcon)
16

17
include(FeatureSummary)
18
include(GenerateExportHeader)
19

Stephen Kelly's avatar
Stephen Kelly committed
20 21 22
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings)
23

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

40

41
find_package(KF5 REQUIRED
42 43 44 45 46 47
    COMPONENTS
    Bookmarks
    Codecs
    Completion
    ConfigWidgets
    DBusAddons
48
    DocTools
49
    IconThemes
50 51 52 53 54 55 56 57 58
    I18n
    KCMUtils
    KIO
    NewStuff
    Parts
    Service
    WidgetsAddons
    XmlGui
)
59

Alex Richardson's avatar
Alex Richardson committed
60
if( UNIX )
61 62 63
  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
64 65
endif()

66 67 68
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
69
                       PURPOSE "Needed for most of the algorithms of the checksum tool")
70

71 72 73
# control build scope, default to examples if BUILD_TESTING is ON
if( NOT DEFINED OMIT_EXAMPLES AND NOT BUILD_TESTING )
    set( OMIT_EXAMPLES TRUE )
74
endif()
75 76 77 78 79 80 81 82 83
if( NOT DEFINED OMIT_INTERNAL_TEMPLATES AND NOT BUILD_TESTING )
    set( OMIT_INTERNAL_TEMPLATES TRUE )
endif()

if( NOT OMIT_EXAMPLES )
    set( OKTETA_BUILD_EXAMPLES TRUE )
endif()
if( NOT OMIT_INTERNAL_TEMPLATES )
    set( KASTEN_BUILD_INTERNAL_TEMPLATES TRUE )
84
endif()
85

86
add_definitions(
87
    -DQT_USE_QSTRINGBUILDER
88 89
    -DQT_NO_CAST_TO_ASCII
    -DQT_NO_CAST_FROM_ASCII
90
    -DQT_NO_CAST_FROM_BYTEARRAY
91 92 93
    -DQT_STRICT_ITERATORS
    -DQT_NO_URL_CAST_FROM_STRING
    -DQT_NO_SIGNALS_SLOTS_KEYWORDS
94 95
)

96
# helper libs
97
add_subdirectory( libs )
98
add_subdirectory( doc )
99

100
set( OKTETALIBS_MAJOR_VERSION 0 )
101
set( OKTETALIBS_MINOR_VERSION 9 )
102
set( OKTETALIBS_PATCHLEVEL_VERSION 1 )
103
set( OKTETALIBS_VERSION "${OKTETALIBS_MAJOR_VERSION}.${OKTETALIBS_MINOR_VERSION}.${OKTETALIBS_PATCHLEVEL_VERSION}" )
104 105 106
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} )
107

108 109
set( OKTETALIBS_LIB_SOVERSION ${OKTETALIBS_ABI_VERSION} )
set( OKTETALIBS_LIB_VERSION ${OKTETALIBS_VERSION} )
110

111
# Okteta libs
112 113
add_subdirectory( core )
add_subdirectory( gui )
114
add_subdirectory( designer )
115

116
# Okteta Kasten components
117
add_subdirectory( kasten )
118
# special mimetypes
119
add_subdirectory( mimetypes )
120

121
# programs and parts for desktop
122 123
add_subdirectory( parts )
add_subdirectory( program )
124

125
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)