From a3590f0fc77bb2fdd59bc64fc316031c8cfa67f8 Mon Sep 17 00:00:00 2001 From: Joseph Walton-Rivers <joseph@walton-rivers.uk> Date: Sun, 19 Jun 2022 13:54:10 +0100 Subject: [PATCH] add new lines to gitingore --- .gitignore | 11 +++++------ CMakeLists.txt | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 8d5b73b..a0feae3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,16 @@ -build/ +# build files builds/ -cmake-build-debug/ -cmake-build-debug-coverage/ -cmake-build-debug-coverage-event-trace/ +cmake-build-* imgui.ini .flatpak-builder/ compile_commands.json -# dotfiles +# dotfiles (IDE) .idea/ .cache/ +.venv/ -# windows vs stuff +# windows visual studio .vs/ CMakePresets.json CMakeSettings.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f9ff2d..e9af9aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ set(namespace "fggl") set(CMAKE_CXX_STANDARD 20) option(FGGL_CONAN "Should we use conan to find missing dependencies?" OFF) +option(FGGL_EXAMPLES "Should we build examples or just the library" ON) +option(FGGL_DOCS "Should we build documentation?" ON) + set(CONAN_BUILD_TYPE "Debug") # Define the project @@ -22,11 +25,13 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) include(CTest) # Documentation support - find_package(Doxygen) - if (Doxygen_FOUND) - add_subdirectory( docs ) - else() - message(STATUS "Doxygen not found, not building docs") + if (FGGL_DOCS) + find_package(Doxygen) + if (Doxygen_FOUND) + add_subdirectory( docs ) + else() + message(STATUS "Doxygen not found, not building docs") + endif() endif() endif() @@ -54,7 +59,9 @@ target_compile_options( ${PROJECT_NAME} PRIVATE -Wall -fno-strict-aliasing -fno- # extras #add_subdirectory(tests) -add_subdirectory(demo) +if (FGGL_EXAMPLES) + add_subdirectory(demo) +endif() ## # INSTALL PHASE -- GitLab