Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
implement "postinstall" commands
example input
target.path = /dst target.extra = echo hello world another_target.path = /dst another_target.files = a.txt another_target.depends = target INSTALLS = target another_target
cmake has no equivalent construct, so my implementation works by adding a series of install commands, which cmake will execute in order of appearance. qmake2cmake resolves the install order from the target dependencies
# install_target install(CODE [[ message(STATUS "Installing: /tmp/a.txt") execute_process( COMMAND echo hello world COMMAND_ERROR_IS_FATAL ANY ) ]]) # install_another_target # depends on: install_target install(CODE [[ message(STATUS "Installing: /tmp/a.txt") file(COPY /src/a.txt DESTINATION /dst/a.txt) ]])
please see my patches in
https://github.com/milahu/qmake2cmake/tree/fix-for-pyqt-builder
i have little motivation to mess with qt's gerrit interface, so please feel free to use my code
status: working prototype
this works to build pyqt6
pyqt-builder generates qmake .pro files
and instead of qmake, i call qmake2cmake_all and cmake
with pyqt-builder, im hitting a non-trivial bug in qmake_parser.py:
the original whitespace is lost in scope.get_string(key)
but there is a simple workaround: use quoted strings in the .pro file
i will post this in a separate issue