From 11eeafac16e31a1217ac10f8a2a6d5c471e85355 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Mon, 9 Oct 2023 16:37:02 -0700 Subject: [PATCH] Add cmake configuration. --- CMakeLists.txt | 13 +++++++++++-- klibConfig.cmake | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 klibConfig.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index aea49dc..3d29777 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/klibConfig.cmake b/klibConfig.cmake new file mode 100644 index 0000000..e44d01f --- /dev/null +++ b/klibConfig.cmake @@ -0,0 +1,2 @@ +set(KLIB_INCLUDE_DIRS include/klib) +set(KLIB_LIBRARIES libklib.a) \ No newline at end of file