-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
32 lines (24 loc) · 1.15 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
cmake_minimum_required(VERSION 3.11)
project(flut VERSION 0.1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(FLUT_OUTPUT_DIR "${CMAKE_BINARY_DIR}/bin" CACHE PATH "Location of build process output.")
set(FLUT_SHADERS_DIR "${CMAKE_SOURCE_DIR}/shaders" CACHE PATH "Location of the shaders folder.")
set(FLUT_SOURCE_DIR "${PROJECT_SOURCE_DIR}/src" CACHE PATH "Location of the source root folder.")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${FLUT_OUTPUT_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${FLUT_OUTPUT_DIR}")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${FLUT_OUTPUT_DIR}")
foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${CONFIG_TYPE} CONFIG_TYPE)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${FLUT_OUTPUT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${FLUT_OUTPUT_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_TYPE} ${FLUT_OUTPUT_DIR})
endforeach(CONFIG_TYPE CMAKE_CONFIGURATION_TYPES)
include(CheckIPOSupported)
check_ipo_supported(RESULT ENABLE_IPO)
if (ENABLE_IPO)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
endif()
find_package(OpenGL REQUIRED)
add_subdirectory(extern)
add_subdirectory(src)