1 # This file is part of the CmDab Project.
3 # Copyright (c) 2021 Vollstrecker (werner@vollstreckernet.de)
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License Version 3as published by
7 # the Free Software Foundation; of the License
10 # You should have received a copy of the GNU General Public License
11 # along with this program; if not, check
12 # https://github.com/Vollstrecker/CmDaB/blob/main/LICENSE
14 #[=======================================================================[.rst:
25 This module adds an option called DOWNLOAD_AND_BUILD_DEPS to your project.
26 If this option is activated by the user, this module will download and
27 include the main project files to be used within your project.
29 #]=======================================================================]
31 include (CMakeDependentOption)
34 cmake_dependent_option (DOWNLOAD_AND_BUILD_DEPS "Get all missing stuff" OFF ${Git_FOUND} OFF)
36 if (DOWNLOAD_AND_BUILD_DEPS)
37 include (FetchContent)
39 FetchContent_Declare (
41 GIT_REPOSITORY https://github.com/Vollstrecker/CmDaB.git
45 FetchContent_GetProperties(CmDaB)
47 if (NOT CmDaB_cmdab_POPULATED)
48 FetchContent_MakeAvailable (CmDaB)