QtMobility-1.0.0-patch.cmake.in 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # the patch step is run before the update step
  2. # so we need to checkout the 1.0 branch here
  3. set(work_dir @ep_source_dir@)
  4. set(proj_dir ${work_dir}/@proj@)
  5. INCLUDE(@CTK_SOURCE_DIR@/CMake/ctkFunctionLFtoCRLF.cmake)
  6. INCLUDE(@CTK_SOURCE_DIR@/CMake/ctkFunctionApplyPatches.cmake)
  7. SET(patch_dir @qtmobility_patch_dir@)
  8. SET(configured_patch_dir @qtmobility_configured_patch_dir@)
  9. # Variable required to properly configured the patch files
  10. SET(QT_BINARY_DIR @QT_BINARY_DIR@)
  11. SET(patch_files
  12. )
  13. IF(UNIX)
  14. IF(APPLE)
  15. LIST(APPEND patch_files ${patch_dir}/QtMobility-1.0.0-apple.patch)
  16. ENDIF()
  17. ENDIF()
  18. # Apply patches
  19. IF(patch_files)
  20. ctkFunctionApplyPatches("@CTK_PATCH_EXECUTABLE@" "@qtmobility_src_dir@" "${patch_files}")
  21. ENDIF()
  22. IF(UNIX)
  23. # replace all occurences of 'qmake' with the aboslute path to the
  24. # qmake executable found by CMake.
  25. # This is neccessary for custom Qt builds and for Unix/Linux systems
  26. # which use another name for the Qt4 qmake program (e.g. qmake-qt4)
  27. EXECUTE_PROCESS(
  28. COMMAND sed -i -e "s+qmake +@QT_QMAKE_EXECUTABLE@ +g" configure
  29. WORKING_DIRECTORY ${proj_dir}
  30. RESULT_VARIABLE error_code
  31. )
  32. IF(error_code)
  33. MESSAGE(FATAL_ERROR "Patching ${proj_dir}/configure file failed.")
  34. ENDIF()
  35. ENDIF()