diff --git a/Modules/Core/Common/CMakeLists.txt b/Modules/Core/Common/CMakeLists.txt
index 397c92c9619f1b37d07c84ec2060ffb6c4c5fda4..e180e1e3b76db126f02188198124d5187209777e 100644
--- a/Modules/Core/Common/CMakeLists.txt
+++ b/Modules/Core/Common/CMakeLists.txt
@@ -1,6 +1,13 @@
 project(OTBCommon)
 
-configure_file(src/otbConfigure.h.in otbConfigure.h)
+configure_file(src/otbConfigure.h.in otbConfigure.h.in)
+file(APPEND ${OTBCommon_BINARY_DIR}/otbConfigure.h.in
+     "/* Optional third parties activation status */\n")
+foreach(_otb_module_activation_option IN LISTS OTB_MODULE_ACTIVATION_OPTION_LIST)
+  file(APPEND ${OTBCommon_BINARY_DIR}/otbConfigure.h.in
+       "#cmakedefine ${_otb_module_activation_option}\n")
+endforeach()
+configure_file(${OTBCommon_BINARY_DIR}/otbConfigure.h.in otbConfigure.h)
 
 set(OTBCommon_INCLUDE_DIRS
   ${OTBCommon_BINARY_DIR}
diff --git a/Modules/Core/Common/src/otbConfigure.h.in b/Modules/Core/Common/src/otbConfigure.h.in
index 9f56b04f1f3c892e64e09e091c6b723baa3dbecc..9b860c779a93fe44960e5b2a8af2bae0be0fb55e 100644
--- a/Modules/Core/Common/src/otbConfigure.h.in
+++ b/Modules/Core/Common/src/otbConfigure.h.in
@@ -19,3 +19,4 @@
 
 /* Show developper debug messages */
 #cmakedefine OTB_SHOW_ALL_MSG_DEBUG
+
diff --git a/Modules/ThirdParty/Curl/src/otb_curl.h.in b/Modules/ThirdParty/Curl/src/otb_curl.h.in
index 6d221b7a929025c439289a59e02f55918d0a96d7..1617c168a16511838cc50fbf2ffdcd9a51d6b1fd 100644
--- a/Modules/ThirdParty/Curl/src/otb_curl.h.in
+++ b/Modules/ThirdParty/Curl/src/otb_curl.h.in
@@ -17,7 +17,6 @@
 =========================================================================*/
 #ifndef __otb_curl_h
 
-#define OTB_USE_CURL 1
 #cmakedefine OTB_CURL_MULTI_AVAILABLE
 #include <curl/curl.h>