add basic cmake install system
[android/external-libkmsxx.git] / kms++util / CMakeLists.txt
1 file(GLOB SRCS "src/*.cpp" "src/*.h")
2 file(GLOB PUB_HDRS "inc/kms++util/*.h")
3 add_library(kms++util ${SRCS} ${PUB_HDRS})
5 target_include_directories(kms++util PUBLIC
6     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
7     $<INSTALL_INTERFACE:include>
8     PRIVATE src)
10 target_link_libraries(kms++util kms++ pthread)
12 set_target_properties(kms++util PROPERTIES
13     PUBLIC_HEADER "${PUB_HDRS}")
15 install(TARGETS kms++util
16     LIBRARY DESTINATION lib
17     ARCHIVE DESTINATION lib
18     PUBLIC_HEADER DESTINATION include/kms++util)