-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
41 lines (28 loc) · 934 Bytes
/
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
cmake_minimum_required(VERSION 3.15)
project(toy)
set(CMAKE_CXX_STANDARD 20)
# Set a suitable platform define.
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
set(VULKAN_PLATFORM_DEFINES VK_USE_PLATFORM_WIN32_KHR)
elseif(CMAKE_SYSTEM_NAME STREQUAL Linux)
set(VULKAN_PLATFORM_DEFINES VK_USE_PLATFORM_XLIB_KHR)
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(VULKAN_PLATFORM_DEFINES VK_USE_PLATFORM_MACOS_MVK)
endif()
set(WIN32_UNICODE_DEFINES _UNICODE UNICODE)
find_package(Vulkan REQUIRED)
find_package(volk CONFIG REQUIRED)
find_path(stb_INCLUDE_DIR stb_image.h DOC "Path to stb folder" REQUIRED)
find_package(glm REQUIRED)
find_package(pybind11 REQUIRED)
find_package(Lua REQUIRED)
find_package(sol2 REQUIRED)
# more warnings
if (MSVC)
add_compile_options(/W4) # /WX
add_compile_options(/wd4201)
add_compile_options(/MP)
else()
add_compile_options(-Wall -Wextra -pedantic) # /-Werror
endif()
add_subdirectory(toy)