diff options
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rw-r--r-- | src/clblast.pc.in | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c882575e..ae78b5a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,6 +218,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 ($CLBLAST_PLATFORM) and device ($CLBLAST_DEVICE) to run tuners and tests 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} |