Sfoglia il codice sorgente

FIX: QtMobility: removed dependency from core and added a tar-ball containing the service framework sources (no git clone anymore).

Sascha Zelzer 15 anni fa
parent
commit
a8dbde41c2

+ 0 - 29
Libs/Core/CMakeLists.txt

@@ -7,32 +7,6 @@ SET(CMAKE_MODULE_PATH ${CTKCore_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
 INCLUDE(CMake/ctkMacroBFDCheck.cmake)
 
 #
-# 3rd party dependencies
-#
-
-# use the QtMobility SuperBuild paths for now
-# we should add a FindQtMobility later
-SET(QTMOBILITY_INCLUDE_DIRS 
-  "${CTK_BINARY_DIR}/../CMakeExternals/Source/QtMobility/install/include"
-  )
-SET(QTMOBILITY_LIBRARY_DIR "${LIBRARY_OUTPUT_PATH}")
-FIND_LIBRARY(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG QtServiceFrameworkd
-             PATHS ${QTMOBILITY_LIBRARY_DIR}
-             )
-             
-FIND_LIBRARY(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE QtServiceFramework
-             PATHS ${QTMOBILITY_LIBRARY_DIR}
-             )
-             
-SET(QTMOBILITY_QTSERVICEFW_LIBRARIES )
-IF(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE)
-  LIST(APPEND QTMOBILITY_QTSERVICEFW_LIBRARIES optimized ${QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE})
-ENDIF()
-IF(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG)
-  LIST(APPEND QTMOBILITY_QTSERVICEFW_LIBRARIES debug ${QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG})
-ENDIF()
-
-#
 # See CTK/CMake/ctkMacroBuildLib.cmake for details
 #
 
@@ -104,9 +78,6 @@ ctkMacroBuildLib(
   LIBRARY_TYPE ${CTK_LIBRARY_MODE}
   )
 
-# Plugins
-#ADD_SUBDIRECTORY(Plugins)
-
 # Testing
 IF(BUILD_TESTING)
   ADD_SUBDIRECTORY(Testing)

+ 1 - 2
Libs/Core/target_libraries.cmake

@@ -6,6 +6,5 @@
 
 SET(target_libraries
   QT_LIBRARIES
-  QTMOBILITY_QTSERVICEFW_LIBRARIES
   BFD_LIBRARIES
-  )
+  )

+ 6 - 14
SuperBuild.cmake

@@ -44,14 +44,6 @@ ENDIF()
 # Use this value where semi-colons are needed in ep_add args:
 set(sep "^^")
 
-# Find the git executable, used for custom git commands for external projects
-# (e.g. for QtMobility)
-find_program(Git_EXECUTABLE git DOC "git command line client")
-mark_as_advanced(Git_EXECUTABLE)
-if(NOT Git_EXECUTABLE)
-  message(SEND_ERROR "Set Git_EXECUTABLE to the path of your git executable")
-endif()
-
 #-----------------------------------------------------------------------------
 # Update CMake module path
 #
@@ -197,9 +189,9 @@ IF(${add_project})
   SET(qtmobility_patch_dir ${CTK_SOURCE_DIR}/Utilities/QtMobility/)
   SET(qtmobility_configured_patch_dir ${CTK_BINARY_DIR}/Utilities/QtMobility/)
   SET(qtmobility_patchscript
-    ${CTK_BINARY_DIR}/Utilities/QtMobility/QtMobilityGitBranch1.0-patch.cmake)
+    ${CTK_BINARY_DIR}/Utilities/QtMobility/QtMobility-1.0.0-patch.cmake)
   CONFIGURE_FILE(
-    ${CTK_SOURCE_DIR}/Utilities/QtMobility/QtMobilityGitBranch1.0-patch.cmake.in
+    ${CTK_SOURCE_DIR}/Utilities/QtMobility/QtMobility-1.0.0-patch.cmake.in
     ${qtmobility_patchscript} @ONLY)
 
   # Define configure options
