add_executable(buildbox-run-oci
    buildboxrun_oci.cpp
    buildboxrun_oci.m.cpp
    buildboxrun_container_host.cpp
)
target_precompile_headers(buildbox-run-oci REUSE_FROM common)

find_package(nlohmann_json)

if (nlohmann_json_FOUND)
else()
  include(FetchContent)
  FetchContent_Declare(json
    GIT_REPOSITORY  https://github.com/ArthurSonzogni/nlohmann_json_cmake_fetchcontent.git
    GIT_TAG v3.7.3)
  FetchContent_MakeAvailable(json)
endif()

install(TARGETS buildbox-run-oci RUNTIME DESTINATION bin)
target_link_libraries(buildbox-run-oci PRIVATE common nlohmann_json::nlohmann_json)
target_include_directories(buildbox-run-oci PRIVATE ".")

include(CTest)
if(BUILD_TESTING)
  add_subdirectory(test)
endif()
