2
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
4
# Installation directory for ontologies. Needed here because used in both ontology/ and lib/ sub
7
set (KACTIVITIES_ONTOLOGIES_DIR ${CMAKE_INSTALL_PREFIX}/share/ontology/kde)
9
add_definitions (-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
11
# Checking for Nepomuk
12
macro_optional_find_package (NepomukCore)
15
"Nepomuk Core" "Nepomuk Core" "https://projects.kde.org/nepomuk-core" FALSE ""
16
"STRONGLY_RECOMMENDED: Nepomuk is needed for some activity-related info"
19
if (NepomukCore_FOUND)
20
find_package (Soprano)
23
"Soprano" "Semantic Desktop Storing" "http://soprano.sourceforge.net" TRUE ""
24
"Soprano is needed to build and use the Nepomuk related functionalities"
27
include (SopranoAddOntology)
30
if (NepomukCore_FOUND AND Soprano_FOUND)
34
# Testing for C++0x/C++11 features
36
include (CheckCxxFeatures)
38
cxx_check_feature ("c++11" "auto" "N2546" HAVE_CXX11_AUTO "${ADDITIONAL_DEFINITIONS}")
39
cxx_check_feature ("c++11" "nullptr" "N2431" HAVE_CXX11_NULLPTR "${ADDITIONAL_DEFINITIONS}")
40
cxx_check_feature ("c++11" "lambda" "N2927" HAVE_CXX11_LAMBDA "${ADDITIONAL_DEFINITIONS}")
41
cxx_check_feature ("c++11" "override" "N3206" HAVE_CXX11_OVERRIDE "${ADDITIONAL_DEFINITIONS}")
42
cxx_check_feature ("c++11" "unique_ptr" "none" HAVE_CXX11_UNIQUE_PTR "${ADDITIONAL_DEFINITIONS}")
43
cxx_check_feature ("c++11" "variadic-templates" "N2242" HAVE_CXX11_VARIADIC_TEMPLATES "${ADDITIONAL_DEFINITIONS}")
44
cxx_check_feature ("c++11" "initializer-lists" "N2672" HAVE_CXX11_INITIALIZER_LISTS "${ADDITIONAL_DEFINITIONS}")
46
add_subdirectory (lib)
50
set (KAMD_DATA_DIR "${DATA_INSTALL_DIR}/activitymanager/")
52
configure_file (config-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-features.h)
56
string (COMPARE EQUAL "${CXX_FEATURES_UNSUPPORTED}" "" CXX_COMPILER_IS_MODERN)
58
if (NOT HAVE_CXX11_AUTO OR NOT HAVE_CXX11_LAMBDA OR NOT HAVE_CXX11_UNIQUE_PTR OR NOT HAVE_CXX11_VARIADIC_TEMPLATES OR NOT HAVE_CXX11_INITIALIZER_LISTS)
60
macro_log_feature (FALSE
61
"C++11 enabled compiler"
62
"GCC >=4.5 or Clang 3.1"
63
"http://www.open-std.org/jtc1/sc22/wg21/" FALSE ""
64
"REQUIRED: You need a more modern compiler in order to build the Activity Manager daemon"
69
if (CXX_COMPILER_IS_MODERN)
71
CXX_COMPILER_IS_MODERN
72
"C++11 enabled compiler"
73
"Your compiler is state-of-the-art"
74
"http://www.open-std.org/jtc1/sc22/wg21/" FALSE ""
75
"Your compiler doesn't support the following features: ${CXX_FEATURES_UNSUPPORTED} but
76
the list of the supported ones is sufficient for the build: ${CXX_FEATURES_SUPPORTED}"
80
CXX_COMPILER_IS_MODERN
81
"C++11 enabled compiler"
82
"Having to use the latest versions of GCC and Clang would be awesome"
83
"http://www.open-std.org/jtc1/sc22/wg21/" FALSE ""
84
"Your compiler doesn't support the following features: ${CXX_FEATURES_UNSUPPORTED} but
85
the list of the supported ones is sufficient for the build: ${CXX_FEATURES_SUPPORTED}"
89
add_subdirectory (service)
91
# No point in having workspace addons without the service
92
add_subdirectory (workspace)
96
add_subdirectory (ontologies)