-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
30 lines (25 loc) · 1.02 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
cmake_minimum_required (VERSION 3.2.2)
set(LEFTRIGHT_VERSION_MAJOR 1)
set(LEFTRIGHT_VERSION_MINOR 1)
set(LEFTRIGHT_VERSION_PATCH 3)
set(LEFTRIGHT_VERSION ${LEFTRIGHT_VERSION_MAJOR}.${LEFTRIGHT_VERSION_MINOR}.${LEFTRIGHT_VERSION_PATCH})
project(leftright VERSION ${LEFTRIGHT_VERSION} LANGUAGES CXX)
add_library(leftright INTERFACE)
target_include_directories(leftright INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
include(CTest)
add_subdirectory(test)
include(FindDoxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(
docs
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating doxygen project documentation in ${CMAKE_CURRENT_BINARY_DIR}." VERBATIM
)
else()
ADD_CUSTOM_TARGET(docs COMMENT "Doxygen not found. Please install doxygen to use this target." VERBATIM)
endif()