-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
38 lines (30 loc) · 1.21 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
cmake_minimum_required(VERSION 2.4)
project(Util--)
SET(PROJECT_VERSION 1.1)
SET(API_VERSION 1)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
FIND_PACKAGE(Boost COMPONENTS unit_test_framework)
FIND_PACKAGE(Boost REQUIRED graph filesystem thread regex system)
include_directories(${CMAKE_BINARY_DIR}) # to get cmake-generated utilmm/config/config.h
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${Boost_INCLUDE_DIR})
add_subdirectory (src)
INCLUDE(TestBigEndian)
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
CONFIGURE_FILE(utilmm/config/config.h.in utilmm/config/config.h)
CONFIGURE_FILE(utilmm.pc.in utilmm.pc @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/utilmm.pc
DESTINATION lib/pkgconfig)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/utilmm/config/config.h
DESTINATION include/utilmm/config)
INSTALL(DIRECTORY utilmm/ DESTINATION include/utilmm
PATTERN "*.in" EXCLUDE)
INSTALL(FILES package.xml DESTINATION share/utilmm)
set(ENABLE_TESTS ${Boost_UNIT_TEST_FRAMEWORK_FOUND}
CACHE BOOL "if tests should be built")
IF (ENABLE_TESTS)
enable_testing()
MESSAGE(STATUS "boost/test found ... building test suite")
ADD_SUBDIRECTORY(test)
ENDIF(ENABLE_TESTS)
INCLUDE(GenerateDoxygenDoc)