Rodolfo Ochoa has proposed merging lp:~zorba-coders/zorba/bug1040564 into 
lp:zorba.

Requested reviews:
  Rodolfo Ochoa (rodolfo-ochoa)
Related bugs:
  Bug #1040564 in Zorba: "libzorba_api not provided for OS X"
  https://bugs.launchpad.net/zorba/+bug/1040564

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug1040564/+merge/157500
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug1040564/+merge/157500
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'doc/csharp/CMakeLists.txt'
--- doc/csharp/CMakeLists.txt	2012-07-20 21:21:21 +0000
+++ doc/csharp/CMakeLists.txt	2013-04-06 00:58:24 +0000
@@ -14,6 +14,9 @@
 
 ZORBA_DOXYGEN ("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" "csharpdocs")
 
+#Required for some installers
+FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
+
 IF (DOXYGEN_FOUND)
   ADD_DEPENDENCIES (doc "csharpdocs")
 

=== modified file 'doc/xqj/CMakeLists.txt'
--- doc/xqj/CMakeLists.txt	2012-03-26 23:06:10 +0000
+++ doc/xqj/CMakeLists.txt	2013-04-06 00:58:24 +0000
@@ -14,6 +14,9 @@
 
 ZORBA_DOXYGEN ("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" "xqjdocs")
 
+#Required for some installers
+FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
+
 IF (DOXYGEN_FOUND)
   ADD_DEPENDENCIES (doc "xqjdocs")
 

=== modified file 'swig/java/CMakeLists.txt'
--- swig/java/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ swig/java/CMakeLists.txt	2013-04-06 00:58:24 +0000
@@ -32,21 +32,21 @@
 
   SET( CMAKE_SWIG_FLAGS -package org.zorbaxquery.api)
 
-  SWIG_ADD_MODULE( lib_zorba_java_api java zorba_api.i )
-  SWIG_LINK_LIBRARIES( lib_zorba_java_api zorba_simplestore ${JAVA_LIBRARY} )
+  SWIG_ADD_MODULE( zorba_api_java java zorba_api.i )
+  SWIG_LINK_LIBRARIES( zorba_api_java zorba_simplestore ${JAVA_LIBRARY} )
   IF (WIN32)
-    SET_TARGET_PROPERTIES( lib_zorba_java_api PROPERTIES PROJECT_LABEL "Java" OUTPUT_NAME "zorba_api" FOLDER "APIs")
+    SET_TARGET_PROPERTIES( zorba_api_java PROPERTIES PROJECT_LABEL "Java" OUTPUT_NAME "zorba_api" FOLDER "APIs")
   ELSE (WIN32)
-    SET_TARGET_PROPERTIES( lib_zorba_java_api PROPERTIES OUTPUT_NAME "libzorba_api")
+    SET_TARGET_PROPERTIES( zorba_api_java PROPERTIES OUTPUT_NAME "libzorba_api")
   ENDIF (WIN32)
   IF ( APPLE )
-    SET_TARGET_PROPERTIES( lib_zorba_java_api PROPERTIES SUFFIX .jnilib )
+    SET_TARGET_PROPERTIES( zorba_api_java PROPERTIES SUFFIX .jnilib OUTPUT_NAME "${ZORBA_SWIG_LIB_PREFIX}zorba_api")
   ENDIF ( APPLE )
 
   # The following fix was added because of the changes in CMake 2.8, which have the
   # result of naming the java binding library "liblibzorba_api.so" instead of "libzorba_api.so"
   IF (LINUX OR CYGWIN OR APPLE)
