-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (24 loc) · 1.07 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
cmake_minimum_required (VERSION 3.16)
set(APPLICATION_NAME "Rasterizer")
set(BUILD_FOLDER "${CMAKE_SOURCE_DIR}/Build/Binaries")
set(THIRD_PARTY_DIR "${CMAKE_SOURCE_DIR}/ThirdParty")
set(THIRD_PARTY_BUILD_FOLDER "${BUILD_FOLDER}/ThirdParty")
set(GLAD_INCLUDE_DIR "${THIRD_PARTY_DIR}/glad/include")
set(GLFW_INCLUDE_DIR "${THIRD_PARTY_DIR}/GLFW/include")
set(IMGUI_INCLUDE_DIR "${THIRD_PARTY_DIR}/ImGui")
set(STBIMAGE_INCLUDE_DIR "${THIRD_PARTY_DIR}/stb_image/")
macro(EnableMultiProcessorCompilation TARGET_NAME)
if(MSVC)
target_compile_options(${TARGET_NAME} PUBLIC /MP)
endif(MSVC)
#TODO: support other compilers
endmacro()
project (${APPLICATION_NAME})
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${APPLICATION_NAME})
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
add_subdirectory("${THIRD_PARTY_DIR}/glad")
add_subdirectory("${THIRD_PARTY_DIR}/GLFW")
add_subdirectory("${THIRD_PARTY_DIR}/ImGui")
add_subdirectory("Core")
add_subdirectory(${APPLICATION_NAME})