forked from Studio3T/robomongo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (63 loc) · 2.23 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
cmake_minimum_required(VERSION 3.8.0)
project(Robomongo)
# Where to look first for CMake modules, before "${CMAKE_ROOT}/Modules" is checked
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
# Project version
set(PROJECT_VERSION_MAJOR "1")
set(PROJECT_VERSION_MINOR "4")
set(PROJECT_VERSION_PATCH "4")
set(PROJECT_VERSION_BUILD "")
set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${PROJECT_VERSION_BUILD}")
# Enable C++17 features
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Modules
include(RobomongoPrintUtils)
include(RobomongoCMakeDefaults)
include(RobomongoDefaults)
include(RobomongoCommon)
include(RobomongoTrashSymbols)
include(RobomongoTargetArch)
include(RobomongoInstallQt)
include(RobomongoPackage)
# Search for dependencies
find_package(Threading REQUIRED) # Wrapper arround CMake "Threads" module
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5PrintSupport REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Xml REQUIRED)
if(NOT SYSTEM_LINUX)
find_package(Qt5WebEngineWidgets REQUIRED)
endif()
find_package(MongoDB REQUIRED)
find_package(OpenSSL REQUIRED)
if (SYSTEM_MACOSX)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14)
find_package(Qt5MacExtras REQUIRED)
endif()
# Projects
set(LIBSSH2_VERSION 1.9.0)
if(SYSTEM_LINUX)
set(LIBSSH2_VERSION 1.7.0)
endif()
set(LIBSSH2_DIR src/third-party/libssh2-${LIBSSH2_VERSION})
set(QJSON_VERSION 0.8.1)
set(QJSON_DIR src/third-party/qjson-${QJSON_VERSION})
set(QSCINTILLA_VERSION 2.8.4)
set(QSCINTILLA_DIR src/third-party/qscintilla-${QSCINTILLA_VERSION})
set(ESPRIMA_VERSION 2.7.3)
set(ESPRIMA_DIR src/third-party/esprima-${ESPRIMA_VERSION})
# todo: Use equivalent vars from googletest cmake files. Currently they are somehow not working.
set(GOOGLE_TEST_VERSION 1.8.1)
set(GOOGLE_TEST_DIR src/third-party/googletest-${GOOGLE_TEST_VERSION})
add_subdirectory(${LIBSSH2_DIR})
add_subdirectory(src/robomongo/ssh)
add_subdirectory(${QJSON_DIR})
add_subdirectory(${QSCINTILLA_DIR})
add_subdirectory(${GOOGLE_TEST_DIR})
add_subdirectory(src/robomongo)
add_subdirectory(src/robomongo-unit-tests)
# Show configuration summary
include(RobomongoConfigurationSummary)