forked from epam/Indigo
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
135 lines (117 loc) · 5.35 KB
/
CMakeLists.txt
File metadata and controls
135 lines (117 loc) · 5.35 KB
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
if(WIN32)
set(CMAKE_SYSTEM_VERSION 6.1)
endif()
project(Indigo LANGUAGES NONE)
cmake_minimum_required(VERSION 3.9)
# Options
# Common options
option(ENABLE_TESTS "Enable CTest tests" ON)
option(BUILD_STANDALONE "Build without any system dependencies except for libc, otherwise require tinyxml2, zlib, rapidjson, and cairo for renderer" ON)
option(USE_CLANG_TIDY "Use clang-tidy for static analysis" OFF)
option(WITH_STATIC "Build Indigo static library as well as shared" OFF)
# Indigo API options
option(BUILD_INDIGO "Build indigo shared library" ON)
option(USE_FONT_MANAGER "Build indigo render with font_face_manager" OFF)
# Indigo API Wrappers options
option(BUILD_INDIGO_WRAPPERS "Build all existing Indigo API wrappers" ON)
option(BUILD_INDIGO_WRAPPERS_PYTHON "Build Indigo API wrappers to Python" ON)
option(BUILD_INDIGO_WRAPPERS_JAVA "Build Indigo API wrappers to Java" ON)
option(BUILD_INDIGO_WRAPPERS_DOTNET "Build Indigo API wrappers to .NET" ON)
# option(BUILD_INDIGO_WRAPPERS_R "Build Indigo API wrappers to R [WIP]" OFF)
# CLI utils options
option(BUILD_INDIGO_UTILS "Build indigo-cano, indigo-deco and indigo-depict utilities" ON)
# Bingo options
option(BUILD_BINGO "Build all existing Bingo cartridges" ON)
option(BUILD_BINGO_POSTGRES "Build Bingo Postgres cartridge" ON)
option(BUILD_BINGO_SQLSERVER "Build Bingo MS SqlServer cartridge" ON)
option(BUILD_BINGO_ORACLE "Build Bingo Oracle cartridge" ON)
# Bingo-Elastic options
option(BUILD_BINGO_ELASTIC "Build Bingo Elastic cartridges for Java and Python" ON)
# Auto-set dependent options
if (BUILD_INDIGO_UTILS AND NOT BUILD_INDIGO)
message(STATUS "Enabling BUILD_INDIGO because it's required for BUILD_INDIGO_UTILS")
set(BUILD_INDIGO ON)
endif()
if (BUILD_INDIGO_WRAPPERS)
if (NOT BUILD_INDIGO_WRAPPERS_PYTHON AND NOT BUILD_INDIGO_WRAPPERS_JAVA AND NOT BUILD_INDIGO_WRAPPERS_DOTNET)
message(STATUS "No specific wrappers selected, disabling BUILD_INDIGO_WRAPPERS")
set(BUILD_INDIGO_WRAPPERS OFF)
else()
if (BUILD_INDIGO_WRAPPERS_PYTHON)
message(STATUS "Enabling BUILD_INDIGO_WRAPPERS_PYTHON")
endif()
if (BUILD_INDIGO_WRAPPERS_JAVA)
message(STATUS "Enabling BUILD_INDIGO_WRAPPERS_JAVA")
endif()
if (BUILD_INDIGO_WRAPPERS_DOTNET)
message(STATUS "Enabling BUILD_INDIGO_WRAPPERS_DOTNET")
endif()
endif()
else()
message(STATUS "Disabling BUILD_INDIGO_WRAPPERS_PYTHON, BUILD_INDIGO_WRAPPERS_JAVA, BUILD_INDIGO_WRAPPERS_DOTNET because BUILD_INDIGO_WRAPPERS=OFF")
set(BUILD_INDIGO_WRAPPERS_PYTHON OFF)
set(BUILD_INDIGO_WRAPPERS_JAVA OFF)
set(BUILD_INDIGO_WRAPPERS_DOTNET OFF)
# set(BUILD_INDIGO_WRAPPERS_R OFF)
endif()
if (BUILD_BINGO)
message(STATUS "Enabling BUILD_BINGO_POSTGRES, BUILD_BINGO_SQLSERVER, BUILD_BINGO_ORACLE because BUILD_BINGO=ON")
set(BUILD_BINGO_POSTGRES ON)
set(BUILD_BINGO_SQLSERVER ON)
set(BUILD_BINGO_ORACLE ON)
else()
message(STATUS "Disabling BUILD_BINGO_POSTGRES, BUILD_BINGO_SQLSERVER, BUILD_BINGO_ORACLE because BUILD_BINGO=OFF")
set(BUILD_BINGO_POSTGRES OFF)
set(BUILD_BINGO_SQLSERVER OFF)
set(BUILD_BINGO_ORACLE OFF)
endif()
if (EMSCRIPTEN)
message(STATUS "Emscripten build: Disabling all except indigo-ketcher and indigo-wasm, and enabling them")
set(ENABLE_TESTS OFF)
set(BUILD_STANDALONE ON)
set(BUILD_INDIGO_WRAPPERS OFF)
set(BUILD_INDIGO_WRAPPERS_PYTHON OFF)
set(BUILD_INDIGO_WRAPPERS_JAVA OFF)
set(BUILD_INDIGO_WRAPPERS_DOTNET OFF)
# set(BUILD_INDIGO_WRAPPERS_R OFF)
set(BUILD_INDIGO_UTILS OFF)
set(BUILD_BINGO_POSTGRES OFF)
set(BUILD_BINGO_SQLSERVER OFF)
set(BUILD_BINGO_ORACLE OFF)
set(BUILD_BINGO_ELASTIC OFF)
set(USE_FONT_MANAGER ON)
endif()
if (BUILD_INDIGO OR BUILD_INDIGO_UTILS OR BUILD_BINGO_SQLSERVER OR BUILD_BINGO_ORACLE OR BUILD_BINGO_POSTGRES OR EMSCRIPTEN)
set(BUILD_NATIVE ON)
endif()
# Print all options and settings
message(STATUS "ENABLE_TESTS=${ENABLE_TESTS}")
message(STATUS "BUILD_STANDALONE=${BUILD_STANDALONE}")
message(STATUS "BUILD_INDIGO=${BUILD_INDIGO}")
message(STATUS "BUILD_INDIGO_WRAPPERS=${BUILD_INDIGO_WRAPPERS}")
message(STATUS "BUILD_INDIGO_WRAPPERS_PYTHON=${BUILD_INDIGO_WRAPPERS_PYTHON}")
message(STATUS "BUILD_INDIGO_WRAPPERS_JAVA=${BUILD_INDIGO_WRAPPERS_JAVA}")
message(STATUS "BUILD_INDIGO_WRAPPERS_DOTNET=${BUILD_INDIGO_WRAPPERS_DOTNET}")
# message(STATUS "BUILD_INDIGO_WRAPPERS_R=${BUILD_INDIGO_WRAPPERS_R}")
message(STATUS "BUILD_INDIGO_UTILS=${BUILD_INDIGO_UTILS}")
message(STATUS "BUILD_BINGO_POSTGRES=${BUILD_BINGO_POSTGRES}")
message(STATUS "BUILD_BINGO_SQLSERVER=${BUILD_BINGO_SQLSERVER}")
message(STATUS "BUILD_BINGO_ORACLE=${BUILD_BINGO_ORACLE}")
message(STATUS "BUILD_BINGO_ELASTIC=${BUILD_BINGO_ELASTIC}")
# Set up compiler flags and other preparatory steps
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(setup)
# In subprojects we'll add dependencies for this pseudo-target to build all packages at once
if (BUILD_INDIGO OR BUILD_INDIGO_UTILS OR BUILD_BINGO_POSTGRES OR BUILD_BINGO_ORACLE OR BUILD_BINGO_SQLSERVER)
add_subdirectory(third_party)
add_subdirectory(core)
endif()
if (BUILD_INDIGO OR BUILD_INDIGO_WRAPPERS)
add_subdirectory(api)
endif()
if (BUILD_BINGO_POSTGRES OR BUILD_BINGO_ORACLE OR BUILD_BINGO_SQLSERVER OR BUILD_BINGO_ELASTIC)
add_subdirectory(bingo)
endif()
if (BUILD_INDIGO_UTILS)
add_subdirectory(utils)
endif()