zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #09949
[Merge] lp:~zorba-coders/zorba/util-jvm-export-std-lib into lp:zorba/util-jvm-module
Chris Hillery has proposed merging lp:~zorba-coders/zorba/util-jvm-export-std-lib into lp:zorba/util-jvm-module.
Requested reviews:
Chris Hillery (ceejatec)
Matthias Brantner (matthias-brantner)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/util-jvm-export-std-lib/+merge/106347
https://code.launchpad.net/~zorba-coders/zorba/extra-module-libs/+merge/106346 will need to be merged to the trunk before this change will work.
--
https://code.launchpad.net/~zorba-coders/zorba/util-jvm-export-std-lib/+merge/106347
Your team Zorba Coders is subscribed to branch lp:zorba/util-jvm-module.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-05-09 10:03:52 +0000
+++ CMakeLists.txt 2012-05-18 10:40:24 +0000
@@ -32,9 +32,6 @@
IF (JNI_FOUND)
SET (UTIL_JVM_VERSION 1.0)
- #ENABLE_TESTING ()
- #INCLUDE (CTest)
-
SET_CMAKE_MODULE_PATH ()
FIND_PACKAGE (Zorba REQUIRED HINTS "${ZORBA_BUILD_DIR}")
@@ -47,9 +44,7 @@
# Set up a "use file" for other modules to import
SET (ZORBA_PROJECT_USE_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/config/UtilJavaUse.cmake")
-
ADD_SUBDIRECTORY ("src")
- #ADD_TEST_DIRECTORY("${PROJECT_SOURCE_DIR}/test")
DONE_DECLARING_ZORBA_URIS ()
ELSE (JNI_FOUND)
=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt 2012-03-29 19:18:39 +0000
+++ src/CMakeLists.txt 2012-05-18 10:40:24 +0000
@@ -26,6 +26,17 @@
INCLUDE_DIRECTORIES (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})
INCLUDE_DIRECTORIES (${JAVA_INCLUDE_PATH})
+# For now, we still have a module, but it actually does nothing at all.
DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/util-jvm"
- VERSION 1.0 FILE "util-jvm.xq" LINK_LIBRARIES "${JAVA_JVM_LIBRARY}")
-
+ VERSION 1.0 FILE "util-jvm.xq")
+
+# The important stuff is the library, which we install in Zorba's
+# default lib directory.
+ADD_LIBRARY(util-jvm SHARED util-jvm.cpp JavaVMSingleton.cpp)
+TARGET_LINK_LIBRARIES(util-jvm "${JAVA_JVM_LIBRARY}")
+INSTALL(TARGETS util-jvm DESTINATION lib)
+
+# Set this in the parent scope so it will be put into our Config.cmake file.
+# As with many other things, this doesn't work when the module is installed.
+GET_TARGET_PROPERTY(_lib_loc util-jvm LOCATION)
+SET(ZORBA_PROJECT_LIBRARIES "${_lib_loc}" PARENT_SCOPE)
=== renamed file 'src/util-jvm.xq.src/JavaVMSingleton.cpp' => 'src/JavaVMSingleton.cpp'
=== renamed file 'src/util-jvm.xq.src/util-jvm.cpp' => 'src/util-jvm.cpp'
=== removed directory 'src/util-jvm.xq.src'
Follow ups