-    SET_TARGET_PROPERTIES( lib_zorba_java_api PROPERTIES PREFIX "" )
+    SET_TARGET_PROPERTIES( zorba_api_java PROPERTIES PREFIX "" )
   ENDIF (LINUX OR CYGWIN OR APPLE)
 
   FILE(GLOB ZORBA_API_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../" "${CMAKE_CURRENT_SOURCE_DIR}/../*.h")
@@ -60,7 +60,7 @@
     CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/${ZORBA_JAVA_EXTRA}"  "${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_JAVA_EXTRA}")
   ENDFOREACH(ZORBA_JAVA_EXTRA ${ZORBA_JAVA_EXTRAS})
   
-  ADD_CUSTOM_COMMAND(TARGET lib_zorba_java_api
+  ADD_CUSTOM_COMMAND(TARGET zorba_api_java
                  POST_BUILD
                  COMMAND cmake -E echo "Compiling Java files..."
                  COMMAND ${Java_JAVAC_EXECUTABLE} *.java -d ${CMAKE_CURRENT_BINARY_DIR}
@@ -78,13 +78,13 @@
   SET(ZORBA_JAVA_JAR ${CMAKE_CURRENT_BINARY_DIR}/zorba_api.jar PARENT_SCOPE )
 
   IF ( APPLE )
-    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_SWIG_LIB_PREFIX}libzorba_api.jnilib DESTINATION ${JAVA_SITEARCH_DIR})
-		INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zorba_api.jar DESTINATION ${JAVA_SITEARCH_DIR})
+    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_SWIG_LIB_PREFIX}zorba_api.jnilib DESTINATION ${JAVA_SITEARCH_DIR})
+    INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zorba_api.jar DESTINATION ${JAVA_SITEARCH_DIR})
   ELSE ( APPLE )
-		IF(NOT WIN32)
+    IF(NOT WIN32)
       INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libzorba_api.so DESTINATION ${JAVA_SITEARCH_DIR})
-		  INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zorba_api.jar DESTINATION ${JAVA_SITEARCH_DIR})
-		ELSE(NOT WIN32)
+      INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/zorba_api.jar DESTINATION ${JAVA_SITEARCH_DIR})
+    ELSE(NOT WIN32)
       IF (MSVC_IDE)
         INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/zorba_api.dll 
         DESTINATION share/java
@@ -100,7 +100,7 @@
         DESTINATION share/java
         COMPONENT "java_swig")
       ENDIF (MSVC_IDE)
-		ENDIF(NOT WIN32)
+    ENDIF(NOT WIN32)
   ENDIF ( APPLE )
 
  

=== modified file 'swig/php/CMakeLists.txt'
--- swig/php/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ swig/php/CMakeLists.txt	2013-04-06 00:58:24 +0000
@@ -24,25 +24,32 @@
     ADD_DEFINITIONS(-DZEND_WIN32 -DPHP_WIN32 -DZEND_INCLUDE_FULL_WINDOWS_HEADERS -DZEND_DEBUG=0 -DZTS=1)
   ENDIF (WIN32)
 
-  SWIG_ADD_MODULE (zorba_api php5 zorba_api.i)
+  SWIG_ADD_MODULE (zorba_api_php php5 zorba_api.i)
 
   IF (APPLE)
-    SWIG_LINK_LIBRARIES (zorba_api zorba_simplestore ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
+    SWIG_LINK_LIBRARIES (zorba_api_php zorba_simplestore ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
   ELSE (APPLE)
-    SWIG_LINK_LIBRARIES (zorba_api zorba_simplestore)
+    SWIG_LINK_LIBRARIES (zorba_api_php zorba_simplestore)
   ENDIF (APPLE)
 
+  #fix for library path, using windows backslash causes error
   IF (WIN32)
     STRING(REGEX REPLACE "\\\\" "/" PHP5_LIBRARY "${PHP5_LIBRARY}")
-    SWIG_LINK_LIBRARIES (zorba_api ${PHP5_LIBRARY})
+    SWIG_LINK_LIBRARIES (zorba_api_php ${PHP5_LIBRARY})
   ENDIF (WIN32)
 
   #Copy test to the build folder
   CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/test.xq" "${CMAKE_CURRENT_BINARY_DIR}/test.xq" COPYONLY)
   
-  #Copy
+  #Copy alternate files
   CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/XQueryProcessor.php" "${CMAKE_CURRENT_BINARY_DIR}/Zorba/XQueryProcessor.php" COPYONLY)
-  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/zorba_api_wrapper.php" "${CMAKE_CURRENT_BINARY_DIR}/Zorba/zorba_api_wrapper.php" COPYONLY)
+  #fix for swig error with wrapper name
+  ADD_CUSTOM_COMMAND(
+    TARGET zorba_api_php
+    POST_BUILD
+    COMMAND cmake -E echo "Fixing PHP wrapper..."
+    COMMAND cmake -P "${CMAKE_CURRENT_SOURCE_DIR}/postfix.cmake"
+  )
 
   FILE(GLOB ZORBA_API_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../" "${CMAKE_CURRENT_SOURCE_DIR}/../*.h")
   FOREACH(ZORBA_API_HEADER ${ZORBA_API_HEADERS})
@@ -51,10 +58,14 @@
 
   # The following fix was added because of the changes in CMake 2.8, which have the
   # result of naming the java binding library "liblibzorba_api.so" instead of "libzorba_api.so"
-  SET_TARGET_PROPERTIES( ${SWIG_MODULE_zorba_api_REAL_NAME} PROPERTIES PROJECT_LABEL "PHP" FOLDER "APIs")
   IF (LINUX OR CYGWIN OR APPLE)
     SET_TARGET_PROPERTIES (${SWIG_MODULE_zorba_api_REAL_NAME} PROPERTIES PREFIX "")
   ENDIF (LINUX OR CYGWIN OR APPLE)
+  
+  #set project folder location for IDEs
+  SET_TARGET_PROPERTIES(zorba_api_php PROPERTIES PROJECT_LABEL "PHP" FOLDER "APIs")
+
+  SET_TARGET_PROPERTIES(zorba_api_php PROPERTIES OUTPUT_NAME "${ZORBA_SWIG_LIB_PREFIX}zorba_api")
 
   IF (NOT WIN32 OR CYGWIN)
     STRING (REPLACE ${CMAKE_INSTALL_PREFIX} "" PHP5_INSTALL_PATH ${PHP5_EXTENSION_DIR})
@@ -67,7 +78,7 @@
         ${CMAKE_CURRENT_BINARY_DIR}/${ZORBA_SWIG_LIB_PREFIX}zorba_api.so
       DESTINATION ${PHP5_INSTALL_PATH}
     )
-	ELSE (NOT WIN32 OR CYGWIN)
+  ELSE (NOT WIN32 OR CYGWIN)
     IF (MSVC_IDE)
       INSTALL ( FILES 
         ${CMAKE_CURRENT_BINARY_DIR}/Zorba/XQueryProcessor.php
@@ -79,7 +90,7 @@
       INSTALL ( FILES 
         ${CMAKE_CURRENT_BINARY_DIR}/Zorba/XQueryProcessor.php
         ${CMAKE_CURRENT_BINARY_DIR}/Zorba/zorba_api_wrapper.php
-        ${CMAKE_CURRENT_BINARY_DIR}/php_zorba_api.dll
+        ${CMAKE_CURRENT_BINARY_DIR}/zorba_api.dll
         COMPONENT "php_swig"
         DESTINATION share/php )
     ENDIF (MSVC_IDE)

=== modified file 'swig/ruby/CMakeLists.txt'
--- swig/ruby/CMakeLists.txt	2013-02-07 17:24:36 +0000
+++ swig/ruby/CMakeLists.txt	2013-04-06 00:58:24 +0000
@@ -35,7 +35,8 @@
     GET_FILENAME_COMPONENT(_rpath "${_rpath}" PATH)
     SET_TARGET_PROPERTIES(zorba_api PROPERTIES
       INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${_rpath}"
-      BUILD_WITH_INSTALL_RPATH ON)
+      BUILD_WITH_INSTALL_RPATH ON
+      PROPERTIES OUTPUT_NAME "${ZORBA_SWIG_LIB_PREFIX}zorba_api")
   ENDIF (WIN32)
 
   IF ( APPLE )

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to