Port existing qmake based project

Sysprogs forums Forums VisualGDB Port existing qmake based project

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26580
    NickD2039
    Participant

    Hi,

    I have an existing qmake .pro file based project that is large, complex, and based on a herirarchy of .pro files. The .pro files define the master project and qmake is used to generate vcxproj files for Visual Studio and makefiles for desktop linux and Mac.

    As far as I can tell, VisualGDB is designed to only work with the vcxproj file being the ‘master’, i.e. it updates it’s internal .pro file(s) based off the vcxproj. To add files to a project the only option is to use Visual Studio’s UI and VisualGDB automagically handles the rest.

    Am I correct in assuming that there’s no way to generate the vcxproj for a VisualGDB from a qmake .pro file?

    Is there any way to use an existing qmake .pro file based project with VisualGDB?

    Thanks,

    Nick

    #26581
    support
    Keymaster

    Hi,

    Just to double-check, are you able to successfully build that project using the command-line tools (i.e. qmake) on the Windows machine using the same toolchain/target combination that you intend to use with VisualGDB?

    #26583
    NickD2039
    Participant

    I haven’t attempted it yet as I hit a roadblock with VisualGDB and am in the process of setting up a QtCreator-based cross-compile environment. Not sure how to drive that version of qmake manually as it’s all behind the scenes with VisualGDB (e.g. what makespec do I pick? where are the makespecs??)

    EDIT: In fact, when I attempt it, it fails because it’s looking for things below /home/nick/ instead of \Users\Nick\ so VisualGDB must do some secret stuff behind the scenes to drive that version of qmake.

    But my question was not related to that; I just wanted to know if there was a way to generate the VisualGDB vcxproj from my existing .pro files (all project maintenance is performed on the pro files, I never use the VisualStudio UI to add/remove source/header files etc.). If that’s not possible (which I strongly suspect is the case) then undortunately I’ll have to give up on VisualGDB which is a shame because it is otherwise super slick.

    Thanks,

    Nick

    • This reply was modified 4 years, 4 months ago by NickD2039.
    #26587
    support
    Keymaster

    Sorry, if a project does not build outside VisualGDB, there is no way to generate a meaningful VisualGDB-based project that would somehow fix the build.

    You can generate a project that will show the source files in Solution Explorer using the “import” mode of the wizard (it will simply add all files from the specified directory), however it will still invoke QMake when building, and hence will not resolve the build issues.

    #26594
    NickD2039
    Participant

    I’m not attempting to fix any build issues at this stage, I just need to know _how_ to import a qmake based existing project to VisualGDB.

    Is it possible?

    When I go through the wizard and select Import project/Import a project built with other tools I only get the option to specify a directory with source files. My project structure is not a simplistic as that. The .pro files switch in features depending on the variant and subdirectories (.pri files) are selectively included based on the configuration of whichever variant is being built. The .pro files also set multitudes of DEFINES based on the configuration.

    I’m going to assume that VisualGDB is not designed to support existing qmake based projects and give up on it.

     

    • This reply was modified 4 years, 4 months ago by NickD2039.
    #26596
    support
    Keymaster

    Indeed VisualGDB is not designed to parse a complex system of QMake-specific project files and extract the precise project structure from them, as that would basically require re-implementing most of the QMake logic inside VisualGDB. This is also the reason why we suggest using CMake for all new projects, as CMake can export the exact project structure in a machine-readable way, so VisualGDB gets a 100% precise IntelliSense setup and Solution Explorer view.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.