From 4fade618629fc736f871b0326ff4431917d61225 Mon Sep 17 00:00:00 2001
From: Antoine Regimbeau <antoine.regimbeau@c-s.fr>
Date: Sat, 27 Jul 2019 14:39:23 +0200
Subject: [PATCH] Fix for win32

---
 SuperBuild/CMake/External_boost.cmake | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/SuperBuild/CMake/External_boost.cmake b/SuperBuild/CMake/External_boost.cmake
index e5a6a8b566..39036a3cec 100644
--- a/SuperBuild/CMake/External_boost.cmake
+++ b/SuperBuild/CMake/External_boost.cmake
@@ -52,10 +52,20 @@ foreach(lib ${boost_libraries_to_build})
 endforeach(lib)
 
 # I think that this is already handled by boost.
-if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
+# if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
+#   set(BOOST_SB_CONFIG 
+#     ${BOOST_SB_CONFIG}
+#     address-model=64)
+# endif()
+
+# This is needed because otherwise boost is building both x32 and x64 lib,
+# and during packages on win32 we are installing all libs.
+# See Packaging/install_importlibs.cmake
+
+if ( WIN32 )
   set(BOOST_SB_CONFIG 
     ${BOOST_SB_CONFIG}
-    address-model=64)
+    address-model=32)
 endif()
 
 set(BOOST_SB_CONFIG
-- 
GitLab