-
Notifications
You must be signed in to change notification settings - Fork 64
/
CMakeLists.txt
40 lines (31 loc) · 1.08 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
cmake_minimum_required(VERSION 3.10)
project(Wheel-INS)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE RELEASE)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_definitions( -D_USE_MATH_DEFINES=True)
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
else()
set(CMAKE_CXX_FLAGS "-Wno-unused-result")
endif()
file(GLOB_RECURSE SOURCE
src/main.cpp
src/fileio/fileloader.cpp
src/fileio/filesaver.cpp
src/wheel_ins/wheelins.cpp
src/wheel_ins/insmech.cpp)
include_directories(${PROJECT_SOURCE_DIR}/src)
add_executable(${PROJECT_NAME} ${SOURCE})
# Eigen3
include_directories(ThirdParty/eigen-3.3.9)
# yaml-cpp-0.7.0
add_subdirectory(ThirdParty/yaml-cpp-0.7.0)
target_link_libraries(${PROJECT_NAME} yaml-cpp)
set(ABSL_PROPAGATE_CXX_STD true)
add_subdirectory(ThirdParty/abseil-cpp-20220623.1)
target_link_libraries(${PROJECT_NAME}
absl::strings
absl::str_format)