diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a2d1042b05134306a9e26cbe65170f6c45ebcad..4ccdc1fd576142e6c96a22876b1adb9d60010863 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,9 +41,7 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
 set(LIBS "")
 include_directories(${Corpus2Library_SOURCE_DIR})
 
-set(Boost_USE_STATIC_LIBS        ON)
-set(Boost_USE_MULTITHREADED      ON)
-set(Boost_USE_STATIC_RUNTIME    OFF)
+set(Boost_USE_STATIC_LIBS        OFF)
 find_package(Boost 1.41 REQUIRED COMPONENTS program_options filesystem regex)
 
 set(LIBCORPUS2_INSTALL_DATA_DIR share/corpus2)
@@ -53,24 +51,6 @@ FIND_PATH(LIBCORPUS2_SRC_DATA_DIR
 )
 MARK_AS_ADVANCED(LIBCORPUS2_SRC_DATA_DIR)
 
-# For DLLs on Windows (aka SHARED libraries) you have to explicitly
-# specify the external API of the library. Nothing is exported
-# by default.
-# For UNIX on the other hand everything is exported by default.
-# We were building libraries SHARED but without specyfing
-# external API. It worked on UNIX but not on Windows.
-# This is changed now so add_library entries do not specify library
-# type and therefore use default. Below, the default is set
-# to build SHARED libs on anything but WIN32, so for Windows/cygwin
-# we are building STATIC (todo: is cygwin ok w/o externs?)
-# To make DLLs on Windows, exports have to be defined and then
-# add_library entry changed to state SHARED for given library.
-# Once this is done for all libraries, and all are marked
-# explicitly as SHARED, the below will won't make a difference.
-if(NOT WIN32)
-    set(BUILD_SHARED_LIBS TRUE)
-endif(NOT WIN32)
-
 add_subdirectory(libpwrutils)
 add_subdirectory(libcorpus2)
 add_subdirectory(tagset-tool)
diff --git a/libcorpus2/CMakeLists.txt b/libcorpus2/CMakeLists.txt
index 7bed1c1cca1655e7f262062033f0a457c383b710..551cf96e85873e41de170b1312964451c49063fa 100644
--- a/libcorpus2/CMakeLists.txt
+++ b/libcorpus2/CMakeLists.txt
@@ -68,7 +68,16 @@ SET(libcorpus2_STAT_SRC
 
 file(GLOB_RECURSE INCS "*.h")
 
-add_library(corpus2 ${libcorpus2_STAT_SRC} ${INCS})
+if(WIN32)
+# For DLLs on Windows (aka SHARED libraries) you have to explicitly
+# specify the external API of the library. Nothing is exported
+# by default.
+# For UNIX on the other hand everything is exported by default.
+# Until external API is specified explicitly, build STATIC for WIN32
+	add_library(corpus2 STATIC ${libcorpus2_STAT_SRC} ${INCS})
+else(WIN32)
+	add_library(corpus2 SHARED ${libcorpus2_STAT_SRC} ${INCS})
+endif(WIN32)
 target_link_libraries(corpus2 ${LIBS})
 set_target_properties(corpus2 PROPERTIES
 	VERSION "${corpus2_ver_major}.${corpus2_ver_minor}"
diff --git a/libpwrutils/CMakeLists.txt b/libpwrutils/CMakeLists.txt
index e4159a301f95b6e19a56dcfc0aaa2f8f8aac8a9c..e95b37802e3fbc1f254fd09ca3d7bab84b4cd697 100644
--- a/libpwrutils/CMakeLists.txt
+++ b/libpwrutils/CMakeLists.txt
@@ -34,7 +34,16 @@ SET(libpwrutils_STAT_SRC
 
 file(GLOB_RECURSE INCS "*.h")
 
-add_library(pwrutils ${libpwrutils_STAT_SRC} ${INCS})
+if(WIN32)
+# For DLLs on Windows (aka SHARED libraries) you have to explicitly
+# specify the external API of the library. Nothing is exported
+# by default.
+# For UNIX on the other hand everything is exported by default.
+# Until external API is specified explicitly, build STATIC for WIN32
+	add_library(pwrutils STATIC ${libpwrutils_STAT_SRC} ${INCS})
+else(WIN32)
+	add_library(pwrutils SHARED ${libpwrutils_STAT_SRC} ${INCS})
+endif(WIN32)
 target_link_libraries(pwrutils ${LIBS} )
 set_target_properties(pwrutils PROPERTIES
 	VERSION "${pwrutils_ver_major}.${pwrutils_ver_minor}"