← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

Re: [Merge] lp:~popey/ubuntu-terminal-app/add-snapcraft-config into lp:ubuntu-terminal-app

 

Added a comment inline.

Diff comments:

> 
> === modified file 'src/plugin/qmltermwidget/CMakeLists.txt'
> --- src/plugin/qmltermwidget/CMakeLists.txt	2014-11-15 14:39:05 +0000
> +++ src/plugin/qmltermwidget/CMakeLists.txt	2016-09-08 11:44:05 +0000
> @@ -70,6 +70,7 @@
>  
>  # Copy the plugin, the qmldir file and other assets to the build dir for running in QtCreator
>  if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
> +    file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR})
>      add_custom_target(qmltermwidget-qmldir ALL

Hey David,

Ah sorry I realise I wasn't very clear in my explanation. So simply the command to create the directory:

L83 -> COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR}

is set to run post build, but the custom_targets that are set to copy the files over are being run during the build. Which there isn't a directory yet to copy to and instead a file get's created with the contents of the first copied file.

Regarding using file:

The make_directory command is deprecated in cmake v3.0+ https://cmake.org/cmake/help/v3.0/manual/cmake-commands.7.html#id3. The file command now caters for all file and directory actions and should be used going forward.

>          COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/src/qmldir ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR}
>          DEPENDS ${QMLFILES}


-- 
https://code.launchpad.net/~popey/ubuntu-terminal-app/add-snapcraft-config/+merge/305206
Your team Ubuntu Terminal Developers is subscribed to branch lp:ubuntu-terminal-app.


References