-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
47 lines (35 loc) · 1.28 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
cmake_minimum_required(VERSION 2.6)
project(HST)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(AddFileDependencies)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror")
# Find required libraries and programs.
message(STATUS "Looking for pandoc")
find_program(PANDOC pandoc)
if(NOT PANDOC)
message(FATAL_ERROR "Cannot find pandoc")
endif(NOT PANDOC)
message(STATUS "Looking for libjudy")
find_package(Judy REQUIRED)
include_directories(${JUDY_INCLUDE_DIR})
message(STATUS "Looking for bison")
find_package(Bison REQUIRED)
set(BISON_PREFIX_OUTPUTS TRUE)
set(BISON_GENERATE_DEFINES TRUE)
message(STATUS "Looking for Boost")
find_package(Boost)
include_directories(${Boost_INCLUDE_DIRS})
# The judyhash library is currently included directly in the source
# tree. That means we're responsible for installing it — plus, we
# should also make sure that it's in the include path.
add_subdirectory(libs/judyhash/src_lib)
set(JUDYHASH_DIR ${HST_SOURCE_DIR}/libs/judyhash)
include_directories(${JUDYHASH_DIR}/src_lib)
# Include the rules for building and installing our code targets.
include_directories(${HST_SOURCE_DIR}/include)
link_directories(${HST_BINARY_DIR}/src)
enable_testing()
add_subdirectory(include/hst)
add_subdirectory(src)
add_subdirectory(doc)
add_subdirectory(tests)