# 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 ${patch_dir}/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()