summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@iki.fi>2020-03-04 19:50:58 +0200
committerGitHub <noreply@github.com>2020-03-04 19:50:58 +0200
commitcff8b2fd797537e36d5e16c1ac8e3303321e50b2 (patch)
tree2ec2c189465a698a41bd208ce83ed9a1d76b7523
parent7c5e645112a899ad018219365c3898b0e896353f (diff)
parent5d50c15234b78597d78bcddc911ecb4cb9cc123b (diff)
Merge pull request #51 from matthoosier-garmin/make-pkgconfig-files
Supply pkg-config files
-rw-r--r--kms++/CMakeLists.txt5
-rw-r--r--kms++/kms++.pc.in10
-rw-r--r--kms++util/CMakeLists.txt5
-rw-r--r--kms++util/kms++util.pc.in11
4 files changed, 31 insertions, 0 deletions
diff --git a/kms++/CMakeLists.txt b/kms++/CMakeLists.txt
index c02cc83..6e21fa5 100644
--- a/kms++/CMakeLists.txt
+++ b/kms++/CMakeLists.txt
@@ -24,6 +24,8 @@ target_include_directories(kms++ PUBLIC
target_link_libraries(kms++ ${LIBDRM_LIBRARIES} ${LIBDRM_OMAP_LIBRARIES} fmt::fmt-header-only)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kms++.pc.in ${CMAKE_CURRENT_BINARY_DIR}/kms++.pc @ONLY)
+
# Set a dummy SOVERSION just to avoid having a naked .so file in the filesystem.
# This version number doesn't make any promise about API/ABI stability.
set_target_properties(kms++ PROPERTIES
@@ -34,3 +36,6 @@ install(TARGETS kms++
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/kms++)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kms++.pc
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
diff --git a/kms++/kms++.pc.in b/kms++/kms++.pc.in
new file mode 100644
index 0000000..60b5974
--- /dev/null
+++ b/kms++/kms++.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_PREFIX@/lib
+includedir=@CMAKE_INSTALL_PREFIX@/include
+
+Name: kms++
+Description: C++ library for Linux kernel mode setting
+Version: 0.0.0
+Libs: -L${libdir} -lkms++
+Cflags: -I${includedir}
diff --git a/kms++util/CMakeLists.txt b/kms++util/CMakeLists.txt
index 5bbf596..0bfb56b 100644
--- a/kms++util/CMakeLists.txt
+++ b/kms++util/CMakeLists.txt
@@ -14,6 +14,8 @@ if (KMSXX_ENABLE_THREADING)
add_definitions(-DHAS_PTHREAD)
endif()
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kms++util.pc.in ${CMAKE_CURRENT_BINARY_DIR}/kms++util.pc @ONLY)
+
# Set a dummy SOVERSION just to avoid havig a naked .so file in the filesystem.
# This version number doesn't make any promise about API/ABI stability.
set_target_properties(kms++util PROPERTIES
@@ -24,3 +26,6 @@ install(TARGETS kms++util
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include/kms++util)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kms++util.pc
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
diff --git a/kms++util/kms++util.pc.in b/kms++util/kms++util.pc.in
new file mode 100644
index 0000000..b90df89
--- /dev/null
+++ b/kms++util/kms++util.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_PREFIX@/lib
+includedir=@CMAKE_INSTALL_PREFIX@/include
+
+Name: kms++
+Description: C++ library for Linux kernel mode setting
+Version: 0.0.0
+Requires: kms++
+Libs: -L${libdir} -lkms++util
+Cflags: -I${includedir}