diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a7d14a..5defca0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ endif () cmake_minimum_required(VERSION 3.9 FATAL_ERROR) -project(Zycore VERSION 1.2.0.0 LANGUAGES C CXX) +project(Zycore VERSION 1.2.0.0 LANGUAGES C) include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -215,6 +215,19 @@ install(EXPORT "zycore-targets" DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/zycore") install(DIRECTORY "include/" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +# =============================================================================================== # +# Doxygen documentation # +# =============================================================================================== # +find_package(Doxygen) +if (DOXYGEN_FOUND) + doxygen_add_docs(doc "include/Zycore/" ALL) + install( + DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" + DESTINATION "${CMAKE_INSTALL_DOCDIR}/api" + COMPONENT Documentation + ) +endif() + # =============================================================================================== # # Developer mode # # =============================================================================================== # @@ -263,6 +276,7 @@ function (zyan_add_test test) endfunction () if (ZYCORE_BUILD_TESTS) + enable_language(CXX) enable_testing() zyan_add_test("String") zyan_add_test("Vector")