aux_source_directory(. CODE)

add_library(kysensors SHARED ${CODE})

set_target_properties(kysensors  PROPERTIES VERSION 3.0.0 SOVERSION 3)

add_executable(kysensors-test test/kysensors-test.c)
target_link_libraries(kysensors sensors kylog)
target_link_libraries(kysensors-test kysensors)

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

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

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