From 72c34cdb8f1a31ff0478e248ada5664c8b82b7d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 13 Oct 2015 09:27:43 +0100 Subject: [PATCH] dropped packages --- CMakeLists.txt | 2 +- packages/jpl/CMakeLists.txt | 68 ++++++++++++++++++++++ packages/jpl/src/java/CMakeLists.txt | 84 ++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 packages/jpl/CMakeLists.txt create mode 100644 packages/jpl/src/java/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 903d3e61e..19bce7465 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -418,7 +418,7 @@ add_subdirectory (packages/CLPBN) add_subdirectory (packages/CLPBN/horus) -add_subdirectory (packages/Problog) +add_subdirectory (packages/ProbLog) add_subdirectory (packages/raptor) diff --git a/packages/jpl/CMakeLists.txt b/packages/jpl/CMakeLists.txt new file mode 100644 index 000000000..21c5ac6eb --- /dev/null +++ b/packages/jpl/CMakeLists.txt @@ -0,0 +1,68 @@ +#CHECK: JavaLibs + +set (JPL_SOURCES + src/c/jpl.c) + +macro_optional_find_package(Java ON) +find_package(Java COMPONENTS Development) +#find_package(Java COMPONENTS Runtime) +macro_log_feature (Java_Development_FOUND "Java" + "Use Java System" + "http://www.java.org" FALSE) + +if (Java_Development_FOUND) + # Java_JAVA_EXECUTABLE = the full path to the Java runtime + # Java_JAVAC_EXECUTABLE = the full path to the Java compiler + # Java_JAVAH_EXECUTABLE = the full path to the Java header generator + # Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator + # Java_JAR_EXECUTABLE = the full path to the Java archiver + # Java_VERSION_STRING = Version of java found, eg. 1.6.0_12 + # Java_VERSION_MAJOR = The major version of the package found. + # Java_VERSION_MINOR = The minor version of the package found. + # Java_VERSION_PATCH = The patch version of the package found. + # Java_VERSION_TWEAK = The tweak version of the package found (after '_') + # Java_VERSION = This is set to: $major.$minor.$patch(.$tweak) + # JAVA_LIBRARIES - path to the java library + # JAVA_INCLUDE_PATH - path to where Java.h is found (deprecated) + # JAVA_INCLUDE_DIRS - path to where Java.h is found + # JAVA_DEBUG_LIBRARIES - path to the debug library (deprecated) + # JAVALIBS_VERSION_STRING - version of the Java libs found (since CMake 2.8.8) + # + # + # + # The Java_ADDITIONAL_VERSIONS variable can be used to specify a list + # of version numbers that should be taken into account when searching + # for Java. You need to set this variable before calling + # find_package(JavaLibs). + # + macro_optional_find_package(JNI ON) + # JNI_INCLUDE_DIRS = the include dirs to use + # JNI_LIBRARIES = the libraries to use + # JNI_FOUND = TRUE if JNI headers and libraries were found. + # JAVA_AWT_LIBRARY = the path to the jawt library + # JAVA_JVM_LIBRARY = the path to the jvm library + # JAVA_INCLUDE_PATH = the include path to jni.h + # JAVA_INCLUDE_PATH2 = the include path to jni_md.h + # JAVA_AWT_INCLUDE_PATH = the include path to jawt.h + + add_library (jplYap SHARED src/c/jpl.c) + + add_subdirectory (src/java) + + include_directories (${JAVA_INCLUDE_DIRS} ${JNI_INCLUDE_DIRS}) + + target_link_libraries(jplYap libYap ${JAVA_LIBRARIES} ${JNI_LIBRARIES}) + + set_target_properties(jplYap PROPERTIES + OUTPUT_NAME jpl ) + + install(TARGETS jplYap + LIBRARY DESTINATION ${dlls} + ) + + install(FILES jpl.pl + DESTINATION ${libpl} + ) + + +endif (Java_Development_FOUND) diff --git a/packages/jpl/src/java/CMakeLists.txt b/packages/jpl/src/java/CMakeLists.txt new file mode 100644 index 000000000..428b779d6 --- /dev/null +++ b/packages/jpl/src/java/CMakeLists.txt @@ -0,0 +1,84 @@ +include ( UseJava) + +# add_jar(target_name +# [SOURCES] source1 [source2 ...] [resource1 ...] +# [INCLUDE_JARS jar1 [jar2 ...]] +# [ENTRY_POINT entry] +# [VERSION version] +# [OUTPUT_NAME name] +# [OUTPUT_DIR dir] +# ) +# +# This command creates a .jar. It compiles the given +# source files (source) and adds the given resource files (resource) to +# the jar file. If only resource files are given then just a jar file +# is created. The list of include jars are added to the classpath when +# compiling the java sources and also to the dependencies of the target. +# INCLUDE_JARS also accepts other target names created by add_jar. For +# backwards compatibility, jar files listed as sources are ignored (as +# they have been since the first version of this module). +# +# The default OUTPUT_DIR can also be changed by setting the variable +# CMAKE_JAVA_TARGET_OUTPUT_DIR. +# + + set (CLS + jpl/Atom.java + jpl/Compound.java + jpl/Float.java + jpl/Integer.java + jpl/JRef.java + jpl/JPLException.java + jpl/JPL.java + jpl/PrologException.java + jpl/Query.java + jpl/Term.java + jpl/Util.java + jpl/Variable.java + jpl/Version.java + ) + +set (FLI + jpl/fli/atom_t.java + jpl/fli/BooleanHolder.java + jpl/fli/DoubleHolder.java + jpl/fli/engine_t.java + jpl/fli/fid_t.java + jpl/fli/functor_t.java + jpl/fli/IntHolder.java + jpl/fli/Int64Holder.java + jpl/fli/LongHolder.java + jpl/fli/module_t.java + jpl/fli/ObjectHolder.java + jpl/fli/PointerHolder.java + jpl/fli/predicate_t.java + jpl/fli/Prolog.java + jpl/fli/qid_t.java + jpl/fli/StringHolder.java + jpl/fli/term_t.java + ) + +set (TEST + jpl/test/Family.java + jpl/test/FetchBigTree.java + jpl/test/FetchLongList.java + jpl/test/Ga2.java + jpl/test/Ga.java + jpl/test/Garbo.java + jpl/test/Masstest.java + jpl/test/MaxObjects.java + jpl/test/ShadowA.java + jpl/test/ShadowB.java + jpl/test/SyntaxError.java + jpl/test/Test.java + jpl/test/TestJUnit.java + jpl/test/TestOLD.java + ) + +set ( JPLJAVA ${CLS} ${FLI} ) + +add_jar(jpl + SOURCES ${JPLJAVA} + OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) + +install_jar(jpl ${libpl} )