#*******************************************************************************
#**  This file is part of Dux Rei Nummariae.                                 ***
#**                                                                          ***
#**  Copyright (C) 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024            ***
#**  John Schneiderman <Licencing _AT_ Schneiderman _DOT_ me>                ***
#**                                                                          ***
#**  This program is free software: you can redistribute it and/or modify it ***
#**  under the terms of the GNU Affero General Public License as published   ***
#**  by the Free Software Foundation, either version 3 of the License, or    ***
#**  (at your option) any later version.                                     ***
#**                                                                          ***
#**  This program is distributed in the hope that it will be useful, but     ***
#**  WITHOUT ANY WARRANTY; without even the implied warranty of              ***
#**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    ***
#**  See the GNU Affero General Public License for more details.             ***
#**                                                                          ***
#**  You should have received a copy of the GNU Affero General Public License***
#**  along with this program. If not, see <http://www.gnu.org/licenses/>.    ***
#*******************************************************************************
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)

configure_file(
		"${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
		"${PROJECT_BINARY_DIR}/drn/config.h"
)
install(
		FILES "${PROJECT_BINARY_DIR}/drn/config.h"
		DESTINATION include/drn
		COMPONENT Devel
)

if (NOT TARGET uninstall)
	configure_file(
			"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
			"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
			IMMEDIATE @ONLY
	)

	add_custom_target(
			uninstall
			COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
	)
endif ()

include(ProjectSetUp.cmake)

add_subdirectory(accounting)
add_subdirectory(adviser)
add_subdirectory(banking)
add_subdirectory(budgeting)
add_subdirectory(conversion)
add_subdirectory(desktop)
add_subdirectory(desktop-ui)
add_subdirectory(file-storage)
add_subdirectory(foundation)
add_subdirectory(navigation)
add_subdirectory(network)
add_subdirectory(storage)
add_subdirectory(surveying)
