find_library(GLIBC_LIB glib-2.0)
include_directories("/usr/include/glib-2.0")
add_library(kylocation SHARED libkylocation.c)
set_target_properties(kylocation PROPERTIES VERSION 3.0.0 SOVERSION 3)
target_link_libraries(kylocation -lglib-2.0 -lgio-2.0)
add_executable(kylocation-test test/kylocation-test.c)
target_link_libraries(kylocation-test kylocation)
target_link_options(kylocation PRIVATE "-Wl,-z,now")

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

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

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