-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
51 lines (41 loc) · 1.41 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
project(carsim)
set(CMAKE_CXX_STANDARD 17)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTKMM gtkmm-3.0)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/autonomous/carsim/modules")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -DEIGEN_DONT_VECTORIZE")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -march=native -DEIGEN_DONT_VECTORIZE")
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(GLM REQUIRED)
find_package(ASSIMP REQUIRED)
find_package(EIGEN3 REQUIRED)
find_package(JPEG REQUIRED)
find_package(GUROBI REQUIRED)
include_directories(
.
${OPENGL_INCLUDE_DIRS}
${JPEG_INCLUDE_DIRS}
${GTKMM_INCLUDE_DIRS}
${GLEW_INCLUDE_DIRS}
${ASSIMP_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${GUROBI_INCLUDE_DIRS}
)
link_directories(
${GTKMM_LIBRARY_DIRS}
${ASSIMP_LIBRARY_DIRS}
${EIGEN3_LIBRARY_DIRS}
)
#This shouldn't be necessary, but the program won't compile without the extra source files...
file(GLOB_RECURSE GUROBI_SOURCE
"C:/gurobi810/win64/src/cpp/*.cpp")
add_executable(carsim main.cpp RgbImage.cpp GlModel.cpp Simulation.cpp Path.cpp OpenGlWrappers.cpp RaceWindow.cpp
${GUROBI_SOURCE})
target_link_libraries(carsim
${OPENGL_LIBRARIES}
${GTKMM_LIBRARIES}
${ASSIMP_LIBRARIES}
${EIGEN3_LIBRARIES}
${GLEW_LIBRARIES}
${GUROBI_LIBRARIES})