aux_source_directory(. CODE)
add_library(kynetinfo SHARED libkynetinfo.c)
set_target_properties(kynetinfo PROPERTIES VERSION 3.0.0 SOVERSION 3)

find_library(DBUS_LIB dbus-1)
target_link_libraries(kynetinfo kylog ${DBUS_LIB})
target_link_options(kynetinfo PRIVATE "-Wl,-z,now")

add_executable(kynet-test test/kynet-test.c)
target_link_libraries(kynet-test kynetinfo)

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

# 安装库文件  
install(TARGETS kynetinfo
        DESTINATION ${CMAKE_INSTALL_LIBDIR})
# install(TARGETS kynetinfo
#         DESTINATION lib/kysdk/kysdk-system)

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

add_subdirectory(dbus)
