diff --git a/hpp-fclConfig.cmake b/hpp-fclConfig.cmake
index 3c30e484541a8170ac59c0f8032ad637cbf759a6..c09ecf7ff2323b8620e3f6a26fa228d96dfd2cba 100644
--- a/hpp-fclConfig.cmake
+++ b/hpp-fclConfig.cmake
@@ -3,4 +3,15 @@
 message(WARNING "Please update your CMake from 'hpp-fcl' to 'coal'")
 
 find_package(coal REQUIRED)
-add_library(hpp-fcl::hpp-fcl ALIAS coal::coal)
+
+if(CMAKE_VERSION VERSION_LESS "3.18.0")
+  if(NOT TARGET hpp-fcl::hpp-fcl)
+    add_library(hpp-fcl::hpp-fcl SHARED IMPORTED)
+    target_link_libraries(hpp-fcl::hpp-fcl INTERFACE coal::coal)
+    get_property(_cfg TARGET coal::coal PROPERTY IMPORTED_CONFIGURATIONS)
+    get_property(_loc TARGET coal::coal PROPERTY "IMPORTED_LOCATION_${_cfg}")
+    set_property(TARGET hpp-fcl::hpp-fcl PROPERTY IMPORTED_LOCATION "${_loc}")
+  endif()
+else()
+  add_library(hpp-fcl::hpp-fcl ALIAS coal::coal)
+endif()
diff --git a/include/hpp/fcl/coal.hpp b/include/hpp/fcl/coal.hpp
index e3c8845e234015ff1872d6d372a84dc6598f62d5..e4fdb758cdf868f6e2dc3cf1ddb1a488e528f63e 100644
--- a/include/hpp/fcl/coal.hpp
+++ b/include/hpp/fcl/coal.hpp
@@ -1,15 +1,19 @@
-#ifndef HPP_FCL_COAL_HH
-#define HPP_FCL_COAL_HH
+#ifndef HPP_FCL_COAL_HPP
+#define HPP_FCL_COAL_HPP
 
 #include <coal/config.hh>
 #include <coal/deprecated.hh>
 
 #define COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL
 
+#ifdef _MSC_VER
 #pragma message COAL_DEPRECATED_HEADER( \
     "Please update your includes from 'hpp/fcl' to 'coal'")
+#else
+#warning "Please update your includes from 'hpp/fcl' to 'coal'"
+#endif
 
 #define HPP_FCL_VERSION_AT_LEAST(major, minor, patch) \
   COAL_VERSION_AT_LEAST(major, minor, patch)
 
-#endif  // COAL_FWD_HH
+#endif  // COAL_FWD_HPP