~ubuntu-branches/ubuntu/saucy/kactivities/saucy-proposed

« back to all changes in this revision

Viewing changes to src/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Jonathan Riddell, Scott Kitterman
  • Date: 2012-11-20 13:47:27 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121120134727-vqzk04slqjoay3de
Tags: 4:4.9.80-0ubuntu1
[ Jonathan Riddell ]
* New upstream beta release

[ Scott Kitterman ]
* Add new libkactivities-models1 library package (debian/control, .install,
  and .symbols)
* Add nepomuk-core-dev to build-depends
* Wildcard libkactivities6.install so that soversion changes don't cause
  build failures
* Update libkactivities6.symbols
* Update libkactivities-dev.install for new files for libkactivies-models
* Add new files to libkactivities-bin.install, including Activities kcm

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
 
3
 
 
4
# Installation directory for ontologies.  Needed here because used in both ontology/ and lib/ sub
 
5
# directories.
 
6
 
 
7
set (KACTIVITIES_ONTOLOGIES_DIR ${CMAKE_INSTALL_PREFIX}/share/ontology/kde)
 
8
 
 
9
add_definitions (-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
 
10
 
 
11
# Checking for Nepomuk
 
12
macro_optional_find_package (NepomukCore)
 
13
macro_log_feature (
 
14
    NepomukCore_FOUND
 
15
    "Nepomuk Core" "Nepomuk Core" "https://projects.kde.org/nepomuk-core" FALSE ""
 
16
    "STRONGLY_RECOMMENDED: Nepomuk is needed for some activity-related info"
 
17
    )
 
18
 
 
19
if (NepomukCore_FOUND)
 
20
    find_package (Soprano)
 
21
    macro_log_feature (
 
22
        Soprano_FOUND
 
23
        "Soprano" "Semantic Desktop Storing" "http://soprano.sourceforge.net" TRUE ""
 
24
        "Soprano is needed to build and use the Nepomuk related functionalities"
 
25
        )
 
26
 
 
27
    include (SopranoAddOntology)
 
28
endif ()
 
29
 
 
30
if (NepomukCore_FOUND AND Soprano_FOUND)
 
31
    set (HAVE_NEPOMUK 1)
 
32
endif ()
 
33
 
 
34
# Testing for C++0x/C++11 features
 
35
 
 
36
include (CheckCxxFeatures)
 
37
 
 
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}")
 
45
 
 
46
add_subdirectory (lib)
 
47
 
 
48
# config file
 
49
 
 
50
set (KAMD_DATA_DIR "${DATA_INSTALL_DIR}/activitymanager/")
 
51
 
 
52
configure_file (config-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-features.h)
 
53
 
 
54
# main part
 
55
 
 
56
string (COMPARE EQUAL "${CXX_FEATURES_UNSUPPORTED}" "" CXX_COMPILER_IS_MODERN)
 
57
 
 
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)
 
59
 
 
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"
 
65
        )
 
66
 
 
67
else ()
 
68
 
 
69
    if (CXX_COMPILER_IS_MODERN)
 
70
        macro_log_feature (
 
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}"
 
77
            )
 
78
    else ()
 
79
        macro_log_feature (
 
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}"
 
86
            )
 
87
    endif ()
 
88
 
 
89
    add_subdirectory (service)
 
90
 
 
91
    # No point in having workspace addons without the service
 
92
    add_subdirectory (workspace)
 
93
 
 
94
endif ()
 
95
 
 
96
add_subdirectory (ontologies)
 
97