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
6 Those pkg-config files make it easier for Qt5 to find those libraries
7 and the appropriate link flags.
9 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
12 [Rebased for rpi-userland-a1b89e91f393c7134b4cdc36431f863bb3333163]
13 Signed-off-by: Peter Seiderer <ps.report@gmx.net>
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
25 diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt
26 index 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)
31 install(TARGETS bcm_host DESTINATION lib)
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")
37 diff --git a/host_applications/linux/libs/bcm_host/bcm_host.pc.in b/host_applications/linux/libs/bcm_host/bcm_host.pc.in
39 index 0000000..d40d350
41 +++ b/host_applications/linux/libs/bcm_host/bcm_host.pc.in
44 +exec_prefix=${prefix}
45 +libdir=${exec_prefix}/lib
46 +includedir=${prefix}/include
49 +Description: Broadcom VideoCore host API library
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
53 diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt
54 index 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)
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")
70 # recommended names to use to avoid conflicts with mesa libs
71 add_library(brcmEGL ${SHARED} ${EGL_SOURCE})
72 diff --git a/interface/khronos/egl/egl.pc.in b/interface/khronos/egl/egl.pc.in
74 index 0000000..5868706
76 +++ b/interface/khronos/egl/egl.pc.in
78 +prefix=@CMAKE_INSTALL_PREFIX@
79 +exec_prefix=${prefix}
80 +libdir=${exec_prefix}/lib
81 +includedir=${prefix}/include
84 +Description: RasberryPi implementation of EGL
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/
89 diff --git a/interface/khronos/glxx/glesv2.pc.in b/interface/khronos/glxx/glesv2.pc.in
91 index 0000000..2f58eed
93 +++ b/interface/khronos/glxx/glesv2.pc.in
95 +prefix=@CMAKE_INSTALL_PREFIX@
96 +exec_prefix=${prefix}
97 +libdir=${exec_prefix}/lib
98 +includedir=${prefix}/include
101 +Description: RasberryPi implementation of OpenGL ESv2
103 +Libs: -L${libdir} -lGLESv2
104 +Cflags: -I${includedir}/