-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
54 lines (46 loc) · 1.35 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
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 3.1.3)
project(hitnlls LANGUAGES CXX VERSION 2.1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -ffast-math")
set(CMAKE_BUILD_TYPE Release)
set(HITNLLS_HEADER_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/hitnlls)
file(GLOB SOURCES "${PROJECT_SOURCE_DIR}/*/*.cc")
add_library(${PROJECT_NAME} SHARED ${SOURCES})
install(
TARGETS ${PROJECT_NAME}
EXPORT hitnllsTargets
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
)
add_subdirectory(admm)
add_subdirectory(camera)
add_subdirectory(common)
add_subdirectory(geometry)
add_subdirectory(ils)
add_subdirectory(matrix)
add_subdirectory(type)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
hitnllsConfigVersion.cmake
VERSION ${PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion
)
install(
EXPORT hitnllsTargets
FILE hitnllsTargets.cmake
DESTINATION lib/cmake/${PROJECT_NAME}
)
configure_file(${PROJECT_SOURCE_DIR}/cmake/hitnllsConfig.cmake.in hitnllsConfig.cmake @ONLY)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/hitnllsConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/hitnllsConfigVersion.cmake"
DESTINATION lib/cmake/${PROJECT_NAME}
)
option(BUILD_TESTS "Build hitnlls tests." ON)
if(BUILD_TESTS)
enable_testing()
add_subdirectory(test)
add_test(
NAME RunHitNllsTest
COMMAND HitNllsTest
)
endif()