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

3
cmake_minimum_required(VERSION 2.8.12)
4

5
find_package(ECM 1.7.0 REQUIRED NO_MODULE)
6

7
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
8
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
9

10
include(ECMInstallIcons)
11
include(ECMGenerateHeaders)
12 13
include(ECMSetupVersion)
include(ECMPackageConfigHelpers)
14
include(ECMAddAppIcon)
15

16
include(FeatureSummary)
17
include(GenerateExportHeader)
18

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

23 24
set(REQUIRED_QT_VERSION "5.2.0")
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED
25 26 27 28 29 30 31 32 33 34
    COMPONENTS
    Core
    Network
    Designer
    PrintSupport
    Script
    ScriptTools
    Widgets
    Xml
)
35
find_package(Qt5Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
36 37 38 39
if (NOT Qt5Test_FOUND)
  message(STATUS "Qt5Test not found, unit tests will not be built.")
endif()

40

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

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

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

72 73 74
# control build scope, default to examples if BUILD_TESTING is ON
if( NOT DEFINED OMIT_EXAMPLES AND NOT BUILD_TESTING )
    set( OMIT_EXAMPLES TRUE )
75
endif()
76 77 78 79 80 81 82 83 84
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 )
85
endif()
86

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

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

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

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

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

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

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

126
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)