360.1.6
by Florian Boucault
Renamed unity-qt into unity-2d |
1 |
project(unity-2d) |
101
by Aurelien Gateau
Moved all unity-qt-launcher code to a launcher/ dir |
2 |
cmake_minimum_required(VERSION 2.8) |
3 |
||
771.5.1
by Olivier Tilloy
Un-hardcode standard install paths (use GNUInstallDirs.cmake). |
4 |
# Standard install paths
|
5 |
include(GNUInstallDirs) |
|
6 |
||
101
by Aurelien Gateau
Moved all unity-qt-launcher code to a launcher/ dir |
7 |
# Dirs
|
771.5.1
by Olivier Tilloy
Un-hardcode standard install paths (use GNUInstallDirs.cmake). |
8 |
set(UNITY_2D_DIR "${CMAKE_INSTALL_DATADIR}/unity-2d") |
284.1.10
by Florian Boucault
Respect camelCasing for variables. |
9 |
set(UNITY_DIR /usr/share/unity/) |
574.43.1
by Florian Boucault
[launcher] Migrated GConf key /desktop/unity-2d/launcher/super_key_enable to dconf |
10 |
set(UNITY_2D_DATA_DIR "${CMAKE_SOURCE_DIR}/data") |
101
by Aurelien Gateau
Moved all unity-qt-launcher code to a launcher/ dir |
11 |
|
771.5.3
by Olivier Tilloy
Also un-hardcode standard install paths in all debian packaging files. |
12 |
# Configure debian files
|
771.5.2
by Olivier Tilloy
Also un-hardcode standard install paths in debian install files. |
13 |
string(SUBSTRING "${CMAKE_INSTALL_PREFIX}" 1 -1 DEBIAN_INSTALL_PREFIX) |
771.5.3
by Olivier Tilloy
Also un-hardcode standard install paths in all debian packaging files. |
14 |
file(GLOB DEBIAN_FILES debian/*.in) |
15 |
foreach(in_file ${DEBIAN_FILES}) |
|
16 |
string(LENGTH ${in_file} len) |
|
771.5.2
by Olivier Tilloy
Also un-hardcode standard install paths in debian install files. |
17 |
math(EXPR len "${len} - 3") |
771.5.3
by Olivier Tilloy
Also un-hardcode standard install paths in all debian packaging files. |
18 |
string(SUBSTRING "${in_file}" 0 ${len} file) |
19 |
configure_file(${in_file} ${file} @ONLY) |
|
20 |
endforeach(in_file) |
|
771.5.2
by Olivier Tilloy
Also un-hardcode standard install paths in debian install files. |
21 |
|
105
by Aurelien Gateau
Merged in panel |
22 |
# Build flags
|
23 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall -std=c++0x") |
|
571.1.1
by Florian Boucault
Added compilation flags to help detecting use of deprecated GTK APIs and direct access to object fields. |
24 |
# Flags to help detecting use of deprecated GTK APIs and direct access to object fields
|
25 |
# https://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK+
|
|
26 |
# https://live.gnome.org/GnomeGoals/UseGseal
|
|
27 |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGSEAL_ENABLE -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED") |
|
105
by Aurelien Gateau
Merged in panel |
28 |
|
574.31.2
by Aurelien Gateau
[buildsystem] Define QT_NO_KEYWORDS for all of unity-2d |
29 |
# gtk and unity-core (actually sigc++) do not like Qt defining macros named
|
30 |
# "signals" and "slots"
|
|
31 |
add_definitions(-DQT_NO_KEYWORDS) |
|
32 |
||
101
by Aurelien Gateau
Moved all unity-qt-launcher code to a launcher/ dir |
33 |
# Dependencies
|
34 |
include(FindPkgConfig) |
|
35 |
find_package(Qt4 REQUIRED) |
|
359.12.1
by Aurelien Gateau
Started to create libunity-2d |
36 |
find_package(X11 REQUIRED) |
392.3.6
by Aurelien Gateau
Started to setup cmake rules for translations |
37 |
find_package(Gettext REQUIRED) |
574.41.7
by Aurelien Gateau
[buildsystem] Centralize all glib, gdk, gtk and gio dependency checks |
38 |
pkg_check_modules(GLIB REQUIRED glib-2.0) |
574.41.8
by Aurelien Gateau
[buildsystem] Build with GTK3, Disable indicatorapplet for now |
39 |
pkg_check_modules(GDK REQUIRED gdk-3.0) |
40 |
pkg_check_modules(GTK REQUIRED gtk+-3.0) |
|
574.41.7
by Aurelien Gateau
[buildsystem] Centralize all glib, gdk, gtk and gio dependency checks |
41 |
pkg_check_modules(GIO REQUIRED gio-2.0) |
574.31.7
by Aurelien Gateau
[buildsystem] Use libwnck 3, so that we are gtk2-free |
42 |
pkg_check_modules(WNCK REQUIRED libwnck-3.0) |
574.58.11
by Aurelien Gateau
[panel] Move qtgconf test up so that it can be used in panel |
43 |
pkg_check_modules(QTGCONF REQUIRED libqtgconf) |
771.43.2
by Didier Roche
bump nux-core build-dep as well, thanks Gerry |
44 |
pkg_check_modules(NUXCORE REQUIRED nux-core-2.0) |
617.1.1
by Didier Roche
- add new -dev project (LP: #814709) |
45 |
pkg_check_modules(PANGO REQUIRED pango) |
771.9.1
by Florian Boucault
Centralised configuration management into config.h. All common accesses to DConf go through there. |
46 |
pkg_check_modules(DCONFQT REQUIRED dconf-qt) |
101
by Aurelien Gateau
Moved all unity-qt-launcher code to a launcher/ dir |
47 |
|
574.43.1
by Florian Boucault
[launcher] Migrated GConf key /desktop/unity-2d/launcher/super_key_enable to dconf |
48 |
|
49 |
# GSettings schemas
|
|
50 |
pkg_check_modules(GLIB REQUIRED glib-2.0) |
|
51 |
set (UNITY_2D_SCHEMAS "com.canonical.Unity2d.gschema.xml") |
|
52 |
set (UNITY_2D_GCONF_CONVERT "unity-2d.convert") |
|
53 |
set (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/") |
|
771.31.1
by Tiago Salem Herrmann
[lib] avoid SIGABRT in dash when the schema file isn't properly installed |
54 |
set (UNITY_2D_SCHEMA_FILE "${GSETTINGS_DIR}${UNITY_2D_SCHEMAS}") |
574.43.1
by Florian Boucault
[launcher] Migrated GConf key /desktop/unity-2d/launcher/super_key_enable to dconf |
55 |
set (GCONF_CONVERT_DIR "${CMAKE_INSTALL_PREFIX}/share/GConf/gsettings") |
56 |
execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE GLIB_COMPILE_SCHEMAS OUTPUT_STRIP_TRAILING_WHITESPACE) |
|
57 |
||
58 |
# Run the schemas validator and error if it fails
|
|
59 |
execute_process (COMMAND ${GLIB_COMPILE_SCHEMAS} ${UNITY_2D_DATA_DIR} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE) |
|
60 |
||
61 |
if (_schemas_invalid) |
|
62 |
message (SEND_ERROR "Schemas validation error: ${_schemas_invalid}") |
|
63 |
endif (_schemas_invalid) |
|
64 |
||
65 |
# Actually install and recompile the schemas
|
|
66 |
message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}") |
|
67 |
install (FILES ${UNITY_2D_DATA_DIR}/${UNITY_2D_SCHEMAS} DESTINATION ${GSETTINGS_DIR}) |
|
68 |
install (CODE "message (STATUS \"Compiling GSettings schemas\")") |
|
69 |
install (CODE "execute_process (COMMAND ${GLIB_COMPILE_SCHEMAS} ${GSETTINGS_DIR})") |
|
70 |
||
771.31.1
by Tiago Salem Herrmann
[lib] avoid SIGABRT in dash when the schema file isn't properly installed |
71 |
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) |
72 |
||
574.43.1
by Florian Boucault
[launcher] Migrated GConf key /desktop/unity-2d/launcher/super_key_enable to dconf |
73 |
# Install GConf to GSettings conversion file
|
74 |
install (FILES ${UNITY_2D_DATA_DIR}/${UNITY_2D_GCONF_CONVERT} DESTINATION ${GCONF_CONVERT_DIR}) |
|
75 |
||
104
by Aurelien Gateau
Factorize definition of include directories |
76 |
include_directories( |
77 |
${CMAKE_BINARY_DIR} |
|
78 |
${QT_INCLUDE_DIR} |
|
79 |
${QT_QTCORE_INCLUDE_DIR} |
|
80 |
${QT_QTDBUS_INCLUDE_DIR} |
|
81 |
${QT_QTDECLARATIVE_INCLUDE_DIR} |
|
82 |
${QT_QTXML_INCLUDE_DIR} |
|
83 |
${QT_QTGUI_INCLUDE_DIR} |
|
552.1.1
by Florian Boucault
[dash, launcher, spread] Added a new command line switch (-opengl) that triggers the use of a QGLWidget for the QML viewport. |
84 |
${QT_QTOPENGL_INCLUDE_DIR} |
359.12.1
by Aurelien Gateau
Started to create libunity-2d |
85 |
${X11_INCLUDE_DIR} |
771.9.1
by Florian Boucault
Centralised configuration management into config.h. All common accesses to DConf go through there. |
86 |
${DCONFQT_INCLUDE_DIRS} |
104
by Aurelien Gateau
Factorize definition of include directories |
87 |
)
|
88 |
||
359.12.14
by Aurelien Gateau
Unbreak "make check" |
89 |
# Tests
|
771.13.1
by Renato Araujo Oliveira Filho
[tests] Fixed Cmake files to correct works with ctest. |
90 |
enable_testing() |
771.13.2
by Renato Araujo Oliveira Filho
[cmake] Created custom target 'check' to keep unified with unity-related projects. |
91 |
add_custom_target(check make test) |
771.50.38
by Gerry Boland
Ensure binart_dir.txt generated in source directory |
92 |
configure_file(tests/misc/binary_dir.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/tests/misc/binary_dir.txt @ONLY) |
359.12.14
by Aurelien Gateau
Unbreak "make check" |
93 |
|
101
by Aurelien Gateau
Moved all unity-qt-launcher code to a launcher/ dir |
94 |
# Source
|
359.30.1
by Aurelien Gateau
Renamed libunity-2d to libunity-2d-private |
95 |
add_subdirectory(libunity-2d-private) |
105
by Aurelien Gateau
Merged in panel |
96 |
add_subdirectory(panel) |
319.5.1
by Ugo Riboni
First impementation of the spread/expose functionality. |
97 |
add_subdirectory(spread) |
775
by Ugo Riboni
Rename the viewer to shell |
98 |
add_subdirectory(shell) |
392.3.6
by Aurelien Gateau
Started to setup cmake rules for translations |
99 |
add_subdirectory(po) |
907.1.12
by Ugo Riboni
Add small application to retrieve the input shape of any window and either output it as text or a png bitmap |
100 |
add_subdirectory(tests/getshape) |
768.4.1
by Renato Araujo Oliveira Filho
[cmake] Update cmake scripts to allow build and test application in a different directory. |
101 |
|
102 |
# uninstall target
|
|
768.4.2
by Renato Araujo Oliveira Filho
Removed wrong file from the repository. |
103 |
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) |
768.4.1
by Renato Araujo Oliveira Filho
[cmake] Update cmake scripts to allow build and test application in a different directory. |
104 |
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |