Different Directories for different environment (windows/linux/...)



  • Hi guys,
    I would like to share the same project files among different OS.

    But how to manage the different outputdirectories and/or compiler?

    In the 'build settings' I created two 'build configuration', one named 'Linux Release'
    and another 'Windows Release'.

    But when I leave Linux to open the project using Windows, or viceversa,
    I get a message 'Project setting file from a different environment,
    do you still want to load the setting file?'

    Clicking on yes, all is selected for the 'Linux configuration', I have to reset
    all again, and so on...

    Any way to manage that?
    Thanks in advance


  • Moderators

    Never use the ".pro.user" file on another OS/ machine. When copying the sources (or using source management), do not copy that file. Instead, set the build config separately on every machine.

    If you want your project to build nicely on every OS, you should use special qmake instructions instead (like DESTDIR, OBJECTS_DIR, MOC_DIR, RCC_DIR). With those, you can make sure your project will build as you want every time - even when other people are building it.



  • Like sierdzio says - read about "qmake variables":http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html

    In "qmake advanced usage":http://qt-project.org/doc/qt-4.8/qmake-advanced-usage.html you will find info how to make conditions for different OS.



  • Thanks a lot, I agree with your suggestion


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.