-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
cmake_minimum_required(VERSION 3.16 FATAL_ERROR) | ||
|
||
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
option(BUILD_DOCS "Build the docs" ON) | ||
option(BUILD_TESTS "Build the tests" ON) | ||
option(KHAOS_BUILD_DOCS "Build the docs" ON) | ||
option(KHAOS_BUILD_TESTS "Build the tests" ON) | ||
|
||
if(BUILD_DOCS OR BUILD_TESTS) | ||
include(GetCMakeMM) | ||
cmmm(VERSION 2.3 REPOSITORY flagarde/CMakeMM) | ||
|
||
cmmm_modules_list(REPOSITORY flagarde/CMakeCM) | ||
if(KHAOS_BUILD_DOCS OR KHAOS_BUILD_TESTS) | ||
include(FetchContent) | ||
FetchContent_Declare(CMMM GIT_REPOSITORY "https://github.com/cmake-tools/cmmm.git" GIT_TAG "v1.0") | ||
FetchContent_MakeAvailable(CMMM) | ||
cmmm() | ||
cmmm_modules_list(URL "https://raw.githubusercontent.com/flagarde/CMakeCM/main/ModulesList.cmake") | ||
endif() | ||
|
||
project(Khaos VERSION 0.0.1.0 DESCRIPTION "A C/C++ library to simplify cross-platform programming" HOMEPAGE_URL "https://github.com/flagarde/Khaos" LANGUAGES C CXX) | ||
|
||
add_subdirectory(src) | ||
|
||
if(BUILD_DOCS) | ||
if(KHAOS_BUILD_DOCS) | ||
add_subdirectory(docs) | ||
endif() | ||
|
||
if(BUILD_TESTS) | ||
if(KHAOS_BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif() |