-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
52 lines (39 loc) · 1.79 KB
/
Copy pathCMakeLists.txt
File metadata and controls
52 lines (39 loc) · 1.79 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
## Copyright (c) 2026 BRL-CAD Visualizer contributors
## SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.20)
project(IBRT VERSION 0.1.0 LANGUAGES C CXX)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INSTALL_MESSAGE LAZY)
include(GNUInstallDirs)
include(CTest)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Normalize the build type and MSVC runtime so Debug/Release IBRT builds
# stay ABI-compatible with the matching BRL-CAD/bext trees. Must run after
# project() (needs MSVC / GENERATOR_IS_MULTI_CONFIG) and before any targets.
include(IBRTBuildTypes)
ibrt_setup_build_types()
set(IBRT_RENDER_WORKER_DEFAULT OFF)
if(WIN32 OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(IBRT_RENDER_WORKER_DEFAULT ON)
endif()
option(IBRT_BUILD_VIEWER "Build the IBRT desktop viewer" ON)
option(IBRT_BUILD_PLUGIN_BRL_CAD "Build the BRL-CAD OSPRay plugin" ON)
option(IBRT_BUILD_TESTS "Build the IBRT test suite" ${BUILD_TESTING})
option(IBRT_ENABLE_RENDER_WORKER "Build the out-of-process render worker" ${IBRT_RENDER_WORKER_DEFAULT})
set(BEXT_INSTALL_DIR "" CACHE PATH
"Path to the bext install tree that provides OSPRay, Qt, and related dependencies")
set(BRLCAD_EXT_DIR "" CACHE PATH
"Path to the bext build directory (contains install/ and noinstall/); an alternative to BEXT_INSTALL_DIR, which is then BRLCAD_EXT_DIR/install")
set(BRLCAD_PREFIX "" CACHE PATH "Path to the BRL-CAD install prefix")
include(IBRTDependencies)
ibrt_configure_dependencies()
add_subdirectory(plugins)
add_subdirectory(apps)