Skip to content

Commit

Permalink
Added support for pkg-config installation on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
CNugteren committed Oct 23, 2016
1 parent 73ed6c3 commit a8c6871
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ endif()
install(TARGETS cltune DESTINATION lib)
install(FILES include/cltune.h DESTINATION include)

# Install pkg-config file on Linux
if(UNIX)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cltune.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/cltune.pc" @ONLY IMMEDIATE)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cltune.pc
DESTINATION lib/pkgconfig)
endif()

# ==================================================================================================

# Optional: Enables compilation of sample programs
Expand Down
10 changes: 10 additions & 0 deletions cltune.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib

Name: CLTune
Description: CLTune: An automatic OpenCL & CUDA kernel tuner
Version: @cltune_VERSION_MAJOR@.@cltune_VERSION_MINOR@.@cltune_VERSION_PATCH@
Libs: -L${libdir} -lcltune
Cflags: -I${includedir}

0 comments on commit a8c6871

Please sign in to comment.