From 02bc621ba17065a6ca11d7242df4c924ac8a677d Mon Sep 17 00:00:00 2001
From: unknown <bOBaN@bOBaN-desktop.(none)>
Date: Tue, 25 Sep 2012 19:13:42 +0200
Subject: [PATCH] mingw build fixes

---
 libcorpus2/CMakeLists.txt       | 4 ++--
 libcorpus2_whole/CMakeLists.txt | 5 ++++-
 libpwrutils/CMakeLists.txt      | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/libcorpus2/CMakeLists.txt b/libcorpus2/CMakeLists.txt
index 7f507e7..fc5dc98 100644
--- a/libcorpus2/CMakeLists.txt
+++ b/libcorpus2/CMakeLists.txt
@@ -90,11 +90,11 @@ if(WIN32)
 # 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})
+	add_library(corpus2 SHARED ${libcorpus2_STAT_SRC} ${INCS})
 else(WIN32)
 	add_library(corpus2 SHARED ${libcorpus2_STAT_SRC} ${INCS})
 endif(WIN32)
-target_link_libraries(corpus2 ${LIBS})
+target_link_libraries(corpus2 pwrutils ${LIBS})
 set_target_properties(corpus2 PROPERTIES
 	VERSION "${corpus2_ver_major}.${corpus2_ver_minor}"
 	SOVERSION ${corpus2_ver_major})
diff --git a/libcorpus2_whole/CMakeLists.txt b/libcorpus2_whole/CMakeLists.txt
index 1f410bd..9c00a6f 100755
--- a/libcorpus2_whole/CMakeLists.txt
+++ b/libcorpus2_whole/CMakeLists.txt
@@ -3,6 +3,9 @@ PROJECT(corpus2_whole)
 find_package(LibXML++ REQUIRED QUIET)
 include_directories(${LibXML++_INCLUDE_DIRS})
 include_directories(${Boost_INCLUDE_DIRS})
+link_directories(${ICU_LIBRARY_DIRS})
+link_directories(${Boost_LIBRARY_DIRS})
+include_directories(${ICU_INCLUDE_DIR})
 link_directories(${LibXML++_LIBRARY_DIRS})
 set(LIBS ${LIBS} ${LibXML++_LIBRARIES})
 
@@ -30,7 +33,7 @@ endif(CORPUS2_BUILD_POLIQARP)
 file(GLOB_RECURSE INCS "*.h")
 
 if(WIN32)
-	add_library(corpus2_whole STATIC ${libcorpus2_whole_SRC} ${INCS})
+	add_library(corpus2_whole SHARED ${libcorpus2_whole_SRC} ${INCS})
 else(WIN32)
 	add_library(corpus2_whole SHARED ${libcorpus2_whole_SRC} ${INCS})
 endif(WIN32)
diff --git a/libpwrutils/CMakeLists.txt b/libpwrutils/CMakeLists.txt
index 05192d0..30c8042 100644
--- a/libpwrutils/CMakeLists.txt
+++ b/libpwrutils/CMakeLists.txt
@@ -43,7 +43,7 @@ if(WIN32)
 # 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})
+	add_library(pwrutils SHARED ${libpwrutils_STAT_SRC} ${INCS})
 else(WIN32)
 	add_library(pwrutils SHARED ${libpwrutils_STAT_SRC} ${INCS})
 endif(WIN32)
-- 
GitLab