-
Notifications
You must be signed in to change notification settings - Fork 15
/
CMakeLists.txt
64 lines (53 loc) · 2.67 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
project("Helios")
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "GLFW_BUILD_EXAMPLES" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "GLFW_BUILD_TESTS" FORCE)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "GLFW_BUILD_DOCS" FORCE)
set(GLFW_INSTALL OFF CACHE BOOL "GLFW_INSTALL" FORCE)
set(BUILD_ASSET_CORE_LOADER_LIBRARY ON CACHE BOOL "Build loader library")
set(BUILD_ASSET_CORE_EXPORTER_LIBRARY ON CACHE BOOL "Build exporter library")
set(BUILD_ASSET_CORE_IMPORTER_LIBRARY OFF CACHE BOOL "Build importer library")
set(BUILD_ASSET_CORE_TOOLS OFF CACHE BOOL "Build tools")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "BUILD_SHARED_LIBS")
set(ENABLE_CLANG_FORMAT OFF CACHE BOOL "Enable code formatting")
set(ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL "ASSIMP_BUILD_ASSIMP_TOOLS")
set(ASSIMP_BUILD_ASSIMP_VIEW OFF CACHE BOOL "ASSIMP_BUILD_ASSIMP_VIEW")
set(ASSIMP_BUILD_TESTS OFF CACHE BOOL "ASSIMP_BUILD_TESTS")
set(ASSIMP_INSTALL OFF CACHE BOOL "ASSIMP_INSTALL")
set(ASSIMP_INSTALL_PDB OFF CACHE BOOL "ASSIMP_INSTALL_PDB")
set(ASSIMP_NO_EXPORT ON CACHE BOOL "ASSIMP_NO_EXPORT")
IF(APPLE)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++17")
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
ENDIF()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
add_subdirectory(external/AssetCore)
add_subdirectory(external/glfw)
# External
set_target_properties(glfw PROPERTIES FOLDER external)
find_package(Vulkan REQUIRED)
set(HELIOS_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include")
set(GLFW_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/glfw/include")
set(GLM_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/AssetCore/external/glm/glm")
set(IMGUI_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/imgui")
set(VMA_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/VulkanMemoryAllocator/src")
set(NATIVEFILEDIALOG_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/nativefiledialog/src/include")
set(STB_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/stb/")
set(IMGUIZMO_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/ImGuizmo")
set(ICONFONTCPP_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/external/IconFontCppHeaders")
include_directories("${HELIOS_INCLUDE_DIRS}"
"${ASSET_CORE_INCLUDES}"
"${GLFW_INCLUDE_DIRS}"
"${GLM_INCLUDE_DIRS}"
"${IMGUI_INCLUDE_DIRS}"
"${VMA_INCLUDE_DIRS}"
"${Vulkan_INCLUDE_DIR}"
"${NATIVEFILEDIALOG_INCLUDE_DIRS}"
"${STB_INCLUDE_DIRS}"
"${IMGUIZMO_INCLUDE_DIRS}"
"${ICONFONTCPP_INCLUDE_DIRS}")
add_subdirectory(src/engine)
add_subdirectory(src/viewer)
add_subdirectory(src/editor)