cmake_minimum_required(VERSION 3.22)
project(Phoenix)

find_package(PhoenixCMake REQUIRED)

set(TEST_SWARM_EXAMPLE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/TESTS)
set(PROJECT_VERSION "1.0.2") # 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("PhoenixClock" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/clock/PhoenixClock.git")
pull_extra_module("PhoenixSocket" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixSocket.git")
pull_extra_module("PhoenixZMQ" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixZMQ.git")
pull_extra_module("PhoenixSwarm" "https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/network/PhoenixSwarm.git")

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

phoenix_create_find(PhoenixStatsMonitoring phoenix_stats_monitoring.h "phoenix_stats_monitoring" "" PhoenixCore PhoenixZMQ PhoenixClock PhoenixSocket)

set(PHOENIXSTATS_MONITORING_TEST_DEPENDENCIES
	phoenix_stats_monitoring
	${PHOENIXSWARM}
	${PHOENIXZMQ}
	${PHOENIXSOCKET}
	${PHOENIXCLOCK}
	${PHOENIXCORE}
)

phoenix_add_subdirectory(src)
phoenix_add_subdirectory(program)

phoenix_tests()
