Skip to content
Snippets Groups Projects
Commit e46226b3 authored by Bartosz Broda's avatar Bartosz Broda
Browse files

poprawki pod win

parent 8d58c6f9
No related branches found
No related tags found
No related merge requests found
...@@ -83,9 +83,12 @@ add_subdirectory(libpwrutils) ...@@ -83,9 +83,12 @@ add_subdirectory(libpwrutils)
add_subdirectory(libcorpus2) add_subdirectory(libcorpus2)
add_subdirectory(libcorpus2_whole) add_subdirectory(libcorpus2_whole)
add_subdirectory(corpus2tools) add_subdirectory(corpus2tools)
if(UNIX)
add_subdirectory(tests) add_subdirectory(tests)
endif(UNIX)
if(CORPUS2_BUILD_SWIG) if(UNIX AND CORPUS2_BUILD_SWIG)
FIND_PACKAGE(SWIG) FIND_PACKAGE(SWIG)
if(SWIG_FOUND) if(SWIG_FOUND)
message(STATUS "SWIG found, Python wrappers will be built") message(STATUS "SWIG found, Python wrappers will be built")
...@@ -95,7 +98,7 @@ if(CORPUS2_BUILD_SWIG) ...@@ -95,7 +98,7 @@ if(CORPUS2_BUILD_SWIG)
endif(SWIG_FOUND) endif(SWIG_FOUND)
else() else()
message(STATUS "Not building SWIG Python wrappers") message(STATUS "Not building SWIG Python wrappers")
endif(CORPUS2_BUILD_SWIG) endif(UNIX AND CORPUS2_BUILD_SWIG)
if(NOT CORPUS2_BUILD_POLIQARP) if(NOT CORPUS2_BUILD_POLIQARP)
message(STATUS "*****************************************************") message(STATUS "*****************************************************")
......
...@@ -9,13 +9,16 @@ endif (Libedit_FOUND) ...@@ -9,13 +9,16 @@ endif (Libedit_FOUND)
include_directories( ${CMAKE_SOURCE_DIR} ) include_directories( ${CMAKE_SOURCE_DIR} )
include_directories(${corpus2_BINARY_DIR}/include) 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}) include_directories(${Boost_INCLUDE_DIR})
link_directories(${Boost_LIBRARY_DIRS}) 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) if(UNIX)
install(TARGETS tagset-tool install(TARGETS tagset-tool
......
...@@ -21,6 +21,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) ...@@ -21,6 +21,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/)
find_package(ICU REQUIRED QUIET) find_package(ICU REQUIRED QUIET)
include_directories(${ICU_INCLUDE_DIR}) include_directories(${ICU_INCLUDE_DIR})
include_directories(${Boost_INCLUDE_DIR})
link_directories(${ICU_LIBRARY_DIRS}) link_directories(${ICU_LIBRARY_DIRS})
set(LIBS ${LIBS} icuuc icuio) set(LIBS ${LIBS} icuuc icuio)
......
...@@ -2,6 +2,7 @@ PROJECT(corpus2_whole) ...@@ -2,6 +2,7 @@ PROJECT(corpus2_whole)
find_package(LibXML++ REQUIRED QUIET) find_package(LibXML++ REQUIRED QUIET)
include_directories(${LibXML++_INCLUDE_DIRS}) include_directories(${LibXML++_INCLUDE_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${LibXML++_LIBRARY_DIRS}) link_directories(${LibXML++_LIBRARY_DIRS})
set(LIBS ${LIBS} ${LibXML++_LIBRARIES}) set(LIBS ${LIBS} ${LibXML++_LIBRARIES})
......
...@@ -19,6 +19,7 @@ include_directories( ${CMAKE_SOURCE_DIR} ) ...@@ -19,6 +19,7 @@ include_directories( ${CMAKE_SOURCE_DIR} )
find_package(ICU REQUIRED) find_package(ICU REQUIRED)
include_directories(${ICU_INCLUDE_DIR}) include_directories(${ICU_INCLUDE_DIR})
include_directories(${Boost_INCLUDE_DIR})
link_directories(${ICU_LIBRARY_DIRS}) link_directories(${ICU_LIBRARY_DIRS})
set(LIBS ${LIBS} icuuc icuio) set(LIBS ${LIBS} icuuc icuio)
......
...@@ -13,7 +13,9 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -13,7 +13,9 @@ or FITNESS FOR A PARTICULAR PURPOSE.
See the LICENCE, COPYING.LESSER and COPYING files for more details. See the LICENCE, COPYING.LESSER and COPYING files for more details.
*/ */
#include <libpwrutils/plugin.h> #include <libpwrutils/plugin.h>
#ifdef __UNIX__
#include <dlfcn.h> #include <dlfcn.h>
#endif
#include <iostream> #include <iostream>
namespace PwrNlp { namespace PwrNlp {
...@@ -30,6 +32,7 @@ std::string make_soname(const std::string &scope, const std::string &name) ...@@ -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) bool load(const std::string &scope, const std::string &name, bool quiet)
{ {
#ifdef __UNIX__
std::string soname = make_soname(scope, name); std::string soname = make_soname(scope, name);
// std::cerr << "PLUGIN LOAD " << scope << " " << name << " " << soname << "\n"; // std::cerr << "PLUGIN LOAD " << scope << " " << name << " " << soname << "\n";
// first check if the plugin was already loaded // first check if the plugin was already loaded
...@@ -65,12 +68,14 @@ bool load(const std::string &scope, const std::string &name, bool quiet) ...@@ -65,12 +68,14 @@ bool load(const std::string &scope, const std::string &name, bool quiet)
if (!quiet) { if (!quiet) {
std::cerr << "Loaded " << scope << " plugin '" << name << "'\n"; std::cerr << "Loaded " << scope << " plugin '" << name << "'\n";
} }
#endif
return true; return true;
} }
bool load_check(const std::string &scope, const std::string &name, bool quiet, bool load_check(const std::string &scope, const std::string &name, bool quiet,
boost::function<size_t (void)> counter, const std::string &what) boost::function<size_t (void)> counter, const std::string &what)
{ {
#ifdef __UNIX__
size_t before = counter(); size_t before = counter();
if (load(scope, name, quiet)) { if (load(scope, name, quiet)) {
size_t after = counter(); size_t after = counter();
...@@ -86,6 +91,9 @@ bool load_check(const std::string &scope, const std::string &name, bool quiet, ...@@ -86,6 +91,9 @@ bool load_check(const std::string &scope, const std::string &name, bool quiet,
} else { } else {
return false; return false;
} }
#else
return true;
#endif
} }
} /* end ns Plugin */ } /* end ns Plugin */
......
...@@ -18,6 +18,7 @@ INCLUDE(${SWIG_USE_FILE}) ...@@ -18,6 +18,7 @@ INCLUDE(${SWIG_USE_FILE})
FIND_PACKAGE(LibXML++ REQUIRED QUIET) FIND_PACKAGE(LibXML++ REQUIRED QUIET)
include_directories(${LibXML++_INCLUDE_DIRS}) include_directories(${LibXML++_INCLUDE_DIRS})
include_directories(${Boost_INCLUDE_DIRS})
find_package(PythonLibs) find_package(PythonLibs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment