-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
63 lines (51 loc) · 1.81 KB
/
Copy pathCMakeLists.txt
File metadata and controls
63 lines (51 loc) · 1.81 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
cmake_minimum_required(VERSION 3.28)
project(piper)
if (SKBUILD AND NOT CMAKE_CI_BUILD)
execute_process(
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/setup_build.sh" "${CMAKE_BINARY_DIR}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
list(APPEND CMAKE_FIND_ROOT_PATH ${CMAKE_BINARY_DIR})
# CMAKE_FIND_ROOT_PATH re-rooting doesn't reach the binary dir on native
# Windows; a plain prefix does, on every platform.
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(flags)
enable_testing()
# Wheel builds (scikit-build-core sets SKBUILD) ship core + Python
# bindings only -- the editor and demos pull in ImGui/GLFW which the
# wheel has no use for.
if (SKBUILD)
set(BUILD_TESTS_DEFAULT OFF)
set(BUILD_PY_BINDINGS_DEFAULT ON)
set(BUILD_APP_DEFAULT OFF)
else()
set(BUILD_TESTS_DEFAULT ON)
set(BUILD_PY_BINDINGS_DEFAULT OFF)
set(BUILD_APP_DEFAULT ON)
endif()
option(BUILD_TESTS "Build tests" ${BUILD_TESTS_DEFAULT})
option(BUILD_PY_BINDINGS "Build Python bindings" ${BUILD_PY_BINDINGS_DEFAULT})
option(BUILD_APP "Build the editor app" ${BUILD_APP_DEFAULT})
option(BUILD_EXAMPLES "Build example binaries" ON)
add_subdirectory(core)
add_subdirectory(engine)
if (BUILD_EXAMPLES)
add_subdirectory(examples/filter_demo)
add_subdirectory(examples/am_radio)
add_subdirectory(examples/pid_demo)
endif()
if (BUILD_APP)
add_subdirectory(canvas)
add_subdirectory(vendor/imgui_backends)
add_subdirectory(vendor/implot)
add_subdirectory(app)
add_subdirectory(migrate)
add_subdirectory(examples/canvas_demo)
endif()
if (BUILD_PY_BINDINGS)
add_subdirectory(py_bindings)
endif()
if (BUILD_TESTS)
add_subdirectory(tests)
endif()