You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2012/12/21 17:52:37 UTC
svn commit: r1425026 - in
/qpid/proton/branches/jni-binding/proton-c/bindings: CMakeLists.txt
java/CMakeLists.txt
Author: kwall
Date: Fri Dec 21 16:52:37 2012
New Revision: 1425026
URL: http://svn.apache.org/viewvc?rev=1425026&view=rev
Log:
NO-JIRA: cmake java improvements
1) Support older versions of cmake (such as v2.6)
2) As swig does not create its outputdir, create it before performing the swig-jni step
Modified:
qpid/proton/branches/jni-binding/proton-c/bindings/CMakeLists.txt
qpid/proton/branches/jni-binding/proton-c/bindings/java/CMakeLists.txt
Modified: qpid/proton/branches/jni-binding/proton-c/bindings/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/CMakeLists.txt?rev=1425026&r1=1425025&r2=1425026&view=diff
==============================================================================
--- qpid/proton/branches/jni-binding/proton-c/bindings/CMakeLists.txt (original)
+++ qpid/proton/branches/jni-binding/proton-c/bindings/CMakeLists.txt Fri Dec 21 16:52:37 2012
@@ -60,12 +60,14 @@ endif (PERLLIBS_FOUND)
# Prerequisites for Java
find_package( Java )
-if (JAVA_FOUND)
+# we have to check two variables below because older versions of cmake (such as v2.6)
+# include FindJava.cmake and FindJNI.cmake modules that don't set XXX_FOUND
+if (JAVA_FOUND OR JAVA_RUNTIME)
find_package( JNI )
- if (JNI_FOUND)
+ if (JNI_FOUND OR JNI_LIBRARIES)
set (DEFAULT_JAVA ON)
- endif (JNI_FOUND)
-endif (JAVA_FOUND)
+ endif ()
+endif ()
# Shouldn't need to modify below here when adding new language binding
foreach(BINDING ${BINDINGS})
Modified: qpid/proton/branches/jni-binding/proton-c/bindings/java/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/branches/jni-binding/proton-c/bindings/java/CMakeLists.txt?rev=1425026&r1=1425025&r2=1425026&view=diff
==============================================================================
--- qpid/proton/branches/jni-binding/proton-c/bindings/java/CMakeLists.txt (original)
+++ qpid/proton/branches/jni-binding/proton-c/bindings/java/CMakeLists.txt Fri Dec 21 16:52:37 2012
@@ -26,3 +26,5 @@ swig_add_module(protonjni java java.i)
include_directories(${JNI_INCLUDE_DIRS})
swig_link_libraries(protonjni ${BINDING_DEPS} ${JNI_LIBRARIES} )
+add_custom_target(protonjnioutdir ${CMAKE_COMMAND} -E make_directory ${CMAKE_SWIG_OUTDIR} COMMENT "Creating outputdir for proton jni sources")
+add_dependencies(protonjni protonjnioutdir)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org