-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathCMakeLists.txt
85 lines (63 loc) · 2.7 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Copyright 2020-2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cmake_minimum_required(VERSION 3.13)
#-------------------------------------------------------------------------------
# Overall project settings
#-------------------------------------------------------------------------------
project(uVkCompute CXX C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(UVKC_SOURCE_ROOT ${PROJECT_SOURCE_DIR})
#-------------------------------------------------------------------------------
# CMake definitions
#-------------------------------------------------------------------------------
list(APPEND CMAKE_MODULE_PATH
${UVKC_SOURCE_ROOT}/cmake/
${UVKC_SOURCE_ROOT}/third_party/abseil-cpp/absl/copts/
)
include(AbseilConfigureCopts)
# By default Abseil strips string literals on mobile platforms, which means
# we cannot run binaries via command-line with proper options. Turn off
# the stripping.
if(ANDROID)
add_definitions(-DABSL_FLAGS_STRIP_NAMES=0)
endif()
include(uvkc_find_vulkan_toolchain)
include(uvkc_utils)
include(uvkc_cc_library)
include(uvkc_cc_binary)
include(uvkc_glsl_shader_instance)
include(uvkc_glsl_shader_permutation)
#-------------------------------------------------------------------------------
# Third-party dependencies
#-------------------------------------------------------------------------------
find_package(Python3 REQUIRED COMPONENTS Interpreter)
add_subdirectory(third_party)
#-------------------------------------------------------------------------------
# Core libraries
#-------------------------------------------------------------------------------
add_subdirectory(uvkc/base)
add_subdirectory(uvkc/android)
add_subdirectory(uvkc/benchmark)
add_subdirectory(uvkc/vulkan)
#-------------------------------------------------------------------------------
# Utility tools
#-------------------------------------------------------------------------------
add_subdirectory(tools)
#-------------------------------------------------------------------------------
# Benchmark binaries
#-------------------------------------------------------------------------------
add_subdirectory(benchmarks)