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

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

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

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