-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
42 lines (31 loc) · 1.2 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
37
38
39
40
41
42
cmake_minimum_required(VERSION 3.10.2)
project(EvoVulkan)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(EVO_VULKAN_USE_OWN_GLFW "" ON)
#set(CMAKE_LEGACY_CYGWIN_WIN32 0)
add_subdirectory(Core)
if (EVO_VULKAN_USE_OWN_GLFW)
add_subdirectory(Depends/glfw)
endif()
add_subdirectory(Depends/stbi)
add_subdirectory(Depends/cmp_core)
add_executable(EvoVulkanTest main.cpp)
if (EVO_VULKAN_STATIC_LIBRARY)
if (EVO_VULKAN_USE_OWN_GLFW)
add_subdirectory(EvoVulkanTest glfw)
### TODO: build own glfw if it is not found
endif()
target_link_libraries(EvoVulkanTest EvoVulkanCore stbi CMP_Core)
target_include_directories(EvoVulkanTest PUBLIC Depends/inc)
target_include_directories(EvoVulkan PUBLIC Depends/cmp_core/source)
else()
target_link_libraries(EvoVulkanTest EvoVulkan::lib glfw stbi CMP_Core)
add_custom_command(TARGET EvoVulkanTest POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_BINARY_DIR}/Core/EvoVulkan.dll"
${CMAKE_BINARY_DIR})
target_include_directories(EvoVulkanTest PUBLIC Depends/inc)
target_include_directories(EvoVulkan PUBLIC Depends/cmp_core/source)
endif()