aux_source_directory(. SOURCESCODE)
include_directories(.)
add_library(kyrtinfo SHARED ${SOURCESCODE})
set_target_properties(kyrtinfo PROPERTIES VERSION 3.0.0 SOVERSION 3)
add_executable(kyrtinfo-test test/kyrtinfo-test.c)
add_executable(kyprocess-test test/kyprocess-test.c)
find_library(DBUS_LIB dbus-1)
target_link_libraries(kyrtinfo kylog ${DBUS_LIB})
target_link_libraries(kyrtinfo-test kyrtinfo) 
target_link_libraries(kyprocess-test kyrtinfo)
target_link_options(kyrtinfo PRIVATE "-Wl,-z,now")

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

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

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