Suppport for MSVC DLLs.

Change-Id: Ibbcc4ba4e59f5bbf1cb91fe81c7d3b9042d03493
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 60e464d..eda929b 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -28,6 +28,10 @@
 #
 # Author: keir@google.com (Keir Mierle)
 
+IF (BUILD_SHARED_LIBS)
+  ADD_DEFINITIONS(-DCERES_USING_SHARED_LIBRARY)
+ENDIF()
+
 ADD_EXECUTABLE(helloworld helloworld.cc)
 TARGET_LINK_LIBRARIES(helloworld ceres)