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