forked from vlarsson/radial_quadrifocal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
42 lines (32 loc) · 1.01 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)
project(rqt VERSION 0.0.1)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
set(CMAKE_CXX_STANDARD 17)
# Set variables
set(LIBRARY_NAME rqt)
set(LIBRARY_FOLDER rqt)
option(GENERATE_INSTALL "Whether to generate install/uninstall targets" OFF)
include(${PROJECT_SOURCE_DIR}/cmake/SetEnv.cmake)
option(ASAN_BUILD "Build with address sanitizer" OFF)
if (ASAN_BUILD)
add_compile_options("-fsanitize=address")
link_libraries("-fsanitize=address")
endif ()
# Eigen
find_package(Eigen3 REQUIRED)
find_package(Ceres REQUIRED)
include_directories(${CERES_INCLUDE_DIRS})
# Library sources
add_subdirectory(rqt)
# python bindings
add_subdirectory(pybind)
# Compilation options
if(MSVC)
target_compile_options(${LIBRARY_NAME} PRIVATE /bigobj /fp:fast)
elseif(APPLE)
target_compile_options(${LIBRARY_NAME} PRIVATE
-Wall -Wno-sign-compare -Wno-unused-variable -fPIC)
else()
target_compile_options(${LIBRARY_NAME} PRIVATE
-march=native -Wall -Wno-sign-compare -Wno-unused-variable -fPIC)
endif()