0001-Add-.pc-files-for-the-OpenGLESv2-EGL-and-bcm_host-li.patch 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. From 4824be8986c2b6ef0b0bd2b32bc99c4ba6406640 Mon Sep 17 00:00:00 2001
  2. From: "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. Date: Sat, 24 Jan 2015 19:44:14 +0100
  4. Subject: [PATCH] Add .pc files for the OpenGLESv2, EGL and bcm_host libraries
  5. Those pkg-config files make it easier for Qt5 to find those libraries
  6. and the appropriate link flags.
  7. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  8. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  9. [Rebased for rpi-userland-a1b89e91f393c7134b4cdc36431f863bb3333163]
  10. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  11. ---
  12. host_applications/linux/libs/bcm_host/CMakeLists.txt | 4 ++++
  13. host_applications/linux/libs/bcm_host/bcm_host.pc.in | 10 ++++++++++
  14. interface/khronos/CMakeLists.txt | 8 ++++++++
  15. interface/khronos/egl/egl.pc.in | 11 +++++++++++
  16. interface/khronos/glxx/glesv2.pc.in | 10 ++++++++++
  17. 5 files changed, 43 insertions(+)
  18. create mode 100644 host_applications/linux/libs/bcm_host/bcm_host.pc.in
  19. create mode 100644 interface/khronos/egl/egl.pc.in
  20. create mode 100644 interface/khronos/glxx/glesv2.pc.in
  21. diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
  22. index 1edf50a..1f29ead 100644
  23. --- a/host_applications/linux/libs/bcm_host/CMakeLists.txt
  24. +++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt
  25. @@ -20,3 +20,7 @@ target_link_libraries(bcm_host vcos vchostif)
  26. install(TARGETS bcm_host DESTINATION lib)
  27. +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bcm_host.pc.in"
  28. + "${CMAKE_CURRENT_BINARY_DIR}/bcm_host.pc" @ONLY)
  29. +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bcm_host.pc"
  30. + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
  31. diff --git a/host_applications/linux/libs/bcm_host/bcm_host.pc.in b/host_applications/linux/libs/bcm_host/bcm_host.pc.in
  32. new file mode 100644
  33. index 0000000..d40d350
  34. --- /dev/null
  35. +++ b/host_applications/linux/libs/bcm_host/bcm_host.pc.in
  36. @@ -0,0 +1,10 @@
  37. +prefix=/usr
  38. +exec_prefix=${prefix}
  39. +libdir=${exec_prefix}/lib
  40. +includedir=${prefix}/include
  41. +
  42. +Name: bcm_host
  43. +Description: Broadcom VideoCore host API library
  44. +Version: 1
  45. +Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm
  46. +Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM
  47. diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt
  48. index 4231af4..2844ebd 100644
  49. --- a/interface/khronos/CMakeLists.txt
  50. +++ b/interface/khronos/CMakeLists.txt
  51. @@ -74,6 +74,14 @@ target_link_libraries(OpenVG EGL)
  52. install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION lib)
  53. install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION lib)
  54. +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/egl/egl.pc.in"
  55. + "${CMAKE_CURRENT_BINARY_DIR}/egl/egl.pc" @ONLY)
  56. +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/egl/egl.pc"
  57. + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
  58. +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/glxx/glesv2.pc.in"
  59. + "${CMAKE_CURRENT_BINARY_DIR}/glxx/glesv2.pc" @ONLY)
  60. +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glxx/glesv2.pc"
  61. + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
  62. # recommended names to use to avoid conflicts with mesa libs
  63. add_library(brcmEGL ${SHARED} ${EGL_SOURCE})
  64. diff --git a/interface/khronos/egl/egl.pc.in b/interface/khronos/egl/egl.pc.in
  65. new file mode 100644
  66. index 0000000..5868706
  67. --- /dev/null
  68. +++ b/interface/khronos/egl/egl.pc.in
  69. @@ -0,0 +1,11 @@
  70. +prefix=@CMAKE_INSTALL_PREFIX@
  71. +exec_prefix=${prefix}
  72. +libdir=${exec_prefix}/lib
  73. +includedir=${prefix}/include
  74. +
  75. +Name: egl
  76. +Description: RasberryPi implementation of EGL
  77. +Version: 10
  78. +Libs: -L${libdir} -lEGL -lGLESv2 -lbcm_host -lvchostif
  79. +Cflags: -I${includedir}/ -I${includedir}/interface/vcos/pthreads/ \
  80. + -I${includedir}/interface/vmcs_host/linux/
  81. diff --git a/interface/khronos/glxx/glesv2.pc.in b/interface/khronos/glxx/glesv2.pc.in
  82. new file mode 100644
  83. index 0000000..2f58eed
  84. --- /dev/null
  85. +++ b/interface/khronos/glxx/glesv2.pc.in
  86. @@ -0,0 +1,10 @@
  87. +prefix=@CMAKE_INSTALL_PREFIX@
  88. +exec_prefix=${prefix}
  89. +libdir=${exec_prefix}/lib
  90. +includedir=${prefix}/include
  91. +
  92. +Name: glesv2
  93. +Description: RasberryPi implementation of OpenGL ESv2
  94. +Version: 2.0
  95. +Libs: -L${libdir} -lGLESv2
  96. +Cflags: -I${includedir}/
  97. --
  98. 2.8.1