diff --git a/CMakeLists.txt b/CMakeLists.txt index 51b499cc95a477d87caa88e5fd0074363ac5826d..ebf6430b14d51836e71f3f95e6c5f652cd7140c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,9 +83,12 @@ add_subdirectory(libpwrutils) add_subdirectory(libcorpus2) add_subdirectory(libcorpus2_whole) add_subdirectory(corpus2tools) -add_subdirectory(tests) -if(CORPUS2_BUILD_SWIG) +if(UNIX) + add_subdirectory(tests) +endif(UNIX) + +if(UNIX AND CORPUS2_BUILD_SWIG) FIND_PACKAGE(SWIG) if(SWIG_FOUND) message(STATUS "SWIG found, Python wrappers will be built") @@ -95,7 +98,7 @@ if(CORPUS2_BUILD_SWIG) endif(SWIG_FOUND) else() message(STATUS "Not building SWIG Python wrappers") -endif(CORPUS2_BUILD_SWIG) +endif(UNIX AND CORPUS2_BUILD_SWIG) if(NOT CORPUS2_BUILD_POLIQARP) message(STATUS "*****************************************************") diff --git a/corpus2tools/CMakeLists.txt b/corpus2tools/CMakeLists.txt index 40508eea415f557ba9d7ed2a93df3b2e003ace01..cdfc0973b1da765d28c3482174224860868f8ea6 100644 --- a/corpus2tools/CMakeLists.txt +++ b/corpus2tools/CMakeLists.txt @@ -9,13 +9,16 @@ endif (Libedit_FOUND) include_directories( ${CMAKE_SOURCE_DIR} ) include_directories(${corpus2_BINARY_DIR}/include) +set(LIBS ${LIBS} ${ICU_LIBRARIES}) -add_executable( tagset-tool tagset-tool.cpp ) -target_link_libraries ( tagset-tool corpus2 pwrutils ${Boost_LIBRARIES} ${LIBS}) +include_directories(${ICU_INCLUDE_DIR}) include_directories(${Boost_INCLUDE_DIR}) link_directories(${Boost_LIBRARY_DIRS}) +link_directories(${ICU_LIBRARY_DIRS}) +add_executable( tagset-tool tagset-tool.cpp ) +target_link_libraries ( tagset-tool corpus2 pwrutils ${Boost_LIBRARIES} ${LIBS}) if(UNIX) install(TARGETS tagset-tool diff --git a/libcorpus2/CMakeLists.txt b/libcorpus2/CMakeLists.txt index ad7900137f2e7ea296900b654c6ab5bdf12300e0..7f507e772867a80b13cd5de44ff0b0a8fd3fb756 100644 --- a/libcorpus2/CMakeLists.txt +++ b/libcorpus2/CMakeLists.txt @@ -21,6 +21,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) find_package(ICU REQUIRED QUIET) include_directories(${ICU_INCLUDE_DIR}) +include_directories(${Boost_INCLUDE_DIR}) link_directories(${ICU_LIBRARY_DIRS}) set(LIBS ${LIBS} icuuc icuio) diff --git a/libcorpus2_whole/CMakeLists.txt b/libcorpus2_whole/CMakeLists.txt index 9606df2ed4866e8f67be9ad315bb1ad4f5c83037..1f410bdafb052825f7d35336dcb46b9a86176fb5 100755 --- a/libcorpus2_whole/CMakeLists.txt +++ b/libcorpus2_whole/CMakeLists.txt @@ -2,6 +2,7 @@ PROJECT(corpus2_whole) find_package(LibXML++ REQUIRED QUIET) include_directories(${LibXML++_INCLUDE_DIRS}) +include_directories(${Boost_INCLUDE_DIRS}) link_directories(${LibXML++_LIBRARY_DIRS}) set(LIBS ${LIBS} ${LibXML++_LIBRARIES}) diff --git a/libpwrutils/CMakeLists.txt b/libpwrutils/CMakeLists.txt index 69a991253aa4c794a5f71ec9cc871f380ca65652..05192d00cd8089491c4c243d5ed1939485583f6e 100644 --- a/libpwrutils/CMakeLists.txt +++ b/libpwrutils/CMakeLists.txt @@ -19,6 +19,7 @@ include_directories( ${CMAKE_SOURCE_DIR} ) find_package(ICU REQUIRED) include_directories(${ICU_INCLUDE_DIR}) +include_directories(${Boost_INCLUDE_DIR}) link_directories(${ICU_LIBRARY_DIRS}) set(LIBS ${LIBS} icuuc icuio) diff --git a/libpwrutils/plugin.cpp b/libpwrutils/plugin.cpp index b0700ceea9c4d061266703034195639631c84780..3c129a8fd699f55da7fb651366c96b0981f0c3fc 100644 --- a/libpwrutils/plugin.cpp +++ b/libpwrutils/plugin.cpp @@ -13,7 +13,9 @@ or FITNESS FOR A PARTICULAR PURPOSE. See the LICENCE, COPYING.LESSER and COPYING files for more details. */ #include <libpwrutils/plugin.h> +#ifdef __UNIX__ #include <dlfcn.h> +#endif #include <iostream> namespace PwrNlp { @@ -30,6 +32,7 @@ std::string make_soname(const std::string &scope, const std::string &name) bool load(const std::string &scope, const std::string &name, bool quiet) { +#ifdef __UNIX__ std::string soname = make_soname(scope, name); // std::cerr << "PLUGIN LOAD " << scope << " " << name << " " << soname << "\n"; // first check if the plugin was already loaded @@ -65,12 +68,14 @@ bool load(const std::string &scope, const std::string &name, bool quiet) if (!quiet) { std::cerr << "Loaded " << scope << " plugin '" << name << "'\n"; } +#endif return true; } bool load_check(const std::string &scope, const std::string &name, bool quiet, boost::function<size_t (void)> counter, const std::string &what) { +#ifdef __UNIX__ size_t before = counter(); if (load(scope, name, quiet)) { size_t after = counter(); @@ -86,6 +91,9 @@ bool load_check(const std::string &scope, const std::string &name, bool quiet, } else { return false; } +#else + return true; +#endif } } /* end ns Plugin */ diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index dd7bb2cdbcc4a500c7e0c717567973cccfc90b57..7c5be20bb101e23333c943cda9fe93c4d2091d98 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -18,6 +18,7 @@ INCLUDE(${SWIG_USE_FILE}) FIND_PACKAGE(LibXML++ REQUIRED QUIET) include_directories(${LibXML++_INCLUDE_DIRS}) +include_directories(${Boost_INCLUDE_DIRS}) find_package(PythonLibs)