~mir-team/miral/release

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Bileto Bot
  • Date: 2017-06-21 08:34:34 UTC
  • mfrom: (360.1.1 miral-release)
  • Revision ID: ci-train-bot@canonical.com-20170621083434-e7ftkyg5qr2fzsao
* New upstream release 1.4.0 (https://launchpad.net/miral/+milestone/1.4.0)
  - ABI summary:
    . miral ABI unchanged at 2
  - Enhancements:
    . Support for passing messages to enable Drag & Drop
    . Support for client requested move
    . Port to the undeprecated Mir APIs
    . Added "--cursor-theme" option when configuring a cursor theme
    . Drop support for Mir versions before 0.26
  - Bugs fixed:

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
cmake_minimum_required(VERSION 3.1)
 
1
cmake_minimum_required(VERSION 3.5)
 
2
cmake_policy(SET CMP0015 NEW)
 
3
cmake_policy(SET CMP0022 NEW)
 
4
 
2
5
project(miral)
3
6
 
4
 
if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
5
 
    set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "/usr install prefix" FORCE)
6
 
endif()
7
 
 
8
7
include (GNUInstallDirs)
9
8
include(CheckCXXCompilerFlag)
10
9
 
11
 
cmake_policy(SET CMP0015 NEW)
12
 
cmake_policy(SET CMP0022 NEW)
13
 
 
14
10
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
15
11
 
16
12
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
36
32
 
37
33
include(FindPkgConfig)
38
34
 
39
 
pkg_check_modules(MIRCLIENT mirclient>=0.20 REQUIRED)
 
35
pkg_check_modules(MIRCLIENT mirclient>=0.26 REQUIRED)
40
36
 
41
37
include_directories(include SYSTEM ${MIRCLIENT_INCLUDE_DIRS})
42
38
 
43
39
set(MIRAL_VERSION_MAJOR 1)
44
 
set(MIRAL_VERSION_MINOR 3)
45
 
set(MIRAL_VERSION_PATCH 2)
 
40
set(MIRAL_VERSION_MINOR 4)
 
41
set(MIRAL_VERSION_PATCH 0)
46
42
 
47
43
set(MIRAL_VERSION ${MIRAL_VERSION_MAJOR}.${MIRAL_VERSION_MINOR}.${MIRAL_VERSION_PATCH})
48
44
 
 
45
if (MIRCLIENT_VERSION VERSION_LESS 0.26.3)
 
46
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
 
47
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
 
48
endif()
 
49
 
49
50
add_subdirectory(miral)
50
51
add_subdirectory(miral-shell)
51
52
add_subdirectory(miral-kiosk)
54
55
if(NOT MIRTEST_FOUND)
55
56
    message(WARNING "mirtest-dev package not installed - tests cannot be built")
56
57
else()
57
 
    if (MIRTEST_VERSION VERSION_LESS 0.24)
58
 
        # building the tests is disabled by default because the mirtest-dev package is broken on xenial
59
 
        # (lp:1583536 and lp:1603080)
60
 
        option(MIRAL_ENABLE_TESTS "Build tests" off)
61
 
    else()
62
 
        option(MIRAL_ENABLE_TESTS "Build tests" on)
 
58
    option(MIRAL_ENABLE_TESTS "Build tests" on)
 
59
 
 
60
    if (MIRAL_ENABLE_TESTS)
 
61
        enable_testing()
 
62
        find_package(GMock REQUIRED)
 
63
        add_subdirectory(test)
63
64
    endif()
64
 
 
65
 
if (MIRAL_ENABLE_TESTS)
66
 
    enable_testing()
67
 
    find_package(GMock REQUIRED)
68
 
    add_subdirectory(test)
69
 
endif()
70
65
endif()
71
66
 
72
67
include (cmake/Doxygen.cmake)