-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathCMakeLists.txt
33 lines (24 loc) · 1.02 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
cmake_minimum_required(VERSION 2.8)
project(Svar)
include(cmake/PICMake.cmake)
set(CMAKE_CXX_STANDARD 11)
option(BUILD_PYTHON "build svarpy module to support call python from c++" OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
pi_git_hash(GIT_VERSION)
add_definitions(-DBUILD_VERSION=\"${GIT_VERSION}\")
include_directories(src src/Svar src/svar/GSLAM/core)
pi_add_target(svar BIN src/svar REQUIRED System LTO)
pi_add_target(svar_cbor SHARED src/modules/svar_cbor REQUIRED System LTO)
pi_add_target(sample_module SHARED src/modules/sample_module REQUIRED System LTO)
if(BUILD_PYTHON)
pi_add_target(svarpy SHARED src/python/svarpy/src REQUIRED Python System LTO)
endif()
pi_report_targets()
pi_install(TARGETS svar sample_module svar_cbor svarpy HEADERS src/Svar CMAKE "${PROJECT_SOURCE_DIR}/cmake/FindSvar.cmake.in")
#####################################################################
# Add Tab Completion Support
if(UNIX)
install(SCRIPT ${CMAKE_CURRENT_LIST_DIR}/cmake/tab_completion.cmake)
endif()