DeployQtConf.cmake 633 Bytes
Newer Older
1 2 3 4 5 6 7 8
# Deploy a qt.conf file in the specified
# target build directory, as a pre-build step
macro( deploy_qt_conf TARGET_NAME )

  add_custom_command( 
      TARGET ${TARGET_NAME}
      PRE_BUILD 
      COMMAND ${CMAKE_COMMAND}
9 10 11 12 13
      ARGS -D QT_TRANSLATIONS_DIR:PATH=${QT_TRANSLATIONS_DIR}
           -D QT_PLUGINS_DIR:PATH=${QT_PLUGINS_DIR}
           -D Monteverdi2_SOURCE_DIR:PATH=${Monteverdi2_SOURCE_DIR}
           -D TARGET_DIR:PATH=$<TARGET_FILE_DIR:${TARGET_NAME}>
           -P ${Monteverdi2_SOURCE_DIR}/CMake/DeployQtConfScript.cmake
14 15 16 17 18
      COMMENT "Deploying qt.conf in ${TARGET_NAME} build dir"
      VERBATIM
  )

endmacro()