@@ -221,13 +213,12 @@ IF(${add_project})
   ENDIF()
 
   ExternalProject_Add(${proj}
-    GIT_REPOSITORY git://gitorious.org/qt-mobility/qt-mobility.git
-    # the patch command is also used to checkout the 1.0 branch    
+    URL ${CTK_BINARY_DIR}/Utilities/QtMobility/qt-mobility-servicefw-opensource-src-1.0.0.tar.gz
     PATCH_COMMAND ${CMAKE_COMMAND} -P ${qtmobility_patchscript}
     CONFIGURE_COMMAND <SOURCE_DIR>/configure -${qtmobility_build_type} -libdir ${CMAKE_BINARY_DIR}/CTK-build/bin -no-docs -modules ${qtmobility_modules}
     BUILD_COMMAND ${qtmobility_make_cmd}
     INSTALL_COMMAND ${qtmobility_make_cmd} install
-	  BUILD_IN_SOURCE 1
+    BUILD_IN_SOURCE 1
     )
 ENDIF()
 
@@ -312,8 +303,9 @@ ExternalProject_Add(${proj}
   INSTALL_COMMAND ""
   DEPENDS
     # Mandatory dependencies
-    ${QtMobility_DEPENDS}
+    #  - none
     # Optionnal dependencies
+    ${QtMobility_DEPENDS}
     ${kwstyle_DEPENDS}
     ${DCMTK_DEPENDS}
     ${PythonQt_DEPENDS}

+ 44 - 0
Utilities/QtMobility/QtMobility-1.0.0-apple.patch

@@ -0,0 +1,44 @@
+*** ../qt-mobility-src-1.0.0-beta1/configure	2010-02-12 03:54:12.000000000 -0500
+--- configure	2010-03-24 18:51:06.000000000 -0400
+***************
+*** 413,423 ****
+  }
+  
+  #compile tests
+! compileTest QMF qmf
+! compileTest NetworkManager networkmanager
+! compileTest "CoreWLAN (MacOS 10.6)" corewlan
+! compileTest "Maemo ICD" maemo-icd
+! compileTest "Maemo ICD WLAN" maemo-icd-network-wlan
+  
+  # Now module selection
+  # using 'expr match ....' should help a bit
+--- 413,423 ----
+  }
+  
+  #compile tests
+! #compileTest QMF qmf
+! #compileTest NetworkManager networkmanager
+! #compileTest "CoreWLAN (MacOS 10.6)" corewlan
+! #compileTest "Maemo ICD" maemo-icd
+! #compileTest "Maemo ICD WLAN" maemo-icd-network-wlan
+  
+  # Now module selection
+  # using 'expr match ....' should help a bit
+***************
+*** 493,499 ****
+  fi
+  
+  echo "Running qmake..."
+! if qmake -recursive "$relpath/qtmobility.pro"; then
+      echo ""
+      echo "configure has finished. You may run make or gmake to build the project now."
+  else
+--- 493,499 ----
+  fi
+  
+  echo "Running qmake..."
+! if qmake -spec macx-g++ -recursive "$relpath/qtmobility.pro"; then
+      echo ""
+      echo "configure has finished. You may run make or gmake to build the project now."
+  else

+ 62 - 0
Utilities/QtMobility/QtMobility-1.0.0-patch.cmake.in

