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

poprawki pod win

parent 8d58c6f9
Branches
No related merge requests found
......@@ -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 "*****************************************************")
......
......@@ -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
......
......@@ -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)
......
......@@ -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})
......
......@@ -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)
......
......@@ -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 */
......
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment