Skip to content

Commit

Permalink
pkg-config: Update to separate drivers from main
Browse files Browse the repository at this point in the history
  • Loading branch information
erysdren committed Aug 20, 2024
1 parent 3412677 commit 576e2f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions cmake/brender-driver.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
libdir="@CMAKE_INSTALL_FULL_LIBDIR@"
includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@/brender"

Name: @PROJECT_NAME@ (@driver@ driver)
Description: @CMAKE_PROJECT_DESCRIPTION@
URL: @CMAKE_PROJECT_HOMEPAGE_URL@
Version: @PROJECT_VERSION@
Cflags: -I"${includedir}/@driver@"
Libs: -L"${libdir}/brender" -l@driver@
4 changes: 2 additions & 2 deletions cmake/brender.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ Name: @PROJECT_NAME@
Description: @CMAKE_PROJECT_DESCRIPTION@
URL: @CMAKE_PROJECT_HOMEPAGE_URL@
Version: @PROJECT_VERSION@
Cflags: -I"${includedir}" -I"${includedir}/glrend" -I"${includedir}/sdl2dev"
Libs: -L"${libdir}" -L"${libdir}/brender" -lglrend -lsdl2dev -lbrender
Cflags: -I"${includedir}"
Libs: -L"${libdir}" -lbrender
3 changes: 3 additions & 0 deletions cmake/packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,7 @@ install(FILES

# pkg-config
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/brender.pc.in ${CMAKE_CURRENT_BINARY_DIR}/brender.pc @ONLY)
foreach(driver sdl2dev glrend)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/brender-driver.pc.in ${CMAKE_CURRENT_BINARY_DIR}/brender-${driver}.pc @ONLY)
endforeach()
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/brender.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)

0 comments on commit 576e2f0

Please sign in to comment.