forked from xiconxi/QGF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
46 lines (39 loc) · 1.37 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
find_package(Doxygen)
if(DOXYGEN_FOUND STREQUAL "NO")
message(STATUS "Doxygen not found. Please get a copy http://www.doxygen.org")
else()
if("${DOXYGEN_VERSION}" VERSION_LESS 1.8.3.1)
message(
STATUS "Doxygen version too old. Please get a copy http://www.doxygen.org"
)
endif()
# prepare doxygen configuration file
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
# add doxygen as custom target
add_custom_target(
doxygen
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
# POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/fonts"
"${CMAKE_CURRENT_BINARY_DIR}/html/fonts")
# add docs as custom target
add_custom_target(
docs
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
# POST_BUILD
COMMAND
${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/fonts"
"${CMAKE_CURRENT_BINARY_DIR}/html/fonts"
COMMAND jekyll build -s "${CMAKE_CURRENT_SOURCE_DIR}/jekyll/" -d
"${CMAKE_CURRENT_BINARY_DIR}/jekyll/"
COMMAND
${CMAKE_COMMAND} -E copy_directory "${CMAKE_CURRENT_BINARY_DIR}/jekyll/"
"${CMAKE_CURRENT_BINARY_DIR}/html/")
# cleanup $build/html on "make clean"
set_property(
DIRECTORY
APPEND
PROPERTY ADDITIONAL_MAKE_CLEAN_FILES html)
endif()