summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-10-21 09:38:25 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2016-10-21 09:38:25 +0200
commit3797d144cc8d7cf3de55f4804cb5e81e2436571f (patch)
tree3dbca3fd7e5ab3babcd8d55b5e741b32abe90cf5
parent115af8c78ed93894b1e3021d9612df89d2cef3d4 (diff)
Generate and install pkg-config description
-rw-r--r--CMakeLists.txt8
-rw-r--r--src/clblast.pc.in10
2 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 178ac9bb..9f32a811 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -195,6 +195,14 @@ install(FILES include/clblast_half.h DESTINATION include)
# Installs the config for find_package in dependent projects
install(EXPORT CLBlast DESTINATION lib/cmake/CLBLast FILE CLBlastConfig.cmake)
+# Install pkg-config file on Linux
+if(UNIX)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/clblast.pc.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/clblast.pc" @ONLY IMMEDIATE)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/clblast.pc
+ DESTINATION lib/pkgconfig)
+endif()
+
# ==================================================================================================
# Sets a default platform ($DEVICEPLATFORM) and device ($CLBLAST_DEVICE) to run tuners and tests on
diff --git a/src/clblast.pc.in b/src/clblast.pc.in
new file mode 100644
index 00000000..2538add8
--- /dev/null
+++ b/src/clblast.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+includedir=${prefix}/include
+libdir=${exec_prefix}/lib
+
+Name: CLBlast
+Description: CLBlast is a modern, lightweight, performant and tunable OpenCL BLAS library written in C++11
+Version: @clblast_VERSION_MAJOR@.@clblast_VERSION_MINOR@.@clblast_VERSION_PATCH@
+Libs: -L${libdir} -lclblast
+Cflags: -I${includedir}