cmake_minimum_required(VERSION 3.22)

project(Phoenix)

set(PHOENIXCMAKE_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" CACHE PATH "Include path for cmake scripts otherwise the FindProjects.cmake don't work")

add_subdirectory(cmake)

set(PROJECT_VERSION "2.1.2") # this line is updated by semantic release using regex

phoenix_base_project("PhoenixCMake" "${PROJECT_VERSION}"
		"Set of function to simplify CMake use"
		"https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/PhoenixCMake")

phoenix_add_subdirectory(src)
phoenix_add_subdirectory(scripts)

# This variable is used in TESTS/CMakeLists.txt for generating a dummy test to test the install (this is the install path in the build dir)
set(PHOENIXCMAKE ${CMAKE_CURRENT_BINARY_DIR}/src/phoenix_cmake)

install(FILES FindPhoenixCMake.cmake DESTINATION share/cmake/Modules)

phoenix_tests()
