Ament/Colcon: Share variable between package CMakeLists
I want to share a filepath variable between the CMakeLists
of two packages.
When I set in the firstCMakeLists
a variable using the following ways:
set(varABC "x" CACHE STRING "Description")
set( ENV{varDEF} x )
It won't appear in the second CmakeLists
the following way:
find_package(packageA REQUIRED)
message(STATUS "${varABC}")
message(STATUS "${varDEF}")
Anybody knows how to do that the right way?