Skip to content

Commit

Permalink
add pkg-config file
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Apr 20, 2024
1 parent b6a9bb8 commit ff38e27
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ project(hyprwayland-scanner
VERSION ${VERSION}
)

include(GNUInstallDirs)

set(PREFIX ${CMAKE_INSTALL_PREFIX})

set(CMAKE_MESSAGE_LOG_LEVEL "STATUS")

if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
Expand All @@ -25,6 +29,8 @@ add_compile_options(-Wall -Wextra -Wno-unused-parameter -Wno-unused-value

add_compile_definitions(SCANNER_VERSION="${VERSION}")

configure_file(hyprwayland-scanner.pc.in hyprwayland-scanner.pc @ONLY)

# dependencies
message(STATUS "Checking deps...")

Expand All @@ -38,3 +44,4 @@ target_link_libraries(hyprwayland-scanner PRIVATE rt Threads::Threads PkgConfig:

# Installation
install(TARGETS hyprwayland-scanner)
install(FILES ${CMAKE_BINARY_DIR}/hyprwayland-scanner.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
6 changes: 6 additions & 0 deletions hyprwayland-scanner.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
hyprwayland_scanner=@PREFIX@/bin/hyprwayland-scanner

Name: HyprWayland Scanner
URL: https://github.com/hyprwm/hyprwayland-scanner
Description: A Hyprland version of wayland-scanner in and for C++
Version: @VERSION@

0 comments on commit ff38e27

Please sign in to comment.