diff --git a/.travis.yml b/.travis.yml index 835f7297..f37a1572 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ script: - sudo make install - sudo ldconfig # Build/install UPM - - cd $UPM_ROOT && mkdir $UPM_BUILD && cd $_ && cmake -DNODE_ROOT_DIR:PATH="${NODE_ROOT_DIR}" -DBUILDSWIGJAVA=$BUILDJAVA -DBUILDEXAMPLES=ON -DBUILDJAVAEXAMPLES=$BUILDJAVA -DBUILDTESTS=ON -DBUILDFTI=ON .. && sudo make install && sudo ldconfig && ctest --output-on-failure -E examplenames_js + - cd $UPM_ROOT && mkdir $UPM_BUILD && cd $_ && cmake -DNODE_ROOT_DIR:PATH="${NODE_ROOT_DIR}" -DBUILDSWIGJAVA=$BUILDJAVA -DBUILDEXAMPLES=ON -DBUILDTESTS=ON -DBUILDFTI=ON .. && sudo make install && sudo ldconfig && ctest --output-on-failure -E examplenames_js addons: apt: sources: diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dbb84e0..4482ac9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,7 @@ option (BUILDFTI "Build Funtion Table Interface (FTI) in C sensor libraries" OFF option (BUILDSWIGPYTHON "Build swig python modules" ON) option (BUILDSWIGNODE "Build swig node modules" ON) option (BUILDSWIGJAVA "Build swig java modules" OFF) -option (BUILDEXAMPLES "Build C/C++ example binaries" OFF) -option (BUILDJAVAEXAMPLES "Build java example jars" OFF) +option (BUILDEXAMPLES "Build C/C++/JAVA examples" OFF) option (IPK "Generate IPK using CPack" OFF) option (RPM "Generate RPM using CPack" OFF) option (NPM "Generate NPM/GYP tarballs" OFF) @@ -417,7 +416,8 @@ if(BUILDEXAMPLES) endif(BUILDCPP) endif() -if(BUILDJAVAEXAMPLES) +# Build java examples +if(BUILDSWIGJAVA AND BUILDEXAMPLES) add_subdirectory (examples/java) endif() diff --git a/docs/building.md b/docs/building.md index 94c32aee..ca930186 100644 --- a/docs/building.md +++ b/docs/building.md @@ -80,14 +80,10 @@ Building documentation ~~~~~~~~~~~~~ -DBUILDDOC=ON ~~~~~~~~~~~~~ -Build C++ example binaries +Build C/C++/JAVA examples ~~~~~~~~~~~~~ -DBUILDEXAMPLES=ON ~~~~~~~~~~~~~ -Build Java examples -~~~~~~~~~~~~~ --DBUILDJAVAEXAMPLES=ON -~~~~~~~~~~~~~ If you intend to turn on all the options and build everything at once (C++, Java, Node, Python and Documentation) you will have to edit the