GeneratePkgConfig: fix handling of install path with spaces.
GitOrigin-RevId: b18c2db8cd6314765b41509b094093853bbf5def
This commit is contained in:
parent
e3449e0df8
commit
8a6bf5e7a1
@ -51,16 +51,12 @@ function(generate_pkgconfig TARGET DESCRIPTION)
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig")
|
||||
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/${TARGET}.pc" CONTENT
|
||||
"prefix=${PREFIX}
|
||||
includedir=\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
libdir=\${prefix}/${CMAKE_INSTALL_LIBDIR}
|
||||
|
||||
Name: ${TARGET}
|
||||
"Name: ${TARGET}
|
||||
Description: ${DESCRIPTION}
|
||||
Version: ${PROJECT_VERSION}
|
||||
|
||||
CFlags: -I\${includedir}
|
||||
Libs: -L\${libdir} -l${TARGET}
|
||||
CFlags: -I\"${PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}\"
|
||||
Libs: -L\"${PREFIX}/${CMAKE_INSTALL_LIBDIR}\" -l${TARGET}
|
||||
${REQUIRES}${LIBRARIES}")
|
||||
|
||||
install(FILES "pkgconfig/${TARGET}.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
Loading…
Reference in New Issue
Block a user