cmake: add pkg-config files

This commit is contained in:
Vaxry 2023-12-31 14:41:22 +01:00
parent 82dce408d1
commit 55e6ca0e67
2 changed files with 17 additions and 1 deletions

View file

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

9
hyprlang.pc.in Normal file
View file

@ -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