@@ -0,0 +1,62 @@
+# the patch step is run before the update step
+# so we need to checkout the 1.0 branch here
+
+set(work_dir @ep_source_dir@)
+set(proj_dir ${work_dir}/@proj@)
+
+
+INCLUDE(@CTK_SOURCE_DIR@/CMake/ctkMacroApplyPatches.cmake)
+
+SET(patch_dir @qtmobility_patch_dir@)
+SET(configured_patch_dir @qtmobility_configured_patch_dir@)
+
+# Variable required to properly configured the patch files
+SET(QT_BINARY_DIR @QT_BINARY_DIR@)
+
+SET(patch_files
+  QtMobility-1.0.0.patch
+)
+
+IF(WIN32)
+  CONFIGURE_FILE(${patch_dir}/QtMobility-1.0.0-win32.patch.in
+    ${configured_patch_dir}/QtMobility-1.0.0-win32.patch @ONLY)
+  LIST(APPEND patch_files
+    ${configured_patch_dir}/QtMobility-1.0.0-win32.patch
+    )
+ENDIF()
+
+IF(UNIX)
+  IF(APPLE)
+    LIST(APPEND patch_files ${patch_dir}/QtMobility-1.0.0-apple.patch)
+  ENDIF()
+ENDIF()
+
+# Apply patches
+ctkMacroApplyPatches("@CTK_PATCH_EXECUTABLE@" "@qtmobility_src_dir@" "${patch_files}")
+
+IF(UNIX)
+
+  # replace all occurences of 'qmake' with the aboslute path to the
+  # qmake executable found by CMake.
+  # This is neccessary for custom Qt builds and for Unix/Linux systems
+  # which use another name for the Qt4 qmake program (e.g. qmake-qt4)
+
+  EXECUTE_PROCESS(
+    COMMAND sed -i "s+qmake +@QT_QMAKE_EXECUTABLE@ +g" configure
+    WORKING_DIRECTORY ${proj_dir}
+    RESULT_VARIABLE error_code
+  )
+
+  IF(error_code)
+    MESSAGE(FATAL_ERROR "Patching ${proj_dir}/configure file failed.")
+  ENDIF()
+ENDIF()
+
+# Let's add the updated files to the local repository. That way, 'git pull'
+# will try to merge the branch changes with the local ones
+execute_process(
+  COMMAND @Git_EXECUTABLE@ add --all
+  WORKING_DIRECTORY ${proj_dir}
+  ERROR_VARIABLE error_output
+  RESULT_VARIABLE error_code
+  )

+ 31 - 0
Utilities/QtMobility/QtMobility-1.0.0-win32.patch.in

@@ -0,0 +1,31 @@
+--- C:/development/CTK-master-vc9/CMakeExternals/Source/QtMobility/configure_orig.bat	Sun Apr 11 18:17:43 2010
++++ C:/development/CTK-master-vc9/CMakeExternals/Source/QtMobility/configure.bat	Sun Apr 11 21:19:33 2010
+@@ -60,7 +60,7 @@
+ set MOBILITY_MODULES=bearer location contacts multimedia publishsubscribe versit messaging systeminfo serviceframework sensors
+ set MOBILITY_MODULES_UNPARSED=
+ set VC_TEMPLATE_OPTION=
+-set QT_PATH=
++set QT_PATH=@QT_BINARY_DIR@\
+ set QMAKE_CACHE=%BUILD_PATH%\.qmake.cache
+ 
+ if exist "%QMAKE_CACHE%" del %QMAKE_CACHE%
+@@ -457,10 +457,15 @@
+ echo.
+ echo Start of compile tests
+ REM compile tests go here.
+-call :compileTest LBT lbt
+-call :compileTest SNAP snap
+-call :compileTest OCC occ
+-call :compileTest SymbianContactSIM symbiancntsim
++REM for CTK the compile tests generate errors in Visual Studio -> just disabling them
++REM call :compileTest LBT lbt
++echo lbt_enabled = no >> %PROJECT_CONFIG%
++REM call :compileTest SNAP snap
++echo snap_enabled = no >> %PROJECT_CONFIG%
++REM call :compileTest OCC occ
++echo occ_enabled = no >> %PROJECT_CONFIG%
++REM call :compileTest SymbianContactSIM symbiancntsim
++echo symbiancntsim_enabled = no >> %PROJECT_CONFIG%
+ echo End of compile tests
+ echo.
+ echo.

+ 10 - 0
Utilities/QtMobility/QtMobility-1.0.0.patch

@@ -0,0 +1,10 @@
+--- /home/sascha/Downloads/qt-mobility-opensource-src-1.0.0/qtmobility.pro	2010-04-21 16:17:35.000000000 +0200
++++ qtmobility.pro	2010-05-04 00:42:06.776482243 +0200
+@@ -100,7 +100,6 @@
+     SUBDIRS += tools
+ }
+ 
+-SUBDIRS += plugins
+ 
+ #built documentation snippets, if enabled
+ contains(build_docs, yes) {

BIN
Utilities/QtMobility/qt-mobility-servicefw-opensource-src-1.0.0.tar.gz