-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (28 loc) · 1.12 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
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR
"CMake generation is not allowed within the source directory!"
"\n Remove \"${CMAKE_SOURCE_DIR}/CMakeLists.txt\" and try again from another folder, e.g.:"
"\n "
"\n rm -rf CMakeCache.txt CMakeFiles"
"\n mkdir build"
"\n cd build"
"\n cmake .."
)
endif ()
cmake_minimum_required(VERSION 3.13)
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(INFO "CMake build type not specified. Defaulting to Debug")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose Release or Debug" FORCE)
endif ()
project(Render3D VERSION 0.0.1 DESCRIPTION "A lua 3d simulation engine.")
set(CMAKE_CXX_STANDARD_REQUIRED 17)
set(CMAKE_CXX_STANDARD 17)
find_package(Vulkan)
# if Vulkan not found prompt the user to install it
if (NOT Vulkan_FOUND)
message(FATAL_ERROR "Please install Vulkan SDK. https://vulkan.lunarg.com/sdk/home")
endif ()
add_subdirectory(Vendor)
add_subdirectory(Source)
enable_testing()
add_subdirectory(Tests)