2.1.8
by Alan Griffiths
Tidy up |
1 |
# Copyright © 2012 Canonical Ltd.
|
2 |
#
|
|
22.1.1
by Thomas Voß
Adjusted license headers. |
3 |
# This program is free software: you can redistribute it and/or modify
|
4 |
# it under the terms of the GNU General Public License version 3 as
|
|
5 |
# published by the Free Software Foundation.
|
|
6 |
#
|
|
7 |
# This program is distributed in the hope that it will be useful,
|
|
8 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
9 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
10 |
# GNU General Public License for more details.
|
|
11 |
#
|
|
12 |
# You should have received a copy of the GNU General Public License
|
|
13 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
2.1.8
by Alan Griffiths
Tidy up |
14 |
#
|
15 |
# Authored by: Thomas Voss <thomas.voss@canonical.com>,
|
|
16 |
# Alan Griffiths <alan@octopull.co.uk>
|
|
17 |
||
681.2.1
by Christopher James Halse Rogers
Remove MIR_GCC_VERSION. |
18 |
set(CMAKE_GCOV gcov) |
69.1.1
by Alan Griffiths
Some gcc-4.4 changes |
19 |
|
134.6.2
by Thomas Voß
Fix linker issues with gcc 4.6 and add proper library versioning. |
20 |
project(Mir) |
2
by Thomas Voß
Added a basic cmake setup and a first test for testing setup. |
21 |
|
22 |
cmake_minimum_required(VERSION 2.8) |
|
217.2.3
by Kevin DuBois
fix some cmake bugs. add file for android options |
23 |
|
681.2.2
by Christopher James Halse Rogers
Reinstate cmake_policy() arcana |
24 |
cmake_policy(SET CMP0015 NEW) |
3300.1.1
by Alan Griffiths
Fix cmake -DCMAKE_BUILD_TYPE=ThreadSanitizer |
25 |
cmake_policy(SET CMP0022 NEW) |
681.2.2
by Christopher James Halse Rogers
Reinstate cmake_policy() arcana |
26 |
|
2494.2.16
by Kevin DuBois
merge mir |
27 |
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) |
28 |
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) |
|
217.2.3
by Kevin DuBois
fix some cmake bugs. add file for android options |
29 |
|
278.1.1
by Thomas Voß
mir/cmake: Add target pre-push that carries out style tasks, chroot'd build & test and an android build & test cycle. |
30 |
set(MIR_VERSION_MAJOR 0) |
3789.2.20
by Brandon Schaefer
Revert a mistake I made |
31 |
set(MIR_VERSION_MINOR 25) |
32 |
set(MIR_VERSION_PATCH 0) |
|
278.1.1
by Thomas Voß
mir/cmake: Add target pre-push that carries out style tasks, chroot'd build & test and an android build & test cycle. |
33 |
|
2110.8.11
by Christopher James Halse Rogers
Also log the version when selecting a platform module |
34 |
add_definitions(-DMIR_VERSION_MAJOR=${MIR_VERSION_MAJOR}) |
35 |
add_definitions(-DMIR_VERSION_MINOR=${MIR_VERSION_MINOR}) |
|
36 |
add_definitions(-DMIR_VERSION_MICRO=${MIR_VERSION_PATCH}) |
|
3339.1.5
by Christopher James Halse Rogers
Define _GNU_SOURCE and _FILE_OFFSET_BITS=64 everywhere. |
37 |
add_definitions(-D_GNU_SOURCE) |
38 |
add_definitions(-D_FILE_OFFSET_BITS=64) |
|
2110.8.11
by Christopher James Halse Rogers
Also log the version when selecting a platform module |
39 |
|
1806.3.5
by Daniel van Vugt
Condense and deduplicate references to MIR_VERSION_*. |
40 |
set(MIR_VERSION ${MIR_VERSION_MAJOR}.${MIR_VERSION_MINOR}.${MIR_VERSION_PATCH}) |
41 |
||
134.6.2
by Thomas Voß
Fix linker issues with gcc 4.6 and add proper library versioning. |
42 |
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) |
1413.1.2
by Alexandros Frantzis
tests: Suppress spurious memory errors when running the tests on armhf |
43 |
execute_process( |
44 |
COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine |
|
45 |
OUTPUT_VARIABLE TARGET_ARCH |
|
46 |
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
47 |
)
|
|
66.1.2
by Thomas Voß
* Enabled coverage reporting. |
48 |
|
490.3.1
by Jussi Pakkanen
Add option for using build flags from dpkg-buildpackage. |
49 |
option(use_debflags "Use build flags from dpkg-buildflags." OFF) |
50 |
if(use_debflags) |
|
51 |
include (cmake/Debian.cmake) |
|
52 |
endif() |
|
66.1.2
by Thomas Voß
* Enabled coverage reporting. |
53 |
include (cmake/EnableCoverageReport.cmake) |
45.2.24
by Alan Griffiths
Compiz => Mir |
54 |
include (cmake/MirCommon.cmake) |
766.3.10
by Didier Roche
multiarch mir and fix upstream build system to not harcode the lib path |
55 |
include (GNUInstallDirs) |
2
by Thomas Voß
Added a basic cmake setup and a first test for testing setup. |
56 |
|
3306.2.1
by Alan Griffiths
Add UBSanitizer to the list of build types |
57 |
set(build_types "None;Debug;Release;RelWithDebInfo;MinSizeRel;Coverage;AddressSanitizer;ThreadSanitizer;UBSanitizer") |
1773.2.4
by Daniel van Vugt
Revert unidentified changes introduced in r1774. If anyone finds they need |
58 |
# Change informational string for CMAKE_BUILD_TYPE
|
59 |
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "${build_types}" FORCE) |
|
60 |
# Enable cmake-gui to display a drop down list for CMAKE_BUILD_TYPE
|
|
61 |
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${build_types}") |
|
62 |
||
3184.3.11
by Cemil Azizoglu
Add remove_if_stale_optimization |
63 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread -g -Werror -Wall -pedantic -Wextra -fPIC") |
64 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -g -std=c++14 -Werror -Wall -fno-strict-aliasing -pedantic -Wnon-virtual-dtor -Wextra -fPIC") |
|
3567.1.2
by Alexandros Frantzis
Use --as-needed linker flag |
65 |
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed") |
66 |
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--as-needed") |
|
67 |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") |
|
240.1.1
by Thomas Voß
mir/cmake: Add query of dpkg-buildflags to adjust compiler flags to cmake setup. |
68 |
|
3671.1.1
by Christopher James Halse Rogers
Use compiler feature detection to disable false-positive -Werrors. |
69 |
include(CheckCXXCompilerFlag) |
70 |
check_cxx_compiler_flag(-Wmismatched-tags HAS_W_MISMATCHED_TAGS) |
|
71 |
||
72 |
if(HAS_W_MISMATCHED_TAGS) |
|
73 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-mismatched-tags") |
|
74 |
endif() |
|
75 |
||
3266.1.3
by Alan Griffiths
Document the MIR_USE_LD_GOLD option |
76 |
option(MIR_USE_LD_GOLD "Enables the \"gold\" linker." OFF) |
3266.1.2
by Alan Griffiths
merge lp:mir |
77 |
if(MIR_USE_LD_GOLD) |
78 |
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold") |
|
79 |
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=gold") |
|
80 |
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") |
|
81 |
endif() |
|
82 |
||
1797.1.1
by Alan Griffiths
Switch on link time optimization |
83 |
# Link time optimization allows leaner, cleaner libraries
|
1797.1.3
by Alan Griffiths
make option explicit |
84 |
message(STATUS "CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER}) |
85 |
||
86 |
option(MIR_LINK_TIME_OPTIMIZATION "Enables the linker to optimize binaries." OFF) |
|
87 |
if(MIR_LINK_TIME_OPTIMIZATION) |
|
3629.3.1
by Alexandros Frantzis
tests: Don't build with LTO |
88 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -flto -ffat-lto-objects") |
89 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto -ffat-lto-objects") |
|
3339.1.2
by Christopher James Halse Rogers
Set nm, ar, and ranlib to the LTO-capable versions when using LTO. |
90 |
if(${CMAKE_COMPILER_IS_GNUCXX}) |
91 |
set(CMAKE_NM "gcc-nm") |
|
92 |
set(CMAKE_AR "gcc-ar") |
|
93 |
set(CMAKE_RANLIB "gcc-ranlib") |
|
94 |
endif() |
|
1797.1.1
by Alan Griffiths
Switch on link time optimization |
95 |
endif() |
96 |
||
1773.2.4
by Daniel van Vugt
Revert unidentified changes introduced in r1774. If anyone finds they need |
97 |
string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower) |
98 |
||
66.1.2
by Thomas Voß
* Enabled coverage reporting. |
99 |
#####################################################################
|
100 |
# Enable code coverage calculation with gcov/gcovr/lcov
|
|
101 |
# Usage:
|
|
102 |
# * Switch build type to coverage (use ccmake or cmake-gui)
|
|
103 |
# * Invoke make, make test, make coverage
|
|
104 |
# * Find html report in subdir coveragereport
|
|
105 |
# * Find xml report feasible for jenkins in coverage.xml
|
|
106 |
#####################################################################
|
|
1773.2.4
by Daniel van Vugt
Revert unidentified changes introduced in r1774. If anyone finds they need |
107 |
if(cmake_build_type_lower MATCHES "coverage") |
108 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftest-coverage -fprofile-arcs") |
|
109 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ftest-coverage -fprofile-arcs") |
|
110 |
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -ftest-coverage -fprofile-arcs") |
|
111 |
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage -fprofile-arcs") |
|
112 |
endif() |
|
113 |
||
114 |
if(cmake_build_type_lower MATCHES "addresssanitizer") |
|
115 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer") |
|
116 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer") |
|
117 |
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address") |
|
118 |
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address") |
|
2240.1.1
by Christopher James Halse Rogers
Add ThreadSanitizer build flavour. |
119 |
elseif(cmake_build_type_lower MATCHES "threadsanitizer") |
120 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread -fno-omit-frame-pointer") |
|
121 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=thread -fno-omit-frame-pointer") |
|
2707.1.1
by Alberto Aguirre
Fix ThreadSanitizer build |
122 |
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=thread") |
123 |
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=thread") |
|
3338.2.1
by Alan Griffiths
Workaround lp:1413474 |
124 |
link_libraries(tsan) # Workaround for LP:1413474 |
3153.1.1
by Alberto Aguirre
Add UBSan build type. |
125 |
elseif(cmake_build_type_lower MATCHES "ubsanitizer") |
3203.1.1
by Alan Griffiths
Fix missing symbols needed by -fno-sanitize=vptr |
126 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fno-omit-frame-pointer") |
127 |
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined -fno-omit-frame-pointer") |
|
128 |
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=undefined") |
|
129 |
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=undefined") |
|
3153.1.1
by Alberto Aguirre
Add UBSan build type. |
130 |
# "Symbol already defined" errors occur with pre-compiled headers
|
131 |
SET(MIR_USE_PRECOMPILED_HEADERS OFF CACHE BOOL "Use precompiled headers" FORCE) |
|
1773.2.4
by Daniel van Vugt
Revert unidentified changes introduced in r1774. If anyone finds they need |
132 |
else() |
133 |
# AddressSanitizer builds fail if we disallow undefined symbols
|
|
134 |
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") |
|
2827.2.1
by Daniel van Vugt
Disallow undefined symbols in MODULES too |
135 |
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined") |
1773.2.4
by Daniel van Vugt
Revert unidentified changes introduced in r1774. If anyone finds they need |
136 |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined") |
137 |
endif() |
|
66.1.2
by Thomas Voß
* Enabled coverage reporting. |
138 |
|
1774.3.4
by Daniel van Vugt
Tidy up |
139 |
# Define LOG_NDEBUG=1 to ensure Android ALOGV calls are not compiled in to
|
140 |
# consume CPU time...
|
|
1774.3.1
by Daniel van Vugt
Disable Android debug logging as it wastes too much CPU time. (LP: #1343074) |
141 |
add_definitions(-DLOG_NDEBUG=1) |
142 |
||
2
by Thomas Voß
Added a basic cmake setup and a first test for testing setup. |
143 |
enable_testing() |
144 |
||
3744.2.1
by Alan Griffiths
Move the core headers |
145 |
include_directories(include/core) |
2061.1.2
by Alan Griffiths
Privatized headers should not be used in examples or acceptance tests |
146 |
include_directories(include/common) |
2943.1.25
by Brandon Schaefer
* Redo changes, no the issue |
147 |
include_directories(include/cookie) |
2
by Thomas Voß
Added a basic cmake setup and a first test for testing setup. |
148 |
|
14.3.3
by Thomas Voß
Pulled from trunk. |
149 |
# Check for boost
|
2105.1.8
by Daniel van Vugt
Drop build-dep libboost-iostreams-dev, because apparently we can now. |
150 |
find_package(Boost 1.48.0 COMPONENTS date_time system program_options filesystem REQUIRED) |
3108.2.1
by Kevin Gunn
add SYSTEM to include_directories |
151 |
include_directories (SYSTEM |
83.2.1
by Kevin DuBois
CMakeLists.txt was including boost directories after it was add_directory(src/). was a problem for non-standard boost installation paths |
152 |
${Boost_INCLUDE_DIRS} |
153 |
)
|
|
93.1.15
by Alan Griffiths
Cleaner approach to generated headers |
154 |
|
341.2.1
by Thomas Voß
Fixes to allow mir to run on an io_service that relies on select instead of epoll. Accounts for ancient kernels present on the launchpad builders. |
155 |
option( |
156 |
MIR_DISABLE_EPOLL_REACTOR
|
|
157 |
"Disable boost::asio's epoll implementation and switch to a select-based reactor to account for ancient kernels on ppa builders."
|
|
158 |
OFF
|
|
159 |
)
|
|
160 |
if(MIR_DISABLE_EPOLL_REACTOR) |
|
161 |
add_definitions( |
|
162 |
-DBOOST_ASIO_DISABLE_EPOLL -DBOOST_ASIO_DISABLE_KQUEUE -DBOOST_ASIO_DISABLE_DEV_POLL |
|
163 |
)
|
|
164 |
endif(MIR_DISABLE_EPOLL_REACTOR) |
|
165 |
||
1381.2.4
by Alexandros Frantzis
build: Allow building multiple platforms in the same build |
166 |
add_definitions(-DMESA_EGL_NO_X11_HEADERS) |
167 |
||
2602.2.2
by Cemil Azizoglu
s/mesa/KMS |
168 |
# Default to KMS backend, but build all of them
|
101.1.23
by Christopher James Halse Rogers
Switch platform selection to a single MIR_PLATFORM option. |
169 |
set( |
170 |
MIR_PLATFORM
|
|
3506.9.4
by Christopher James Halse Rogers
Add EGLStream client and kms server platforms. |
171 |
mesa-kms;android;mesa-x11;eglstream-kms
|
101.1.23
by Christopher James Halse Rogers
Switch platform selection to a single MIR_PLATFORM option. |
172 |
CACHE
|
173 |
STRING
|
|
3506.9.4
by Christopher James Halse Rogers
Add EGLStream client and kms server platforms. |
174 |
"a list of graphics backends to build (options are 'mesa-kms', 'android', 'mesa-x11', or 'eglstream-kms')"
|
101.1.23
by Christopher James Halse Rogers
Switch platform selection to a single MIR_PLATFORM option. |
175 |
)
|
176 |
||
1381.2.4
by Alexandros Frantzis
build: Allow building multiple platforms in the same build |
177 |
list(GET MIR_PLATFORM 0 MIR_TEST_PLATFORM) |
178 |
||
3384.1.2
by Kevin DuBois
move option up in the CMakeLists.txt file so it can be seen by all the directories that need it |
179 |
option(MIR_ENABLE_TESTS "Build tests" ON) |
180 |
||
1381.2.4
by Alexandros Frantzis
build: Allow building multiple platforms in the same build |
181 |
foreach(platform IN LISTS MIR_PLATFORM) |
2602.2.9
by Cemil Azizoglu
Rename kms to mesa-kms |
182 |
if (platform STREQUAL "mesa-kms") |
2602.2.11
by Cemil Azizoglu
Forgotten renames |
183 |
set(MIR_BUILD_PLATFORM_MESA_KMS TRUE) |
1381.2.4
by Alexandros Frantzis
build: Allow building multiple platforms in the same build |
184 |
endif() |
185 |
if (platform STREQUAL "android") |
|
186 |
set(MIR_BUILD_PLATFORM_ANDROID TRUE) |
|
187 |
endif() |
|
2550.2.93
by Cemil Azizoglu
s/X/mesa-x11 |
188 |
if (platform STREQUAL "mesa-x11") |
189 |
set(MIR_BUILD_PLATFORM_MESA_X11 TRUE) |
|
2550.2.1
by Cemil Azizoglu
- Stub server side |
190 |
endif() |
3506.9.4
by Christopher James Halse Rogers
Add EGLStream client and kms server platforms. |
191 |
if (platform STREQUAL "eglstream-kms") |
192 |
set(MIR_BUILD_PLATFORM_EGLSTREAM_KMS TRUE) |
|
193 |
endif() |
|
1381.2.4
by Alexandros Frantzis
build: Allow building multiple platforms in the same build |
194 |
endforeach(platform) |
195 |
||
137.1.2
by Alexandros Frantzis
cmake: Add and use modules for finding EGL and GLESv2 |
196 |
find_package(EGL REQUIRED) |
197 |
find_package(GLESv2 REQUIRED) |
|
662.3.1
by Alexandros Frantzis
glm: Use system glm instead of in-tree version |
198 |
find_package(GLM REQUIRED) |
249.1.5
by Kevin DuBois
remove comment that doesn't apply. make Protobuf a check regardless of the ipc mechanism |
199 |
find_package(Protobuf REQUIRED ) |
3400.1.15
by Brandon Schaefer
* Backporting newer capnproto to vivid+overlay, no need for fancy vivid hacks |
200 |
find_package(CapnProto REQUIRED) |
458.2.1
by Alan Griffiths
Simplistic GlogLogger |
201 |
find_package(GLog REQUIRED) |
802.1.2
by Alan Griffiths
Revert erronious change |
202 |
find_package(GFlags REQUIRED) |
688.4.1
by Alexandros Frantzis
lttng: Add an LTTng MessageProcessorReport |
203 |
find_package(LTTngUST REQUIRED) |
1252.1.6
by Christopher James Halse Rogers
Fix Android build by actually searching for udev there |
204 |
pkg_check_modules(UDEV REQUIRED libudev) |
2026.1.1
by Alexandros Frantzis
server: First steps of GLibMainLoop implementation |
205 |
pkg_check_modules(GLIB REQUIRED glib-2.0) |
911.2.4
by Eleni Maria Stea
whitespace |
206 |
|
3108.2.1
by Kevin Gunn
add SYSTEM to include_directories |
207 |
include_directories (SYSTEM ${GLESv2_INCLUDE_DIRS}) |
208 |
include_directories (SYSTEM ${EGL_INCLUDE_DIRS}) |
|
209 |
include_directories (SYSTEM ${GLM_INCLUDE_DIRS}) |
|
488.1.1
by Xiang Zhai
Fix still find locale GLESv2 bug |
210 |
|
3506.5.22
by Daniel van Vugt
Set the default to libGLESv2 for everyone. Just till that last remaining |
211 |
#
|
3524.1.2
by Daniel van Vugt
More comments, docs |
212 |
# Full OpenGL support is possibly complete but not yet perfect. So is
|
3620.2.1
by Daniel van Vugt
Clarify comments around full desktop GL support. It's likely no further |
213 |
# presently disabled by default due to:
|
214 |
# 1. Black windows bug: https://bugs.freedesktop.org/show_bug.cgi?id=92265
|
|
215 |
# 2. Use of glEGLImageTargetTexture2DOES in:
|
|
216 |
# src/platform/graphics/egl_extensions.cpp
|
|
217 |
# possibly shouldn't work even though it does. Or should it?
|
|
3506.5.22
by Daniel van Vugt
Set the default to libGLESv2 for everyone. Just till that last remaining |
218 |
#
|
219 |
#if (TARGET_ARCH STREQUAL "x86_64-linux-gnu" OR
|
|
220 |
# TARGET_ARCH STREQUAL "i386-linux-gnu")
|
|
221 |
# set(DEFAULT_LIBGL "libGL")
|
|
222 |
#else()
|
|
3506.5.7
by Daniel van Vugt
Make choice of libGL an option |
223 |
set(DEFAULT_LIBGL "libGLESv2") |
3506.5.22
by Daniel van Vugt
Set the default to libGLESv2 for everyone. Just till that last remaining |
224 |
#endif()
|
3506.5.7
by Daniel van Vugt
Make choice of libGL an option |
225 |
set(MIR_SERVER_LIBGL ${DEFAULT_LIBGL} CACHE STRING "OpenGL library to use in Mir servers {libGL,libGLESv2}") |
226 |
||
227 |
if (MIR_SERVER_LIBGL STREQUAL "libGL") |
|
3506.5.1
by Daniel van Vugt
First complete build (header changes only) |
228 |
pkg_check_modules(GL REQUIRED gl) |
229 |
add_definitions( |
|
230 |
-DGL_GLEXT_PROTOTYPES
|
|
231 |
-DMIR_SERVER_GL_H=<GL/gl.h>
|
|
232 |
-DMIR_SERVER_GLEXT_H=<GL/glext.h>
|
|
3506.5.4
by Daniel van Vugt
Choose the correct GL API bits |
233 |
-DMIR_SERVER_EGL_OPENGL_BIT=EGL_OPENGL_BIT
|
234 |
-DMIR_SERVER_EGL_OPENGL_API=EGL_OPENGL_API
|
|
3506.5.1
by Daniel van Vugt
First complete build (header changes only) |
235 |
)
|
3506.5.7
by Daniel van Vugt
Make choice of libGL an option |
236 |
elseif (MIR_SERVER_LIBGL STREQUAL "libGLESv2") |
3506.5.1
by Daniel van Vugt
First complete build (header changes only) |
237 |
pkg_check_modules(GL REQUIRED glesv2) |
238 |
add_definitions( |
|
3506.5.8
by Daniel van Vugt
Fix bad includes for GLESv2 |
239 |
-DMIR_SERVER_GL_H=<GLES2/gl2.h>
|
240 |
-DMIR_SERVER_GLEXT_H=<GLES2/gl2ext.h>
|
|
3506.5.4
by Daniel van Vugt
Choose the correct GL API bits |
241 |
-DMIR_SERVER_EGL_OPENGL_BIT=EGL_OPENGL_ES2_BIT
|
242 |
-DMIR_SERVER_EGL_OPENGL_API=EGL_OPENGL_ES_API
|
|
3506.5.1
by Daniel van Vugt
First complete build (header changes only) |
243 |
)
|
3506.5.7
by Daniel van Vugt
Make choice of libGL an option |
244 |
else() |
245 |
message(FATAL_ERROR "Invalid MIR_SERVER_LIBGL value ${MIR_SERVER_LIBGL}") |
|
3506.5.1
by Daniel van Vugt
First complete build (header changes only) |
246 |
endif() |
247 |
||
1381.2.4
by Alexandros Frantzis
build: Allow building multiple platforms in the same build |
248 |
if (MIR_BUILD_PLATFORM_ANDROID) |
1668.3.7
by Cemil Azizoglu
Move AndroidProperties check into platform-specific section |
249 |
find_package(AndroidProperties REQUIRED) |
1297.1.1
by Kevin DuBois
compiling, once the bug is fixed in android-headers |
250 |
find_package(LibHardware REQUIRED) |
1381.2.4
by Alexandros Frantzis
build: Allow building multiple platforms in the same build |
251 |
endif() |
217.2.7
by Kevin DuBois
use flag DISABLE_GTEST_TEST_DISCOVERY instead of fencing off based on platform |
252 |
|
2550.2.123
by Cemil Azizoglu
Cleanup |
253 |
if (MIR_BUILD_PLATFORM_MESA_KMS OR MIR_BUILD_PLATFORM_MESA_X11) |
101.1.3
by Christopher James Halse Rogers
Rework into a simpler GBMBufferAllocator/GBMBuffer pair |
254 |
find_package( PkgConfig ) |
122.1.1
by Kevin DuBois
add a version number to the gbm requirements so that we don't get build errors with the wrong gbm version |
255 |
pkg_check_modules( GBM REQUIRED gbm>=9.0.0) |
101.1.20
by Christopher James Halse Rogers
Add pseudo-implementation of GBMBufferAllocator constructor |
256 |
pkg_check_modules( DRM REQUIRED libdrm ) |
101.1.3
by Christopher James Halse Rogers
Rework into a simpler GBMBufferAllocator/GBMBuffer pair |
257 |
endif() |
93.4.71
by Kevin DuBois
begin changing the build system to detect certain android libraries/headers |
258 |
|
3506.9.7
by Christopher James Halse Rogers
Ensure Mesa-KMS only loads when the EGL platform supports GBM |
259 |
if (MIR_BUILD_PLATFORM_EGLSTREAM_KMS) |
260 |
pkg_check_modules(EPOXY REQUIRED epoxy) |
|
261 |
endif() |
|
262 |
||
331.1.11
by Kevin DuBois
detangle some ugliness with 3rd party a bit better |
263 |
set(MIR_ANDROID_INCLUDE_DIRECTORIES) # to be filled by android-input |
264 |
set(MIR_ANDROID_INPUT_COMPILE_FLAGS) # to be filled by android-input |
|
265 |
set(MIR_3RD_PARTY_INCLUDE_DIRECTORIES) |
|
266 |
add_subdirectory(3rd_party/) |
|
331.1.16
by Kevin DuBois
cleanup main cmake file some more |
267 |
|
772.2.3
by Alexandros Frantzis
lttng: Fix typo in tracepoint lib installation dir |
268 |
set(MIR_TRACEPOINT_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/mir/tools) |
772.2.2
by Alexandros Frantzis
lttng: Also search for tracepoint provider libraries in installation path |
269 |
|
134.6.2
by Thomas Voß
Fix linker issues with gcc 4.6 and add proper library versioning. |
270 |
set(MIR_GENERATED_INCLUDE_DIRECTORIES) |
473.1.2
by Jussi Pakkanen
Factor Android input usage into a CMake macro. |
271 |
macro(uses_android_input _target_name) |
272 |
set_property(TARGET ${_target_name} APPEND_STRING PROPERTY COMPILE_FLAGS "${MIR_ANDROID_INPUT_COMPILE_FLAGS}") |
|
273 |
endmacro() |
|
83.2.1
by Kevin DuBois
CMakeLists.txt was including boost directories after it was add_directory(src/). was a problem for non-standard boost installation paths |
274 |
add_subdirectory(src/) |
134.6.2
by Thomas Voß
Fix linker issues with gcc 4.6 and add proper library versioning. |
275 |
include_directories(${MIR_GENERATED_INCLUDE_DIRECTORIES}) |
83.2.1
by Kevin DuBois
CMakeLists.txt was including boost directories after it was add_directory(src/). was a problem for non-standard boost installation paths |
276 |
|
3332.2.3
by Daniel van Vugt
Fix test failure -- need to add_definitions twice, because the top-level |
277 |
# This copy is used by users of mirplatforminputevdev
|
3332.2.2
by Daniel van Vugt
Work in progress: wily now works |
278 |
if ("${LIBINPUT_VERSION}" VERSION_LESS "1.1") |
3332.2.5
by Daniel van Vugt
s/LIBINPUT_HAS_ACCEL_PROFILE/MIR_LIBINPUT_HAS_ACCEL_PROFILE/g |
279 |
add_definitions(-DMIR_LIBINPUT_HAS_ACCEL_PROFILE=0) |
3332.2.2
by Daniel van Vugt
Work in progress: wily now works |
280 |
else () |
3332.2.5
by Daniel van Vugt
s/LIBINPUT_HAS_ACCEL_PROFILE/MIR_LIBINPUT_HAS_ACCEL_PROFILE/g |
281 |
add_definitions(-DMIR_LIBINPUT_HAS_ACCEL_PROFILE=1) |
3332.2.2
by Daniel van Vugt
Work in progress: wily now works |
282 |
endif () |
283 |
||
802.1.1
by Alan Griffiths
Clean up test dependency on umockdev |
284 |
add_subdirectory(benchmarks/) |
852.3.27
by Kevin DuBois
update examples for new api |
285 |
add_subdirectory(examples/) |
1904.3.1
by Alberto Aguirre
Move examples that use private mir functionality into the playground. |
286 |
add_subdirectory(playground/) |
28.1.1
by Chase Douglas
Fix guide building |
287 |
add_subdirectory(guides/) |
45.2.18
by Alan Griffiths
First cut (not working right) |
288 |
add_subdirectory(cmake/) |
66.1.2
by Thomas Voß
* Enabled coverage reporting. |
289 |
|
1806.3.12
by Daniel van Vugt
Remember to honor MIR_ENABLE_TESTS and not emit tests if it's disabled. |
290 |
if (MIR_ENABLE_TESTS) |
2376.3.1
by Daniel van Vugt
Rename FindGtest.cmake -> FindGtestGmock.cmake |
291 |
find_package(GtestGmock REQUIRED) |
2555.4.1
by Alexandros Frantzis
tests: First cut at end-to-end input tests |
292 |
pkg_check_modules(LIBEVDEV REQUIRED libevdev) |
1806.3.12
by Daniel van Vugt
Remember to honor MIR_ENABLE_TESTS and not emit tests if it's disabled. |
293 |
include_directories(${GMOCK_INCLUDE_DIR} ${GTEST_INCLUDE_DIR}) |
294 |
add_subdirectory(tests/) |
|
295 |
||
296 |
# There's no nice way to format this. Thanks CMake.
|
|
2494.2.16
by Kevin DuBois
merge mir |
297 |
mir_add_test(NAME LGPL-required |
3400.1.14
by Brandon Schaefer
* Move MirEvents over to use capnproto. We are still using the android input sender/recevier |
298 |
COMMAND /bin/sh -c "! grep -rl 'GNU General' ${PROJECT_SOURCE_DIR}/src/client ${PROJECT_SOURCE_DIR}/include/client ${PROJECT_SOURCE_DIR}/src/common ${PROJECT_SOURCE_DIR}/include/common ${PROJECT_SOURCE_DIR}/src/include/common ${PROJECT_SOURCE_DIR}/src/platform ${PROJECT_SOURCE_DIR}/include/platform ${PROJECT_SOURCE_DIR}/src/include/platform ${PROJECT_SOURCE_DIR}/src/capnproto" |
1806.3.12
by Daniel van Vugt
Remember to honor MIR_ENABLE_TESTS and not emit tests if it's disabled. |
299 |
)
|
2494.2.16
by Kevin DuBois
merge mir |
300 |
mir_add_test(NAME GPL-required |
301 |
COMMAND /bin/sh -c "! grep -rl 'GNU Lesser' ${PROJECT_SOURCE_DIR}/src/server ${PROJECT_SOURCE_DIR}/include/server ${PROJECT_SOURCE_DIR}/src/include/server ${PROJECT_SOURCE_DIR}/tests ${PROJECT_SOURCE_DIR}/examples" |
|
1806.3.12
by Daniel van Vugt
Remember to honor MIR_ENABLE_TESTS and not emit tests if it's disabled. |
302 |
)
|
2360.2.1
by Alexandros Frantzis
tests,tools: Add tools to detect and fix mismatches between debian packaging and source ABIs |
303 |
|
2494.2.16
by Kevin DuBois
merge mir |
304 |
mir_add_test(NAME package-abis |
305 |
COMMAND /bin/sh -c "cd ${PROJECT_SOURCE_DIR} && tools/update_package_abis.sh --check --verbose") |
|
1806.3.12
by Daniel van Vugt
Remember to honor MIR_ENABLE_TESTS and not emit tests if it's disabled. |
306 |
endif () |
1769.1.4
by Daniel van Vugt
Automate checking for ABI breakage. |
307 |
|
390.4.1
by Daniel van Vugt
Convert libmir (STATIC) into libmirserver (DYNAMIC). |
308 |
enable_coverage_report(mirserver) |
1830.2.3
by Alan Griffiths
Include generated headers in docs so their symbols can be processed |
309 |
include (cmake/Doxygen.cmake) |
1907.1.1
by Alberto Aguirre
Add make targets to check abi compatibility against the last official release. |
310 |
include (cmake/ABICheck.cmake) |
2402.5.5
by Daniel van Vugt
Shrink the diff |
311 |
|
2494.2.16
by Kevin DuBois
merge mir |
312 |
add_custom_target(ptest |
313 |
COMMAND "${CMAKE_SOURCE_DIR}/tools/run_ctests.sh" "--cost-file" "${CMAKE_BINARY_DIR}/ptest_ctest_cost_data.txt" "sh ${CMAKE_BINARY_DIR}/discover_all_tests.sh" "--" "$$ARGS" |
|
314 |
)
|
|
2982.2.2
by Christopher James Halse Rogers
Add release-checks target. |
315 |
|
316 |
add_custom_target(release-checks) |
|
317 |
||
318 |
mir_check_no_unreleased_symbols(mirclient release-checks) |
|
3274.6.3
by Alberto Aguirre
Also check mircommon |
319 |
mir_check_no_unreleased_symbols(mircommon release-checks) |
2982.2.2
by Christopher James Halse Rogers
Add release-checks target. |
320 |
mir_check_no_unreleased_symbols(mircookie release-checks) |
321 |
mir_check_no_unreleased_symbols(mirplatform release-checks) |
|
322 |
mir_check_no_unreleased_symbols(mirprotobuf release-checks) |
|
323 |
mir_check_no_unreleased_symbols(mirserver release-checks) |
|
3693.1.2
by Alan Griffiths
Add "doc-show" target |
324 |
|
325 |
if (TARGET doc) |
|
326 |
add_custom_target(doc-show |
|
327 |
xdg-open ${CMAKE_BINARY_DIR}/doc/html/index.html |
|
328 |
DEPENDS doc) |
|
329 |
endif() |