-
Notifications
You must be signed in to change notification settings - Fork 24
/
CMakeLists.txt
46 lines (39 loc) · 986 Bytes
/
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
#
# C++ wrappers for C-based HTTP parser library.
#
cmake_minimum_required(VERSION 2.6)
if(CMAKE_VERSION VERSION_LESS 3.0)
project(httpxx)
else()
cmake_policy(SET CMP0048 NEW)
project(httpxx VERSION 0.1.0)
endif()
# Compile API documentation from source code.
function(add_api_documentation target)
if(DOXYGEN_EXECUTABLE)
add_custom_target(
${target}
COMMAND
${DOXYGEN_EXECUTABLE}
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}
COMMENT
"Compiling documentation."
VERBATIM
)
endif()
endfunction()
enable_testing()
# Resolve include directives as if installed on the system.
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
# Build the primary target.
add_subdirectory(httpxx)
# Build API documentation.
find_package(Doxygen QUIET)
if(DOXYGEN_FOUND)
configure_file(
${PROJECT_SOURCE_DIR}/help/Doxyfile
${PROJECT_BINARY_DIR}/Doxyfile @ONLY)
add_api_documentation(doc)
endif()
add_subdirectory(test)