-
Notifications
You must be signed in to change notification settings - Fork 61
/
CMakeLists.txt
103 lines (68 loc) · 2.53 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
# emacs: -*- CMake -*-
# kate: replace-tabs off; tab-width 4; indent-width 4; tab-indents true; indent-mode normal
# vim: ts=4:sw=4:noexpandtab
# project name
project(aseba)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
# ensure a minimal version of CMake
cmake_minimum_required(VERSION 3.5)
include(FeatureSummary)
# additional CMake modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
include(CMakeModules/ParseVersion.cmake)
include(CMakeModules/cpp_features.cmake)
include(CMakeModules/workarounds.cmake)
include(CMakeModules/aseba_conf.cmake)
include(CMakeModules/dashel.cmake)
include(CMakeModules/enki.cmake)
include(CMakeModules/deployqt.cmake)
include(CMakeModules/codesign.cmake)
add_subdirectory(third_party/catch2)
# testing and defines
enable_testing()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
find_package(Threads REQUIRED)
# Qt and Qwt
find_package(Qt5 OPTIONAL_COMPONENTS Core Gui Widgets OpenGL Network Help Concurrent Xml Svg Test LinguistTools)
find_package(Qwt)
if (UNIX AND NOT APPLE)
find_package(Qt5X11Extras)
find_package(Qt5DBus)
endif ()
# Zeroconf
include(CMakeModules/zeroconf.cmake)
# Aseba itself
set(LIB_INSTALL_DIR lib CACHE FILEPATH "Where to install libraries")
set(LIB_VERSION_MAJOR 3) # Must be bumped for incompatible ABI changes
set(LIB_VERSION_MINOR 0)
set(LIB_VERSION_PATCH 0)
set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH})
add_subdirectory(aseba)
# Examples for developers
add_subdirectory(examples)
# Unit tests
add_subdirectory(tests)
# User entries
if (UNIX)
add_subdirectory(menu)
endif()
if(EXISTS ${PROJECT_SOURCE_DIR}/thymio-blockly-standalone/CMakeLists.txt)
add_subdirectory(${PROJECT_SOURCE_DIR}/thymio-blockly-standalone)
message("-- Found thymio-blockly-standalone, will bundle blockly")
endif()
feature_summary( WHAT PACKAGES_FOUND PACKAGES_NOT_FOUND ENABLED_FEATURES DISABLED_FEATURES)
if(WIN32)
add_subdirectory(third_party/bonjour)
set(ASEBA_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}")
set(CPACK_MODULE_PATH ${PROJECT_SOURCE_DIR}/windows ${CPACK_MODULE_PATH})
set(CPACK_MONOLITHIC_INSTALL 1)
configure_file(
${PROJECT_SOURCE_DIR}/windows/NSIS.definitions.nsh.in
${CMAKE_CURRENT_BINARY_DIR}/resources/NSIS.definitions.nsh
)
endif()
SET(CPACK_PACKAGE_VERSION_MAJOR "${ASEBA_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${ASEBA_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${ASEBA_VERSION_PATCH}")
include(CPack)