Previous code assumed that the following variables were relative paths
- CMAKE_INSTALL_INCLUDEDIR
- CMAKE_INSTALL_LIBDIR
However, using absolute paths there is totally legal in CMake,
and doing so broke installed paths in smpicc/smpicxx.
Fix uses the CMAKE_INSTALL_FULL_<dir> variant instead,
which should work in this case and generally be more robust.
FULL variants exist since at least cmake-3.0.0 so it should be available
everywhere (cmake-3.0.0 was released on June 2014).
References:
- https://cmake.org/cmake/help/latest/command/install.html
- https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
### SMPI script used when simgrid is installed
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
-set(includedir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
-set(libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
+set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
set(includeflag "-I${includedir} -I${includedir}/smpi")
set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=\"${libdir}")
if(NS3_LIBRARY_PATH)