EXECUTE_PROCESS(COMMAND @qtmobility_make_cmd@ install
                OUTPUT_VARIABLE _output)

IF(_output)
  MESSAGE(${_output})
ENDIF()

SET(_int_dir )
IF(INTERMEDIATE_DIRECTORY)
  GET_FILENAME_COMPONENT(_int_dir ${INTERMEDIATE_DIRECTORY} NAME)
  IF(NOT EXISTS "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/")
    FILE(MAKE_DIRECTORY "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/")
	MESSAGE("Creating directory @CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}")
  ENDIF()
ENDIF()

FILE(GLOB _files "@qtmobility_win32_install_prefix@/lib/*")
FOREACH(_file ${_files})
  CONFIGURE_FILE(${_file} "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/" COPYONLY)
  MESSAGE("Copying ${_file} to @CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/")
ENDFOREACH()

FILE(GLOB _files "@qtmobility_patch_dir@/include/*")
FOREACH(_file ${_files})
  CONFIGURE_FILE(${_file} "@qtmobility_win32_install_prefix@/include/" COPYONLY)
  MESSAGE("Copying ${_file} to @qtmobility_win32_install_prefix@/include/")
ENDFOREACH()

SET(QTMOBILITY_QTSERVICEFW_INCLUDE_DIR "@qtmobility_win32_install_prefix@/include")
SET(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG
    "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/QtServiceFrameworkd.lib")
SET(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE
    "@CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY@/${_int_dir}/QtServiceFramework.lib")
    
CONFIGURE_FILE("@qtmobility_config_in@" "@qtmobility_config_out@" @ONLY)
