From 3797d144cc8d7cf3de55f4804cb5e81e2436571f Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 21 Oct 2016 09:38:25 +0200 Subject: Generate and install pkg-config description --- CMakeLists.txt | 8 ++++++++ src/clblast.pc.in | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/clblast.pc.in 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} -- cgit v1.2.3