Doxyfile.in: make doc generation work
[contrib/upm.git] / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.8)
2 project (upm)
3
4 find_package (SWIG)
5 if (SWIG_FOUND)
6   include (${SWIG_USE_FILE})
7 endif ()
8
9 find_package (Threads REQUIRED)
10 find_package (PkgConfig REQUIRED)
11 # force the libmaa version to be the required version
12 pkg_check_modules (MAA REQUIRED maa>=0.2.6)
13 message (INFO " found libmaa version: ${MAA_VERSION}")
14
15 set (CMAKE_SWIG_FLAGS "")
16
17 # add a target to generate API documentation with Doxygen
18 find_package (Doxygen)
19 if (DOXYGEN_FOUND)
20   configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
21   add_custom_target (doc
22     ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
23     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
24     COMMENT "Generating API documentation with Doxygen" VERBATIM
25   )
26 endif (DOXYGEN_FOUND)
27
28 include(CPack)
29 add_subdirectory (src)
30 add_subdirectory (examples)