mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-14 01:47:55 +08:00
Merge pull request #611 from kmilos/patch-1
Relative and absolute paths for a relocatable pkgconf file
This commit is contained in:
commit
f1d8c51ec8
@ -192,6 +192,17 @@ if (PUGIXML_USE_POSTFIX)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Handle both relative and absolute paths (e.g. NixOS) for a relocatable package
|
||||||
|
if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
|
set(PUGIXML_PC_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
|
else()
|
||||||
|
set(PUGIXML_PC_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}")
|
||||||
|
endif()
|
||||||
|
if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
set(PUGIXML_PC_LIBDIR "${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
else()
|
||||||
|
set(PUGIXML_PC_LIBDIR "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
|
||||||
|
endif()
|
||||||
configure_file(scripts/pugixml.pc.in pugixml.pc @ONLY)
|
configure_file(scripts/pugixml.pc.in pugixml.pc @ONLY)
|
||||||
|
|
||||||
export(TARGETS ${install-targets}
|
export(TARGETS ${install-targets}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
prefix=@CMAKE_INSTALL_PREFIX@
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
exec_prefix=${prefix}
|
exec_prefix=${prefix}
|
||||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@@INSTALL_SUFFIX@
|
includedir=@PUGIXML_PC_INCLUDEDIR@
|
||||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@@INSTALL_SUFFIX@
|
libdir=@PUGIXML_PC_LIBDIR@
|
||||||
|
|
||||||
Name: pugixml
|
Name: pugixml
|
||||||
Description: Light-weight, simple and fast XML parser for C++ with XPath support.
|
Description: Light-weight, simple and fast XML parser for C++ with XPath support.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user