Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (revision 7222) +++ CMakeLists.txt (working copy) @@ -1199,6 +1199,11 @@ endif() endif() +# Add Preprocessor Definitions /D OPENEXR_DLL +if(MSVC) + set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} /D OPENEXR_DLL") +endif() + # Extra link libs if the user selects building static libs: if(NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID) # Android does not need these settings because they are already set by toolchain file