From e3380a8fe8c4c929c843b360583d8effd075deb9 Mon Sep 17 00:00:00 2001 From: Adam Nilsson Date: Mon, 6 Nov 2023 14:00:07 +0100 Subject: [PATCH] feat(build): add pkgconfig file (#4744) Co-authored-by: Adam x Nilsson --- env_support/cmake/custom.cmake | 6 ++++++ lvgl.pc.in | 10 ++++++++++ 2 files changed, 16 insertions(+) create mode 100644 lvgl.pc.in diff --git a/env_support/cmake/custom.cmake b/env_support/cmake/custom.cmake index 5568e61dd..636c1803c 100644 --- a/env_support/cmake/custom.cmake +++ b/env_support/cmake/custom.cmake @@ -71,6 +71,12 @@ install( FILES_MATCHING PATTERN "*.h") +configure_file("${LVGL_ROOT_DIR}/lvgl.pc.in" lvgl.pc @ONLY) + +install( + FILES "${CMAKE_BINARY_DIR}/lvgl.pc" + DESTINATION "${LIB_INSTALL_DIR}/pkgconfig/") + set_target_properties( lvgl PROPERTIES OUTPUT_NAME lvgl diff --git a/lvgl.pc.in b/lvgl.pc.in new file mode 100644 index 000000000..7d49c90bd --- /dev/null +++ b/lvgl.pc.in @@ -0,0 +1,10 @@ +prefix="@CMAKE_INSTALL_PREFIX@" +includedir="${prefix}/@INC_INSTALL_DIR@" +libdir=${prefix}/lib + +Name: lvgl +Description: Light and Versatile Graphics Library +URL: https://lvgl.io/ +Version: 9.0.0 +Cflags: -I${includedir} +Libs: -L${libdir} -llvgl