-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
41 lines (32 loc) · 1.09 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
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
# set the project name
project(SLAMSim)
include_directories(
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/lib
)
# IF WINDOWS LINK TO SFML THROUGH STATIC LIBRARY
if (WIN32)
include_directories(${PROJECT_SOURCE_DIR}/SFML/include)
link_directories(${PROJECT_SOURCE_DIR}/SFML/lib)
endif (WIN32)
file(GLOB all_SRCS
"${PROJECT_SOURCE_DIR}/include/*.h"
"${PROJECT_SOURCE_DIR}/include/*.hpp"
"${PROJECT_SOURCE_DIR}/src/*.cpp"
"${PROJECT_SOURCE_DIR}/src/*.c"
)
add_executable(SLAMSim ${all_SRCS})
if (UNIX)
if (APPLE)
file(GLOB LIBRARIES "${PROJECT_SOURCE_DIR}/lib/SFML_dylib/*.dylib")
target_link_libraries(SLAMSim ${LIBRARIES})
else ()
file(GLOB LIBRARIES "${PROJECT_SOURCE_DIR}/lib/SFML_so/*.so")
target_link_libraries(SLAMSim ${LIBRARIES})
endif ()
endif (UNIX)