diff --git a/cmake/packaging.cmake b/cmake/packaging.cmake index 9e42136e..8e4c9226 100644 --- a/cmake/packaging.cmake +++ b/cmake/packaging.cmake @@ -94,7 +94,10 @@ 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) +foreach(driver sdl2dev glrend softrend pentprim) + if (TARGET ${driver}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/brender-driver.pc.in ${CMAKE_CURRENT_BINARY_DIR}/brender-${driver}.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/brender-${driver}.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) + endif() +endforeach()