-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
21 lines (21 loc) · 988 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cmake_minimum_required(VERSION 3.10)
project(basic-voxel-engine)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
set(BVE_STANDALONE ON)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(Vulkan REQUIRED)
find_package(mono REQUIRED)
option(BVE_BUILD_EXECUTABLE "Build basic-voxel-engine as an executable" ${BVE_STANDALONE})
option(BVE_BUILD_MANAGED_CODE "Build managed BVE code" ${BVE_STANDALONE})
option(BVE_BUFFER_TRACE "Trace allocating, copying, and freeing of memory buffers" OFF)
set(GRAPHICS_API_DEFUALT "VULKAN")
# todo: check for platforms like macos and windows and set GRAPHICS_API_DEFAULT to their respective graphics apis
set(BVE_GRAPHICS_API ${GRAPHICS_API_DEFUALT} CACHE STRING "Rendering API to use")
set(BVE_TARGET_NAME "basic-voxel-engine")
add_subdirectory("vendor")
add_subdirectory("src")
if(BVE_BUILD_MANAGED_CODE)
include("managed.cmake")
endif()