forked from RenderKit/ospray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
71 lines (50 loc) · 1.67 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
## Copyright 2009 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.1)
##############################################################
# Language setup
##############################################################
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
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)
##############################################################
# Establish project
##############################################################
include(cmake/ospray_version.cmake)
project(OSPRay VERSION ${OSPRAY_VERSION} LANGUAGES C CXX)
##############################################################
# CMake modules and macro files
##############################################################
list(APPEND CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake
${PROJECT_SOURCE_DIR}/cmake/compiler
)
include(ospray_macros)
include(ospray_options)
include(package)
if (OSPRAY_INSTALL_DEPENDENCIES)
include(ospray_redistribute_deps)
endif()
##############################################################
# Add library and executable targets
##############################################################
## Main OSPRay library ##
add_subdirectory(ospray)
## Modules ##
add_subdirectory(modules)
## OSPRay sample apps ##
add_subdirectory(apps)
## Regression test images target ##
add_subdirectory(test_image_data)
## Clang-format target ##
if (OSPRAY_ENABLE_TARGET_CLANGFORMAT)
include(clang-format)
endif()
# Must be last
include(CPack)