Plugin to add Pijul support to the Nix package manager
add_library(pijul MODULE)
add_library(PijulTesting STATIC)

set(SRC
        compat.cpp
        compat.h
        fetcher.cpp
        repo.cpp
        repo.h)

target_sources(pijul PRIVATE ${SRC})

target_sources(PijulTesting PRIVATE ${SRC})
target_include_directories(PijulTesting PUBLIC ${CMAKE_CURRENT_LIST_DIR})
target_compile_options(PijulTesting PUBLIC -O1 -ggdb)
target_link_libraries(PijulTesting PRIVATE date::date)

target_link_libraries(pijul
        PUBLIC
        PkgConfig::Nix)

install(TARGETS pijul DESTINATION ${CMAKE_INSTALL_LIBDIR}/nix/plugins)