Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| df339c07fd |
+39
-3
@@ -237,12 +237,48 @@ endif()
|
|||||||
|
|
||||||
# ---- Install ------------------------------------------------------
|
# ---- Install ------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Library + public header. Stage 2/3 will add a pkg-config file and
|
# Installs:
|
||||||
# CMake config exports once the API stabilises; pre-0.1 the scaffold
|
# - libdaedalus_decoder.a → ${CMAKE_INSTALL_LIBDIR}
|
||||||
# install just gives the static archive a home.
|
# - include/daedalus_decoder.h → ${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
# - daedalus-decoder.pc → ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||||
|
#
|
||||||
|
# The .pc lets sibling consumers (daedalus-v4l2 daemon, the
|
||||||
|
# daedalus_decode_h264 CLI when built externally) discover the static
|
||||||
|
# archive + headers via pkg-config. daedalus-fourier is declared as a
|
||||||
|
# public `Requires:` because the consumer (which static-links
|
||||||
|
# libdaedalus_decoder.a) also needs daedalus-fourier in its own link
|
||||||
|
# line to resolve the daedalus_ctx_* / daedalus_recipe_* symbols this
|
||||||
|
# archive references.
|
||||||
|
#
|
||||||
|
# Relocatable-prefix scheme mirrors daedalus-fourier's .pc generation:
|
||||||
|
# `prefix` is derived from ${pcfiledir} so `cmake --install --prefix /foo`
|
||||||
|
# produces a .pc that resolves prefix=/foo at lookup time, regardless of
|
||||||
|
# what CMAKE_INSTALL_PREFIX was at configure time.
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
install(TARGETS daedalus_decoder
|
install(TARGETS daedalus_decoder
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
install(FILES include/daedalus_decoder.h
|
install(FILES include/daedalus_decoder.h
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||||
|
|
||||||
|
file(RELATIVE_PATH PKGCONFIG_PCDIR_TO_PREFIX
|
||||||
|
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
||||||
|
"${CMAKE_INSTALL_PREFIX}")
|
||||||
|
|
||||||
|
set(PKGCONFIG_OUT ${CMAKE_CURRENT_BINARY_DIR}/daedalus-decoder.pc)
|
||||||
|
file(WRITE ${PKGCONFIG_OUT}
|
||||||
|
"prefix=\${pcfiledir}/${PKGCONFIG_PCDIR_TO_PREFIX}
|
||||||
|
exec_prefix=\${prefix}
|
||||||
|
libdir=\${prefix}/${CMAKE_INSTALL_LIBDIR}
|
||||||
|
includedir=\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||||
|
|
||||||
|
Name: daedalus-decoder
|
||||||
|
Description: Frame-major H.264 decoder on V3D7 via daedalus-fourier primitives
|
||||||
|
Version: ${PROJECT_VERSION}
|
||||||
|
Libs: -L\${libdir} -ldaedalus_decoder
|
||||||
|
Requires: daedalus-fourier
|
||||||
|
Cflags: -I\${includedir}
|
||||||
|
")
|
||||||
|
install(FILES ${PKGCONFIG_OUT}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user