Add cmake configuration.

This commit is contained in:
Kyle Isom 2023-10-09 16:37:02 -07:00
parent 87fe9719c1
commit 11eeafac16
2 changed files with 13 additions and 2 deletions

View File

@ -14,11 +14,20 @@ else()
endif()
add_compile_options("-DDESKTOP_BUILD")
set(HEADER_FILES
Arena.h
Buffer.h
Dictionary.h
TLV.h)
add_library(klib STATIC
Arena.cc
Buffer.cc
TLV.cc
Dictionary.cc)
Dictionary.cc
TLV.cc)
install(TARGETS klib LIBRARY DESTINATION ${PREFIX}/lib)
install(FILES ${HEADER_FILES} DESTINATION include/klib)
install(FILES klibConfig.cmake DESTINATION share/klib/cmake)
add_executable(tlv_test tlvTest.cc)
target_link_libraries(tlv_test klib)

2
klibConfig.cmake Normal file
View File

@ -0,0 +1,2 @@
set(KLIB_INCLUDE_DIRS include/klib)
set(KLIB_LIBRARIES libklib.a)