summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/CMakeLists.txt12
-rw-r--r--src/kiro.pc.in10
3 files changed, 26 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f77f52..a8a426b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@ else()
set(LIB_INSTALL_DIR "lib")
endif()
-set(HEADER_INSTALL_DIR include/LIBKIRO)
+set(HEADER_INSTALL_DIR include/kiro)
add_subdirectory(src)
@@ -63,6 +63,9 @@ set(LIBKIRO_PKG_EXEC_PREFIX "${LIBKIRO_PKG_PREFIX}/bin")
set(LIBKIRO_PKG_LIBDIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
set(LIBKIRO_PKG_INCLUDEDIR "${LIBKIRO_PKG_PREFIX}/include")
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LIBKIRO.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/kiro.pc.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/kiro.pc" @ONLY IMMEDIATE)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kiro.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
include(CPack)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a657e1c..395767b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,2 +1,12 @@
-add_library(kiro kiro-trb.c kiro-client.c kiro-server.c)
+add_library(kiro SHARED kiro-trb.c kiro-client.c kiro-server.c)
+set_target_properties(kiro PROPERTIES
+ VERSION "${LIBKIRO_VERSION_MAJOR}.${LIBKIRO_VERSION_MINOR}"
+ SOVERSION ${LIBKIRO_VERSION_PATCH}
+)
target_link_libraries(kiro SDL m rdmacm ibverbs pthread)
+
+install(FILES kiro-rdma.h kiro-trb.h kiro-client.h kiro-server.h DESTINATION ${HEADER_INSTALL_DIR})
+
+install(TARGETS kiro
+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
+)
diff --git a/src/kiro.pc.in b/src/kiro.pc.in
new file mode 100644
index 0000000..51e6dd7
--- /dev/null
+++ b/src/kiro.pc.in
@@ -0,0 +1,10 @@
+prefix=@LIBKIRO_PKG_PREFIX@
+exec_prefix=@LIBKIRO_PKG_EXEC_PREFIX@
+libdir=@LIBKIRO_PKG_LIBDIR@
+includedir=@LIBKIRO_PKG_INCLUDEDIR@
+
+Name: @TARNAME@
+Description: @LIBKIRO_DESCRIPTION_SUMMARY@
+Version: @LIBKIRO_ABI_VERSION@
+Libs: -L${libdir} -lkiro
+Cflags: -I${includedir}