From 55e6ca0e6723698a16dd68d0e6c7338f38595063 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 31 Dec 2023 14:41:22 +0100 Subject: [PATCH] cmake: add pkg-config files --- CMakeLists.txt | 9 ++++++++- hyprlang.pc.in | 9 +++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 hyprlang.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a654b7..1cb4bac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,15 @@ cmake_minimum_required(VERSION 3.19) + +set(HYPRLANG_VERSION "0.1") +set(PREFIX ${CMAKE_INSTALL_PREFIX}) + project(hyprlang - VERSION "0.1" + VERSION ${HYPRLANG_VERSION} DESCRIPTION "A library to parse hypr config files" ) +configure_file(hyprlang.pc.in hyprlang.pc @ONLY) + include(CTest) set(CMAKE_CXX_STANDARD 23) @@ -27,3 +33,4 @@ add_test(NAME "Parsing" WORKING_DIRECTORY "../tests/" COMMAND hyprlang_test "par install(TARGETS hyprlang PUBLIC_HEADER DESTINATION include LIBRARY DESTINATION lib) +install(FILES build/hyprlang.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pkgconfig) diff --git a/hyprlang.pc.in b/hyprlang.pc.in new file mode 100644 index 0000000..b1bfb5c --- /dev/null +++ b/hyprlang.pc.in @@ -0,0 +1,9 @@ +prefix="@PREFIX@" +includedir="${prefix}/include" + +Name: hyprlang +URL: https://github.com/hyprwm/hyprlang +Description: The official implementation library for the hypr config language. +Version: @HYPRLANG_VERSION@ +Cflags: -I"${prefix}/include" +libs: -lhyprlang