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.

39 lines
1.2 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,11 @@
  16. +prefix=@CMAKE_INSTALL_PREFIX@
  17. +exec_prefix=@CMAKE_INSTALL_PREFIX@
  18. +libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
  19. +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
  20. +
  21. +Name: gd
  22. +Description: GD graphics library
  23. +Version: @GDLIB_VERSION@
  24. +Cflags: -I${includedir}
  25. +Libs.private: @LIBGD_DEP_LIBS@
  26. +Libs: -L${libdir} -lgd
  27. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
  28. index a621fe1e..38fc9c42 100644
  29. --- a/src/CMakeLists.txt
  30. +++ b/src/CMakeLists.txt
  31. @@ -174,3 +174,6 @@ install(FILES
  32. gdfontt.h
  33. gdfx.h
  34. DESTINATION include)
  35. +
  36. +CONFIGURE_FILE(../config/gdlib.pc.cmake gdlib.pc @ONLY)
  37. +INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/gdlib.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")