Skip to content

Commit

Permalink
feat: added pkgconfig configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ABeltramo committed Aug 1, 2024
1 parent 1d124d8 commit 3a4b6a4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/include/inputtino/${export_file_name}"
COMPONENT libinputtino-dev
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/inputtino")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/share/pkgconfig/libinputtino.pc.in
${CMAKE_CURRENT_BINARY_DIR}/libinputtino.pc
@ONLY
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libinputtino.pc
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
endif ()
endif ()

Expand Down
17 changes: 17 additions & 0 deletions share/pkgconfig/libinputtino.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
prefix=@CMAKE_INSTALL_PREFIX@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@INSTALL_LIB_DIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@PROJECT_NAME@

Name: libinputtino
Description: @PROJECT_DESCRIPTION@
URL: @PROJECT_HOMEPAGE_URL@
Version: @PROJECT_VERSION@

Requires:
Libs: -L${libdir} -llibevdev
Cflags: -I${includedir}

2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include(FetchContent)

# Testing library
FetchContent_Declare(
Catch2
Expand Down

0 comments on commit 3a4b6a4

Please sign in to comment.