-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
65 lines (42 loc) · 1.51 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
cmake_minimum_required(VERSION 3.0)
project(projectSI)
#_______________________________________________________________find libraries
find_package(SDL2 REQUIRED)
if(${SDL2_FOUND})
message(STATUS "SDL2 found")
endif()
find_package(OpenGL REQUIRED)
if(${OpenGL_FOUND})
message(STATUS "OpenGL found")
endif()
find_package(GLEW REQUIRED)
if(${GLEW_FOUND})
message(STATUS "GLEW found")
endif()
find_package(Eigen3 REQUIRED)
if(${EIGEN3_FOUND})
message(STATUS "lib EIGEN3 found")
else()
include_directories("/usr/include/eigen3") # manually specify the include location
endif()
#_______________________________________________________________IMGUI
file(GLOB IMGUI_SOURCES third-party/include/imgui/*.cpp)
add_library(IMGUI STATIC ${IMGUI_SOURCES})
#_______________________________________________________________Include directories
include_directories(${SDL2_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
glimac/include
code/include
third-party/include)
set(ALL_LIBRARIES glimac ${SDL2_LIBRARIES} ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} ${EIGEN3_LIBRARIES} ${IMGUI_SOURCES})
#_______________________________________________________________sets
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake)
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )
add_subdirectory(glimac)
add_subdirectory(code)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
# call the CMakeLists.txt to make the documentation (Doxygen)
# > 'make html' to generate the documentation
add_subdirectory(doc)