mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
cmake: generate and install pkgconfig files
many packages expect packageconfig support especially for detecting EGL libraries. This patch helps in compiling those packages on RPi Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -113,6 +113,14 @@ set(vmcs_host_apps_VERSION_MAJOR 1)
|
||||
set(vmcs_host_apps_VERSION_MINOR 0)
|
||||
|
||||
include_directories("${PROJECT_BINARY_DIR}")
|
||||
|
||||
include(FindPkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
# Produce a pkg-config file
|
||||
foreach(PCFILE bcm_host.pc egl.pc glesv2.pc vg.pc)
|
||||
configure_file("pkgconfig/${PCFILE}.in" "${PCFILE}" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PCFILE}"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
|
||||
endforeach()
|
||||
endif()
|
||||
# Remove cache entry, if one added by command line
|
||||
unset(KHRONOS_EGL_PLATFORM CACHE)
|
||||
|
||||
10
pkgconfig/bcm_host.pc.in
Normal file
10
pkgconfig/bcm_host.pc.in
Normal file
@@ -0,0 +1,10 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: bcm_host
|
||||
Description: Broadcom VideoCore host API library
|
||||
Version: 1
|
||||
Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm -pthread
|
||||
Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM
|
||||
13
pkgconfig/egl.pc.in
Normal file
13
pkgconfig/egl.pc.in
Normal file
@@ -0,0 +1,13 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: EGL
|
||||
Description: Fake EGL package for RPi
|
||||
Version: 10
|
||||
Requires: bcm_host
|
||||
Libs: -L${libdir} -lEGL -lGLESv2 -lbcm_host -lvchostif
|
||||
Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux \
|
||||
-I${includedir}/interface/vcos/pthreads
|
||||
|
||||
12
pkgconfig/glesv2.pc.in
Normal file
12
pkgconfig/glesv2.pc.in
Normal file
@@ -0,0 +1,12 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: GLESv2
|
||||
Description: Fake GL ES 2 package for RPi
|
||||
Version: 10
|
||||
Requires: bcm_host
|
||||
Libs: -L${libdir} -lGLESv2
|
||||
Cflags: -I${includedir}
|
||||
|
||||
11
pkgconfig/vg.pc.in
Normal file
11
pkgconfig/vg.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: OpenVG
|
||||
Description: Fake OpenVG package for RPi
|
||||
Version: 10
|
||||
Requires: bcm_host
|
||||
Libs: -L${libdir} -lOpenVG
|
||||
Cflags: -I${includedir}
|
||||
Reference in New Issue
Block a user