-
Notifications
You must be signed in to change notification settings - Fork 52
/
CMakeLists.txt
40 lines (32 loc) · 1.23 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.0.2)
project(limbo VERSION 2.1 DESCRIPTION "limbo LIbrary for Model-Based Optimization")
# Cpp standard
set(CMAKE_CXX_STANDARD 14)
# # Add library
# Interface because it's header only
add_library(limbo INTERFACE IMPORTED GLOBAL)
# Install
include(GNUInstallDirs)
# Install headers
install(DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}/src/limbo
${CMAKE_CURRENT_SOURCE_DIR}/src/external
${CMAKE_CURRENT_SOURCE_DIR}/src/hv
${CMAKE_CURRENT_SOURCE_DIR}/src/ehvi
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
# Export
include(CMakePackageConfigHelpers)
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
set(LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR})
configure_package_config_file(cmake/limboConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/limboConfig.cmake
INSTALL_DESTINATION ${LIB_INSTALL_DIR}/limbo/cmake
PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/limboConfigVersion.cmake
VERSION 0.0.0
COMPATIBILITY SameMajorVersion)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/limboConfig.cmake
${CMAKE_CURRENT_BINARY_DIR}/limboConfigVersion.cmake
DESTINATION ${LIB_INSTALL_DIR}/limbo/cmake )