cmake_minimum_required(VERSION 3.31)
project(xpcg C)

find_package(FX REQUIRED COMPONENTS
	fx.runtime fx.collections fx.cmdline fx.serial fx.io fx.term)

file(GLOB sources
	*.c *.h
	backend/c-mpc/*.c backend/c-mpc/*.h)

add_executable(xpcg ${sources})

target_link_libraries(xpcg FX::Runtime FX::Collections FX::Cmdline FX::Io)
install(TARGETS xpcg)

set_target_properties(
    xpcg
    PROPERTIES
    INSTALL_RPATH
    "${CMAKE_INSTALL_RPATH};${CMAKE_INSTALL_PREFIX}/lib")
