330.205.2
by Alan Griffiths
Update CMake style |
1 |
cmake_minimum_required(VERSION 3.5) |
2 |
cmake_policy(SET CMP0015 NEW) |
|
3 |
cmake_policy(SET CMP0022 NEW) |
|
4 |
||
1
by Alan Griffiths
Initial import of example code |
5 |
project(miral) |
6 |
||
260.2.4
by Alan Griffiths
Fix CMakeLists.txt to match |
7 |
include (GNUInstallDirs) |
289.2.1
by Alan Griffiths
Fix clang build post 0,24 |
8 |
include(CheckCXXCompilerFlag) |
260.2.4
by Alan Griffiths
Fix CMakeLists.txt to match |
9 |
|
100
by Alan Griffiths
Quck and dirty import of old spinner |
10 |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) |
11 |
||
1
by Alan Griffiths
Initial import of example code |
12 |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) |
13 |
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) |
|
14 |
||
330.140.3
by Alan Griffiths
Revert accidental change |
15 |
set(CMAKE_CXX_STANDARD 14) |
16 |
set(CMAKE_CXX_STANDARD_REQUIRED on) |
|
17 |
set(CMAKE_CXX_EXTENSIONS off) |
|
18 |
||
19 |
set(CMAKE_C_STANDARD 99) |
|
20 |
set(CMAKE_C_STANDARD_REQUIRED on) |
|
21 |
set(CMAKE_C_EXTENSIONS off) |
|
22 |
||
257.1.1
by Alan Griffiths
A few more build options including defaults that work for clang |
23 |
set(MIRAL_COMPILER_FLAGS "-pthread -g -Werror -Wall -pedantic -Wextra -fPIC") |
24 |
set(MIRAL_LINKER_FLAGS "-Wl,-z,defs") |
|
25 |
||
26 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MIRAL_COMPILER_FLAGS}") |
|
330.140.3
by Alan Griffiths
Revert accidental change |
27 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MIRAL_COMPILER_FLAGS} -Wnon-virtual-dtor") |
28 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long") # fix spurious FTBFS on X+O |
|
257.1.1
by Alan Griffiths
A few more build options including defaults that work for clang |
29 |
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MIRAL_LINKER_FLAGS}") |
30 |
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${MIRAL_LINKER_FLAGS}") |
|
31 |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MIRAL_LINKER_FLAGS}") |
|
1
by Alan Griffiths
Initial import of example code |
32 |
|
33 |
include(FindPkgConfig) |
|
34 |
||
330.207.10
by Alan Griffiths
Remove vestigal support for Mir < 0.26 |
35 |
pkg_check_modules(MIRCLIENT mirclient>=0.26 REQUIRED) |
1
by Alan Griffiths
Initial import of example code |
36 |
|
152.3.1
by Alan Griffiths
A bit of tidy-up of Mir dependencies |
37 |
include_directories(include SYSTEM ${MIRCLIENT_INCLUDE_DIRS}) |
1
by Alan Griffiths
Initial import of example code |
38 |
|
330.125.1
by Alan Griffiths
Remove deprecated APIs and bump ABI |
39 |
set(MIRAL_VERSION_MAJOR 1) |
330.201.5
by Alan Griffiths
Enough wiring to pass all tests |
40 |
set(MIRAL_VERSION_MINOR 4) |
41 |
set(MIRAL_VERSION_PATCH 0) |
|
158.1.1
by Alan Griffiths
Install headers and pkg-config support |
42 |
|
43 |
set(MIRAL_VERSION ${MIRAL_VERSION_MAJOR}.${MIRAL_VERSION_MINOR}.${MIRAL_VERSION_PATCH}) |
|
44 |
||
330.207.10
by Alan Griffiths
Remove vestigal support for Mir < 0.26 |
45 |
if (MIRCLIENT_VERSION VERSION_LESS 0.26.3) |
330.207.7
by Alan Griffiths
Mir 0.26.2 compatible frig |
46 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations") |
47 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") |
|
330.207.6
by Alan Griffiths
Port to Mir 0.26.3 |
48 |
endif() |
49 |
||
1
by Alan Griffiths
Initial import of example code |
50 |
add_subdirectory(miral) |
93
by Alan Griffiths
Rename miral-shell |
51 |
add_subdirectory(miral-shell) |
134
by Alan Griffiths
Split miral-kiosk into separate directory |
52 |
add_subdirectory(miral-kiosk) |
171.1.1
by Alan Griffiths
Start of MRUWindowList |
53 |
|
226.2.1
by Alan Griffiths
use MIRTEST_VERSION to determine MIRAL_ENABLE_TESTS default |
54 |
pkg_check_modules(MIRTEST mirtest) |
55 |
if(NOT MIRTEST_FOUND) |
|
56 |
message(WARNING "mirtest-dev package not installed - tests cannot be built") |
|
57 |
else() |
|
330.207.10
by Alan Griffiths
Remove vestigal support for Mir < 0.26 |
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) |
|
226.2.1
by Alan Griffiths
use MIRTEST_VERSION to determine MIRAL_ENABLE_TESTS default |
64 |
endif() |
65 |
endif() |
|
248.1.1
by Alan Griffiths
Add doxygen skeleton |
66 |
|
67 |
include (cmake/Doxygen.cmake) |
|
307.4.1
by Alan Griffiths
Add a build target to regenerate symbols map |
68 |
|
69 |
if(TARGET doc) |
|
70 |
add_custom_target(symbols |
|
71 |
${CMAKE_SOURCE_DIR}/scripts/process_doxygen_xml.py ${CMAKE_BINARY_DIR}/doc/xml/*.xml > ${CMAKE_SOURCE_DIR}/miral/symbols.map |
|
72 |
DEPENDS doc) |
|
73 |
endif() |