-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
35 lines (28 loc) · 1.06 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
# Set the minimum required version for CMake
cmake_minimum_required(VERSION 3.13)
project(Jarvis_3.0)
# Set Stadard Cmake variables
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE DEBUG)
# Set GLFW build variables to not build tests or examples
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(/home/pi/glfw /home/pi/glfw/src)
# Find source files
file(GLOB_RECURSE SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/*.cpp)
# Find header files
file(GLOB_RECURSE HEADER_FILES ${CMAKE_SOURCE_DIR}/inc/*.hpp)
# Add the exectuble to start jarvis
add_executable(jarvis.csj jarvis.cpp)
# Set directories to search for header files
include_directories(${CMAKE_SOURCE_DIR}/inc)
# OpenGL
find_package(OpenGL REQUIRED)
# GLM
#find_package(GLM REQUIRED)
#message(STATUS "GLM included at ${GLM_INCLUDE_DIR}")
# Add libraries
add_library(jar ${STADYN} ${SOURCE_FILES} ${HEADER_FILES})
target_link_libraries(jar glfw OpenGL::GL GLU glut)
target_link_libraries(jarvis.csj glfw OpenGL::GL GLU glut jar)