find_package(json-c REQUIRED)

add_library(nginxfiler SHARED filer.cpp)

add_dependencies(nginxfiler blogidev)

if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
    target_link_libraries(nginxfiler PUBLIC kernel32.lib blogidev json-c::json-c uuidp::uuidp )
else()
    target_link_libraries(nginxfiler PUBLIC dl blogidev json-c::json-c uuidp::uuidp)
endif()

install (TARGETS nginxfiler  DESTINATION lib/blogi/plugins)
