Skip to content

Commit

Permalink
add pkg-config file (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
emansom committed Apr 24, 2023
1 parent ce3c36d commit 56d9e7f
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 @@ -1373,6 +1373,14 @@ if(ENABLE_CPP)
endif()


# pkg-config support
include(FindPkgConfig QUIET)
if(PKG_CONFIG_FOUND)
configure_file("${PROJECT_SOURCE_DIR}/tools/pkg-config/stumpless.pc.in" "${PROJECT_BINARY_DIR}/tools/pkg-config/stumpless.pc" @ONLY)
install(FILES "${PROJECT_BINARY_DIR}/tools/pkg-config/stumpless.pc"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
endif()

# python support
if(BUILD_PYTHON)
add_swig_project()
Expand Down
10 changes: 10 additions & 0 deletions tools/pkg-config/stumpless.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: @CMAKE_PROJECT_NAME@
Description: C logging library built for high performance and a rich feature set
Version: @CMAKE_VERSION@
Libs: -L${libdir} -lstumpless
Cflags: -I${includedir}

0 comments on commit 56d9e7f

Please sign in to comment.