cmake_minimum_required(VERSION 3.22)
project(Phoenix)

find_package(PhoenixCMake REQUIRED)

set(PROJECT_VERSION "2.2.0") # this line is updated by semantic release using regex
phoenix_base_project("PhoenixStatsMonitoring" "${PROJECT_VERSION}"
		"Library to ease communication between daemons"
		"https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixStatsMonitoring.git")

pull_extra_module("PhoenixCore" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/system/PhoenixCore.git")
pull_extra_module("PhoenixDataStream" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/serialize-io/PhoenixDataStream.git")
pull_extra_module("PhoenixTypeStream" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/serialize-io/PhoenixTypeStream.git")

phoenix_include_directories(
	${CMAKE_CURRENT_SOURCE_DIR}
	${CMAKE_CURRENT_BINARY_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}/src
)

phoenix_create_find(PhoenixStatsMonitoring phoenix_stats_monitoring phoenix_stats_monitoring.h "" PhoenixCore PhoenixDataStream PhoenixTypeStream)

set(PHOENIXSTATSMONITORING_TEST_DEPENDENCIES
	phoenix_stats_monitoring
	${PHOENIXDATASTREAM}
	${PHOENIXTYPESTREAM}
	${PHOENIXCORE}
)

phoenix_add_subdirectory(src)

phoenix_tests()
