diff --git a/CMakeLists.txt b/CMakeLists.txt index ae730ca..0d18bb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,8 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/find) include(CMLibCommon) +option(BUILD_EXAMPLES "Build examples" OFF) + # Поиск библиотек с помощью pkgconfig find_package(PkgConfig) @@ -45,8 +47,10 @@ add_subdirectory(src/filesystem) add_subdirectory(src/log) # Примеры -add_subdirectory(examples/filesystem) -add_subdirectory(examples/log) +if (BUILD_EXAMPLES) + add_subdirectory(examples/filesystem) + add_subdirectory(examples/log) +endif() add_breathe_target( TARGET_NAME doc-breathe