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

Merge branch 'johannes' into 'master'

Johannes: modif  of  cmake configuration to be able to compile on Ubuntu 14.04

modif  of  cmake configuration to be able to compile on Ubuntu 14.04

See merge request !6
parents 8c12e031 5d192145
No related branches found
No related tags found
1 merge request!6Johannes: modif of cmake configuration to be able to compile on Ubuntu 14.04
...@@ -3,10 +3,15 @@ project(macaon2) ...@@ -3,10 +3,15 @@ project(macaon2)
find_package(FLEX) find_package(FLEX)
# for gcc < 5.3
#add_definitions("-Wall -std=gnu11" )
add_definitions("-Wall" ) 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 # activate with cmake -DMACA_EXPORT=TRUE
# to use macaon in python/java (with swig) # to use macaon in python/java (with swig)
if(MACA_EXPORT) if(MACA_EXPORT)
......
...@@ -16,8 +16,15 @@ The basic procedure to build and install macaon from sources is the following. ...@@ -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 : 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 .. 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 .. 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: - Build the sources with:
make make
......
if(MACA_EXPORT) if(MACA_EXPORT)
FIND_PACKAGE(SWIG 3.0) FIND_PACKAGE(SWIG)
if (SWIG_FOUND) if (SWIG_FOUND)
FIND_PACKAGE(PythonLibs) FIND_PACKAGE(PythonLibs)
...@@ -37,7 +37,7 @@ if(MACA_EXPORT) ...@@ -37,7 +37,7 @@ if(MACA_EXPORT)
FIND_PACKAGE(Java 1.7) FIND_PACKAGE(Java 1.7)
FIND_PACKAGE(JNI) 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_MODULE_NAME Macaon)
set(JAVA_LIBRARY MacaonJava) set(JAVA_LIBRARY MacaonJava)
set(JAVA_CLASS_TAGGER MacaonTransTagger) 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