-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
62 lines (49 loc) · 1.5 KB
/
CMakeLists.txt
File metadata and controls
62 lines (49 loc) · 1.5 KB
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
# @file CMakeLists.txt
# @author Matthew Green
# @date 2023-11-30 13:49:39
#
# @section LICENSE
#
# Copyright (c) 2023 Matthew Green - All rights reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential
cmake_minimum_required(VERSION 3.10)
project(velecs)
# Set the C++ standard for the velecs project
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Vulkan REQUIRED)
add_subdirectory(libs)
add_subdirectory(assets)
file(GLOB_RECURSE VELECS_SOURCES "src/*.cpp")
file(GLOB_RECURSE VELECS_HEADERS "include/*.h")
add_library(velecs ${VELECS_SOURCES} ${VELECS_HEADERS})
target_include_directories(velecs PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_precompile_headers(velecs PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include/velecs/pch.h")
# Get the absolute path to the root of your project
get_filename_component(ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE)
target_link_libraries(velecs
Vulkan::Vulkan
SDL2
SDL2main
glm
vma
assimp
flecs::flecs_static
imgui
stb
vk-bootstrap
)
# Add dependencies on custom asset targets
add_dependencies(velecs velecs-assets)
# Use source_group with TREE to mirror directory structure
source_group(
TREE "${ROOT_DIR}/include/velecs"
PREFIX "Header Files"
FILES ${VELECS_HEADERS}
)
source_group(
TREE "${ROOT_DIR}/src/velecs"
PREFIX "Source Files"
FILES ${VELECS_SOURCES}
)