Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pkg-config file (#339) #340

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,13 @@ install(FILES

include(tools/cmake/cpack.cmake)

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()


# functionality tests
add_function_test(buffer
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}
goatshriek marked this conversation as resolved.
Show resolved Hide resolved
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: @PROJECT_VERSION@
Libs: -L${libdir} -lstumpless
Cflags: -I${includedir}