[Bug 1038] New: KDLConfig.cmake.in changes PKG_CONFIG_PATH environment variable and doesn't restore it.
Dave Hershberger <[email protected]>
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <[email protected]/> |
http://bugs.orocos.org/show_bug.cgi?id=1038
Summary: KDLConfig.cmake.in changes PKG_CONFIG_PATH environment
variable and doesn't restore it.
Product: KDL
Version: kdl-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Build system
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Estimated Hours: 0.0
This lost me an afternoon's work.
Line 18 in KDLConfig.cmake.in:
set(ENV{PKG_CONFIG_PATH} "@CMAKE_INSTALL_PREFIX@/lib/pkgconfig/")
changes the contents of the environment variable PKG_CONFIG_PATH, which breaks
any other uses of pkg-config later in the cmake session.
The workaround I am currently using looks like this:
set(saved_PKG_CONFIG_PATH $ENV{PKG_CONFIG_PATH})
find_package(orocos_kdl)
set(ENV{PKG_CONFIG_PATH} ${saved_PKG_CONFIG_PATH})
This does work for me, but should not be necessary.
You could put similar lines in KDLConfig.cmake.in as a first pass, to at least
avoid corrupting the variable for others. If you do, please use a very unique
temporary variable name, since cmake variables are all in a single namespace.
I'm pretty sure there is a better way though.
--
Configure bugmail: http://bugs.orocos.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.
--
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev