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