When creating an executable with add_geode_binary, if this executable links a lib created in the same CMake project AND is configured to be installed to a custom directory, it does not work after install.
Example with the attached reproducer:
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/dir -DCMAKE_PREFIX_PATH=/path/to/geode
make
./bin/reproducer # OK
make install
/path/to/install/dir/bin/reproducer # error while loading shared libraries...
Checking the RUNPATH header in the binaries explains this behavior:
When creating an executable with
add_geode_binary
, if this executable links a lib created in the same CMake project AND is configured to be installed to a custom directory, it does not work after install.Example with the attached reproducer:
Checking the RUNPATH header in the binaries explains this behavior:
-> the 2nd RUNPATH is invalid.