#*******************************************************************************
#**  This file is part of Dux Rei Nummariae.                                 ***
#**                                                                          ***
#**  Copyright (C) 2017, 2018, 2019, 2020, 2021                              ***
#**  John Schneiderman <Licensing _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.13 FATAL_ERROR)
project(foundation
	VERSION ${DuxReiNummariae_VERSION}
	DESCRIPTION "Library for all generic functionality common to the majority of libraries."
	LANGUAGES CXX
)

find_package(pecunia REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core)

set(${PROJECT_NAME}_PUBLIC_DECLARATIONS
	external/${PROJECT_NAME}/CalendarTime.hpp
	external/${PROJECT_NAME}/EnumMacros.hpp
	external/${PROJECT_NAME}/Error.h
	external/${PROJECT_NAME}/ObserverPtr.hpp
	external/${PROJECT_NAME}/Optional.hpp
	external/${PROJECT_NAME}/PresentationText.h
	external/${PROJECT_NAME}/QtMemory.hpp
	external/${PROJECT_NAME}/ScopeExecutor.h
	external/${PROJECT_NAME}/Switch.h
	external/${PROJECT_NAME}/TypeIndexMap.hpp
)
set(${PROJECT_NAME}_PUBLIC_DEFINITIONS
	external/${PROJECT_NAME}/CalendarTime.hpp
	external/${PROJECT_NAME}/EnumMacros.hpp
	external/${PROJECT_NAME}/Error.cpp
	external/${PROJECT_NAME}/ObserverPtr.hpp
	external/${PROJECT_NAME}/Optional.hpp
	external/${PROJECT_NAME}/PresentationText.cpp
	external/${PROJECT_NAME}/QtMemory.hpp
	external/${PROJECT_NAME}/ScopeExecutor.cpp
	external/${PROJECT_NAME}/Switch.cpp
	external/${PROJECT_NAME}/TypeIndexMap.hpp
)
set(${PROJECT_NAME}_PRIVATE_DECLARATIONS
	""
)
set(${PROJECT_NAME}_PRIVATE_DEFINITIONS
	""
)

setUpProject(DynamicLibrary)

target_link_libraries(${PROJECT_NAME} PUBLIC pecunia)
target_link_libraries(${PROJECT_NAME} PUBLIC Qt5::Core)
