include(FindPkgConfig)
pkg_check_modules(CURL REQUIRED libcurl)
include_directories(${CURL_INCLUDE_DIRS})

pkg_check_modules(SOUP REQUIRED libsoup-3.0)
include_directories(${SOUP_INCLUDE_DIRS})

add_library(kyuri SHARED libkyuri.c)
set_target_properties(kyuri PROPERTIES VERSION 3.0.0 SOVERSION 3)
add_executable(kyuri-test test/kyuri-test.c)
target_link_libraries(kyuri kylog ${CURL_LIBRARIES} ${SOUP_LIBRARIES})
target_link_libraries(kyuri-test kyuri)

# 包含 GNU 安装目录设置  
include(GNUInstallDirs)

# 安装库文件  
install(TARGETS kyuri
        DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(FILES libkyuri.h
        DESTINATION include/kysdk/kysdk-system)