Skip to content
Snippets Groups Projects
Commit 1d026907 authored by Alexis Nasr's avatar Alexis Nasr
Browse files

Merge branch 'master' into alexis

parents 0442bfb6 53eea287
Branches
No related tags found
No related merge requests found
......@@ -3,10 +3,15 @@ project(macaon2)
find_package(FLEX)
# for gcc < 5.3
#add_definitions("-Wall -std=gnu11" )
add_definitions("-Wall" )
if (${CMAKE_C_COMPILER_VERSION} VERSION_LESS 5.3)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11")
# better, but needs CMake >= 3.0
#set_property(GLOBAL PROPERTY CXX_STANDARD 11)
#set_property(GLOBAL PROPERTY C_STANDARD 11)
endif()
# activate with cmake -DMACA_EXPORT=TRUE
# to use macaon in python/java (with swig)
if(MACA_EXPORT)
......
......@@ -16,8 +16,15 @@ The basic procedure to build and install macaon from sources is the following.
If you want to install macaon locally, you can specify the install path with :
cmake -DCMAKE_INSTALL_PREFIX:PATH=/absolute/path/to/macaon_install_dir ..
If you want to create a library to use in python
If you want to create a library to use in python or java
cmake -DMACA_EXPORT=TRUE ..
you need to install the following packages on Ubuntu
sudo apt-get install swig
sudo apt-get install libpython2.7-dev
sudo apt-get install openjdk-8-jdk
or
sudo apt-get install openjdk-7-jdk
- Build the sources with:
make
......
if(MACA_EXPORT)
FIND_PACKAGE(SWIG 3.0)
FIND_PACKAGE(SWIG)
if (SWIG_FOUND)
FIND_PACKAGE(PythonLibs)
......@@ -37,7 +37,7 @@ if(MACA_EXPORT)
FIND_PACKAGE(Java 1.7)
FIND_PACKAGE(JNI)
if (JNI_FOUND AND Java_FOUND)
if (JNI_FOUND AND (Java_FOUND OR JAVA_FOUND))
set(JAVA_MODULE_NAME Macaon)
set(JAVA_LIBRARY MacaonJava)
set(JAVA_CLASS_TAGGER MacaonTransTagger)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment