forked from Kazade/bounce-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (39 loc) · 1.42 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
# Bounce CMake script
# Author: Irlan Robson
# https://cmake.org/cmake
cmake_minimum_required(VERSION 3.8)
project(bounce VERSION 0.0.0)
set(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING "" FORCE)
set(BOUNCE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
set(BOUNCE_SRC_DIR "${CMAKE_SOURCE_DIR}/src")
set(BOUNCE_EXAMPLES_DIR "${CMAKE_SOURCE_DIR}/examples")
option(BOUNCE_BUILD_EXAMPLES "Build the Bounce examples" ON)
option(BOUNCE_BUILD_DOCS "Build the Bounce documentation" OFF)
option(BOUNCE_USER_SETTINGS "Override Bounce settings with user_settings.h" OFF)
option(BOUNCE_USE_DOUBLE "Use double or float floating point format" OFF)
if (BOUNCE_USER_SETTINGS)
add_compile_definitions(B3_USER_SETTINGS)
endif()
if (BOUNCE_USE_DOUBLE)
add_compile_definitions(B3_USE_DOUBLE)
endif()
add_subdirectory(src)
if (BOUNCE_BUILD_DOCS)
set(DOXYGEN_SKIP_DOT TRUE)
find_package(Doxygen)
if (DOXYGEN_FOUND)
add_subdirectory(doc)
endif()
endif()
if (BOUNCE_BUILD_EXAMPLES)
add_subdirectory(examples/hello_world)
add_subdirectory(external/glad)
add_subdirectory(external/glfw)
add_subdirectory(external/imgui)
add_subdirectory(examples/testbed)
# default startup project for Visual Studio
if (MSVC)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT testbed)
set_property(TARGET testbed PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/examples/testbed")
endif()
endif()