-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
38 lines (26 loc) · 982 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
cmake_minimum_required(VERSION 3.6)
PROJECT(Basalt)
# For Platform
if(NOT PLATFORM)
if(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(PLATFORM 64)
else()
set(PLATFORM 32)
endif()
endif()
# For Libraries
find_package(Threads REQUIRED)
find_package(Vulkan REQUIRED)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
# For Sources
file(GLOB_RECURSE header RELATIVE ${CMAKE_SOURCE_DIR} "src/*.h")
file(GLOB_RECURSE engineheader RELATIVE ${CMAKE_SOURCE_DIR} "Engine/*.h")
file(GLOB_RECURSE src RELATIVE ${CMAKE_SOURCE_DIR} "src/*.cpp")
file(GLOB_RECURSE enginesrc RELATIVE ${CMAKE_SOURCE_DIR} "Engine/*.cpp")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
add_executable(Basalt ${src} ${header} ${engineheader} ${enginesrc})
target_include_directories(Basalt PUBLIC "Engine/")
# For Linking
target_link_libraries(Basalt ${CONAN_LIBS} Vulkan::Vulkan Threads::Threads )
target_compile_features(Basalt PRIVATE cxx_std_20)