aux_source_directory(. SOURCESCODE)
add_library(kytimer SHARED ${SOURCESCODE})
set_target_properties(kytimer PROPERTIES VERSION 3.0.1 SOVERSION 1)
target_link_options(kytimer PRIVATE "-Wl,-z,now")
add_executable(test-kytimer test/test-kytimer.c)
target_link_libraries(kytimer pthread)
target_link_libraries(test-kytimer kytimer)

# 安装库文件  
install(TARGETS kytimer 
        DESTINATION ${CMAKE_INSTALL_LIBDIR})

install(FILES
        libkytimer.h
        DESTINATION ${CMAKE_INSTALL_HEADER_DIR})
