mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Export pkg-config dependencies via the CMake cache
This will be useful when building GLFW as a CMake object library and linking it into a larger library that exports pkg-config information. Partly based on #1307 by @a3f. Closes #1307.
This commit is contained in:
@@ -258,12 +258,17 @@ endif()
|
||||
# Export GLFW library dependencies
|
||||
#--------------------------------------------------------------------
|
||||
foreach(arg ${glfw_PKG_DEPS})
|
||||
set(GLFW_PKG_DEPS "${GLFW_PKG_DEPS} ${arg}")
|
||||
set(deps "${deps} ${arg}")
|
||||
endforeach()
|
||||
foreach(arg ${glfw_PKG_LIBS})
|
||||
set(GLFW_PKG_LIBS "${GLFW_PKG_LIBS} ${arg}")
|
||||
set(libs "${libs} ${arg}")
|
||||
endforeach()
|
||||
|
||||
set(GLFW_PKG_CONFIG_REQUIRES_PRIVATE "${deps}" CACHE INTERNAL
|
||||
"GLFW pkg-config Requires.private")
|
||||
set(GLFW_PKG_CONFIG_LIBS_PRIVATE "${libs}" CACHE INTERNAL
|
||||
"GLFW pkg-config Libs.private")
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Create generated files
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user