← 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

 

I've added another comment, but I also just noticed that this branch attempts to fix the same thing, but adding the CMake rule somewhere else:

https://code.launchpad.net/~larryprice/ubuntu-terminal-app/fix-cmake-xenial/+merge/297394

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

Thanks Dan. I understood that CMake is attempting to create a file where the directory should have been created, but I'm not sure I quite follow why. In particular, I can't quite follow this bit: "But the add_custom_target' run during the build so they were trying to copy [...]".

In any case, good point about removing L83 if it's doing the same. Althought I noticed that the way the command is run is different:

L53 -> file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR})
L83 -> COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN_DIR}

The rest of the CMake file is using the COMMAND syntax. Would it not make sense to stick to that for consistency, or is there a compelling reason to use file()?

>          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