-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
119 lines (103 loc) · 4.3 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Copyright (c) 2013-2018, EPFL/Blue Brain Project
# Raphael Dumusc <raphael.dumusc@epfl.ch>
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(Tide VERSION 1.5.1)
set(Tide_VERSION_ABI 1)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/common)
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/CMake/common/Common.cmake)
message(FATAL_ERROR "CMake/common missing, run: git submodule update --init")
endif()
set(TIDE_DESCRIPTION "Tiled Interactive Display Environment")
set(TIDE_MAINTAINER "Blue Brain Project <bbp-open-source@googlegroups.com>")
set(TIDE_VENDOR "Blue Brain Project")
set(TIDE_LICENSE BSD)
set(TIDE_DEB_DEPENDS python imagemagick libopenmpi-dev openmpi-bin
libboost-program-options-dev libboost-serialization-dev libboost-test-dev
qtbase5-private-dev qtdeclarative5-dev libqt5serialport5-dev libqt5svg5-dev
libqt5webkit5-dev libqt5xmlpatterns5-dev libqt5x11extras5-dev
qml-module-qtquick-controls qml-module-qtqml-models2
libpoppler-glib-dev libcairo2-dev libpoppler-qt5-dev librsvg2-dev libtiff5-dev
libavutil-dev libavformat-dev libavcodec-dev libswscale-dev
)
include(LSBInfo)
if(LSB_DISTRIBUTOR_ID STREQUAL "Ubuntu" AND LSB_RELEASE VERSION_GREATER 16.04)
list(APPEND TIDE_DEB_DEPENDS qtwebengine5-dev qml-module-qtwebengine)
endif()
set(TIDE_PORT_DEPENDS boost ffmpeg mpich-devel qt5)
set(TIDE_BREW_DEPENDS boost ffmpeg librsvg open-mpi poppler qt)
# disable noisy warnings from ChoosePython
set(CHOOSE_PYTHON_DONE ON)
include(FindBoostConfig)
include(Common)
set(_deflect_min_version 1.0.1)
set(_rockets_min_version 0.1)
common_find_package(Boost 1.56 REQUIRED COMPONENTS program_options serialization
unit_test_framework)
common_find_package(Deflect ${_deflect_min_version} REQUIRED)
common_find_package(MPI REQUIRED)
common_find_package(Qt5Concurrent REQUIRED)
common_find_package(Qt5Core REQUIRED)
common_find_package(Qt5Gui REQUIRED COMPONENTS Private)
if(NOT TARGET Qt5::QTuioTouchPlugin)
message(WARNING "Qt5::QTuioTouchPlugin not detected, touch may be unavailable")
endif()
common_find_package(Qt5Network REQUIRED)
common_find_package(Qt5Qml REQUIRED)
common_find_package(Qt5Quick 5.4 REQUIRED)
common_find_package(Qt5SerialPort)
if(TARGET Qt5::SerialPort)
option(TIDE_ENABLE_PLANAR_CONTROLLER "Enable Planar screen control" ON)
endif()
common_find_package(Qt5Svg REQUIRED)
common_find_package(Qt5WebEngine 5.6)
if(TARGET Qt5::WebEngine)
option(TIDE_ENABLE_WEBBROWSER_SUPPORT "Enable webbrowser support" ON)
endif()
common_find_package(Qt5Widgets REQUIRED)
common_find_package(Qt5XmlPatterns REQUIRED)
common_find_package(Qt5Xml REQUIRED)
if(LINUX)
common_find_package(Qt5X11Extras REQUIRED)
endif()
common_find_package(RSVG MODULE librsvg-2.0 2.36.2)
common_find_package(Threads REQUIRED)
common_find_package(TIFF)
common_find_package(VirtualKeyboard)
common_find_package(X11) # for swap sync unit tests
common_find_package(FFMPEG 3.4)
if(FFMPEG_FOUND)
option(TIDE_ENABLE_MOVIE_SUPPORT "Enable FFMPEG movie support" ON)
endif()
common_find_package(cairo)
common_find_package(poppler-glib)
if(CAIRO_FOUND AND POPPLER-GLIB_FOUND)
option(TIDE_ENABLE_PDF_SUPPORT "Enable Pdf support using Poppler-glib + Cairo" ON)
else()
common_find_package(poppler-qt5)
if(POPPLER-QT5_FOUND)
option(TIDE_ENABLE_PDF_SUPPORT "Enable Pdf support using Poppler-qt5" ON)
endif()
endif()
common_find_package(Rockets ${_rockets_min_version})
if(TARGET Rockets)
option(TIDE_ENABLE_REST_INTERFACE "Enable REST interface using Rockets" ON)
endif()
common_find_package_post()
option(TIDE_IGNORE_MPI_THREADSAFETY "Ignore MPI_THREAD_MULITPLE requirement (Ubuntu 14.04)" OFF)
add_subdirectory(tide)
add_subdirectory(apps)
add_subdirectory(tests)
# Install example files
install(DIRECTORY examples DESTINATION share/Tide COMPONENT examples)
# Packaging (including subprojects)
set(TIDE_PACKAGE_DEB_DEPENDS ${TIDE_DEB_DEPENDS})
add_deb_depends(Deflect PACKAGE_NAME desktopstreamer MIN_VERSION
${_deflect_min_version} qtbase5-dev libturbojpeg)
add_deb_depends(Rockets MIN_VERSION ${_rockets_min_version} libwebsockets-dev)
include(CommonCPack) # also includes CommonPackageConfig
# Documentation
set(COMMON_PROJECT_DOMAIN ch.epfl.bluebrain)
set(DOXYGEN_MAINPAGE_MD README.md)
set(DOXYGEN_EXTRA_INPUT ${PROJECT_SOURCE_DIR}/README.md)
set(DOXYGEN_PROJECT_LOGO ${PROJECT_SOURCE_DIR}/doc/logo_doxygen.png)
include(DoxygenRule)