You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

  1. From dd76e8fcf2a2d7e122110444695ad20f2549420e Mon Sep 17 00:00:00 2001
  2. From: Mike Frysinger <vapier@gentoo.org>
  3. Date: Wed, 10 Jan 2018 01:56:10 -0500
  4. Subject: [PATCH] generate & install gdlib.pc for cmake builds too #164
  5. ---
  6. config/gdlib.pc.cmake | 9 +++++++++
  7. src/CMakeLists.txt | 3 +++
  8. 2 files changed, 12 insertions(+)
  9. create mode 100644 config/gdlib.pc.cmake
  10. diff --git a/config/gdlib.pc.cmake b/config/gdlib.pc.cmake
  11. new file mode 100644
  12. index 00000000..fb828882
  13. --- /dev/null
  14. +++ b/config/gdlib.pc.cmake
  15. @@ -0,0 +1,9 @@
  16. +libdir=@CMAKE_INSTALL_FULL_LIBDIR@
  17. +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
  18. +
  19. +Name: gd
  20. +Description: GD graphics library
  21. +Version: @GDLIB_VERSION@
  22. +Cflags: -I${includedir}
  23. +Libs.private: @LIBGD_DEP_LIBS@
  24. +Libs: -L${libdir} -lgd
  25. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
  26. index a621fe1e..38fc9c42 100644
  27. --- a/src/CMakeLists.txt
  28. +++ b/src/CMakeLists.txt
  29. @@ -174,3 +174,6 @@ install(FILES
  30. gdfontt.h
  31. gdfx.h
  32. DESTINATION include)
  33. +
  34. +CONFIGURE_FILE(../config/gdlib.pc.cmake gdlib.pc @ONLY)
  35. +INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/gdlib.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")