THRIFT-4732: windows cmake refinements and add windows docker build support
diff --git a/build/cmake/DefinePlatformSpecifc.cmake b/build/cmake/DefinePlatformSpecifc.cmake
index 9d7c903..ac33e29 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -20,8 +20,16 @@
 # Uncomment this to show some basic cmake variables about platforms
 # include (NewPlatformDebug)
 
+# For Debug build types, append a "d" to the library names.
+set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
+
 # Visual Studio specific options
 if(MSVC)
+    # Allow for shared library builds
+    if(BUILD_SHARED_LIBS)
+        set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON CACHE TYPE BOOL FORCE)
+    endif()
+
     #For visual studio the library naming is as following:
     # Dynamic libraries:
     #  - thrift.dll  for release library
@@ -36,11 +44,6 @@
     #
     # the same holds for other libraries like libthriftz etc.
 
-    # For Debug build types, append a "d" to the library names.
-    set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
-    set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "Set release library postfix" FORCE)
-    set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "Set release library postfix" FORCE)
-
     # Build using /MT option instead of /MD if the WITH_MT options is set
     if(WITH_MT)
         set(CompilerFlags
@@ -56,9 +59,9 @@
         foreach(CompilerFlag ${CompilerFlags})
           string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
         endforeach()
-        set(STATIC_POSTFIX "mt" CACHE STRING "Set static library postfix" FORCE)
+        set(THRIFT_RUNTIME_POSTFIX "mt" CACHE STRING "Set static library postfix" FORCE)
     else(WITH_MT)
-        set(STATIC_POSTFIX "md" CACHE STRING "Set static library postfix" FORCE)
+        set(THRIFT_RUNTIME_POSTFIX "md" CACHE STRING "Set static library postfix" FORCE)
     endif(WITH_MT)
 
     # Disable boost auto linking pragmas - cmake includes the right files
@@ -72,14 +75,6 @@
 
     add_definitions("/MP") # parallel build
     add_definitions("/W3") # warning level 3
-
-    # VS2010 does not provide inttypes which we need for "PRId64" used in many places
-    find_package(Inttypes)
-    if (Inttypes_FOUND)
-      include_directories(${INTTYPES_INCLUDE_DIRS})
-      # OpenSSL conflicts with the definition of PRId64 unless it is defined first
-      add_definitions("/FIinttypes.h")
-    endif ()
 elseif(UNIX)
   find_program( MEMORYCHECK_COMMAND valgrind )
   set( MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --leak-check=full" )