diff --git a/CMakeLists.txt b/CMakeLists.txt
index e10c0eae577263704d877d9dee88c19fbae142b1..c84b1b8998b992c30607f77b17b53df15f174af2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,6 +64,11 @@ if(NOT INSTALL_PYTHON_INTERFACE_ONLY)
   add_library(${PROJECT_NAME} INTERFACE)
   target_include_directories(${PROJECT_NAME}
                              INTERFACE $<INSTALL_INTERFACE:include>)
+  target_compile_definitions(
+    ${PROJECT_NAME}
+    INTERFACE
+      EXAMPLE_ROBOT_DATA_MODEL_DIR="$<INSTALL_PREFIX>/share/${PROJECT_NAME}/robots"
+  )
   install(
     TARGETS ${PROJECT_NAME}
     EXPORT ${TARGETS_EXPORT_NAME}
diff --git a/include/example-robot-data/CMakeLists.txt b/include/example-robot-data/CMakeLists.txt
index c5c41852eb2421acc50a1369cff011d08ea61176..aec065654690065c63ec3b9595ce78e62e7509e5 100644
--- a/include/example-robot-data/CMakeLists.txt
+++ b/include/example-robot-data/CMakeLists.txt
@@ -1,3 +1,2 @@
-configure_file(path.hpp.in path.hpp)
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/path.hpp
         DESTINATION include/${CUSTOM_HEADER_DIR})
diff --git a/include/example-robot-data/path.hpp b/include/example-robot-data/path.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..14c0b31dbee1167cd4e9c74db8cc5cc2b5a267fb
--- /dev/null
+++ b/include/example-robot-data/path.hpp
@@ -0,0 +1,9 @@
+#ifndef EXAMPLE_ROBOT_DATA_PATH_HPP
+#define EXAMPLE_ROBOT_DATA_PATH_HPP
+
+#include <example-robot-data/warning.hh>
+
+#pragma message EXAMPLE_ROBOT_DATA_WARN( \
+        "Header `example-robot-data/path.hpp` is deprecated and useless!")
+
+#endif
diff --git a/include/example-robot-data/path.hpp.in b/include/example-robot-data/path.hpp.in
deleted file mode 100644
index 47883040decfa1027159ecb406cde7d9274baae4..0000000000000000000000000000000000000000
--- a/include/example-robot-data/path.hpp.in
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef EXAMPLE_ROBOT_DATA_PATH_HPP
-#define EXAMPLE_ROBOT_DATA_PATH_HPP
-
-#define EXAMPLE_ROBOT_DATA_MODEL_DIR "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/robots"
-
-#endif