Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Out of tree" build and "installed" file layouts not supported on Windows #1

Open
RossBencina opened this issue Nov 24, 2020 · 0 comments

Comments

@RossBencina
Copy link

RossBencina commented Nov 24, 2020

(Reviving issue #12 from BitBucket)

When building Qt 5.12 from source on Windows, there are three different ways that the resulting Qt file tree is layed out. For Windows (and possibly crosscompiling) it appears that the Scons_Qt5 tool is only written to work with (1. “Full in source”) file layout. The three Qt-supported layouts are:

  1. “Full in-source” builds. Places all build artefacts in the source tree. This is the default. Problem: If you want to make Qt builds for x86 and x64 you need to duplicate the Qt sources for each build (this problem was discussed in a now archived issue Update for SCons 4.3.0 #3 on BitBucket.)
  2. “Out of tree” builds. This is where you create a separate build dir, and then configure and build Qt into the build dir (i.e. you cd to the build dir then run ..\$path_to_qt_src$\configure. In this case, the built Qt binaries (e.g. moc) and libs are located in the build dir, but the header files remain located in the source dir.
    • Compiled binaries are located in the build dir (e.g. QT5BUILDDIR\qtbase\bin\moc.exe)
    • Include files are located in the source dir (e.g. QT5SRCDIR\qtbase\include\QtCore\QString)
  3. “Out of tree install dir” this is where the -prefix path is supplied to configure, and “nmake install” or “jom install” is run after building Qt. In this case Qt is installed into another location, and the file layout is different from the above two options, and is similar to Unix:
    • Compiled binaries are located in QT5DIR\bin (e.g. QT5DIR\bin\moc.exe)
    • Include files are located in QT5DIR\include (e.g. QT5DIR\include\QtCore\QString)

To support both (1) and (3) I think the fix is to support both styles of file layout in the MSVC-specific code path.

To support (2) I think it would be enough to allow the user to pass QTLIBDIR and QTINCLUDEDIR as separate parameters to the environment. But this needs the code currently annotated with "# TODO: 'Replace' should be 'SetDefault'" to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant