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

Add JOM CMake option to enable building with Qt JOM #16298

Closed
qgib opened this issue Mar 7, 2013 · 3 comments
Closed

Add JOM CMake option to enable building with Qt JOM #16298

qgib opened this issue Mar 7, 2013 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Mar 7, 2013

Author Name: Nathan Woodrow (@NathanW2)
Original Redmine Issue: 7289
Affected QGIS version: master
Redmine category:build/install
Assignee: Larry Shaffer


Don't set

@ADD_DEFINITIONS( /W4 )
ADD_DEFINITIONS( /FR )@

if JOM is enabled as it causes issues building


@qgib
Copy link
Contributor Author

qgib commented Mar 8, 2013

Author Name: Larry Shaffer (Larry Shaffer)


Working setup: #464

Tested on two different Win 7 VMs, with no errors.

The errors with qgis_help and qbrowser were fixed by updating Visual Studio Express to SP1:

Get MS VS2008 w/ SP1 iso here (~750 MB): http://search.msdn.microsoft.com/search/en-US/default.aspx?query=visual%20studio%20express%202008%20download&refinement=111&ac=4

or directly (maybe): http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso

Will add more about the QtCreator and .batch file configurations in followup post.


  • status_id was changed from Open to In Progress

@qgib
Copy link
Contributor Author

qgib commented Mar 11, 2013

Author Name: Larry Shaffer (Larry Shaffer)


So here are my results/notes so far for setting up Qt Creator and NMake with jom:

The following differs from current INSTALL notes:

  • @microsoft Platform SDK for Windows Server 2003 R2@ install doesn't appear to be necessary (at least I couldn't find any CMake options that utilized anything from that install). SetupAPI appears to be useable from: @C:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib/SetupAPI.Lib@, though I can't say I know what it is used for exactly.

  • I installed the GNU tools, flex and bison, in C:/GnuWin32. Using @Progra1@ or @Progra2@ (for 64bit) still produced path-with-spaces problems for the tools.

  • The general shell environment batch file setup I used (though I don't use this shell env anymore once QtCreator was setup): attachment:qgis-build-shell.bat

I used a separate virtual hard drive for source files and build directory at Q:\Quantum-GIS and Q:\build-qtc. There seemed to be an issue with having only the build directory being on a separate HDD, which was mitigated when I placed the source files there as well. The installed app goes into my home folder: @C:/Users/me/QGIS/QGIS_Apps-Qtc@

The INSTALL notes should include the info about generally creating a CMake project, like opening the top-level CMakeLists.txt and inputting default options.

Since Qt Creator works better when passing in CMake options via options dialog (rather than using CMake-GUI, etc), I keep a text file handy with the default options I pass in, for initial project setup and for whenever Creator randomly asks for them. (These are just my choices for initial options): attachment:qtc-cmake-options.txt

The project build steps are as follows (-j option may be unnecessary unless you want jom to NOT automatically use all of your available CPU cores):

jom.exe -j6
jom.exe -j6 staged-plugins  (optional, unless running from build dir)
jom.exe -j6 install   (optional)

For launching Creator I use the following batch file: attachment:qgis-qtc-start.bat

Once built and installed, I use the following to launch QGIS from build dir and install dir, respectively: attachment:qgis-qtc-build-start.bat and attachment:qgis-qtc-install-start.bat

And similarly for the qbrowser application: attachment:qbrowser-qtc-build-start.bat and attachment:qbrowser-qtc-install-start.bat

For running CMake-GUI (if needed): attachment:qgis-qtc-cmake-gui.bat

It is best to run CMake-GUI while Creator is open, otherwise, you may be prompted with the default CMake options dialog on Qt Creator launch after using CMake-GUI. Likewise, any changes done with CMake-GUI will be reverted if they are not reflected in future inputted options to Qt Creator's CMake options dialog. Generally, I avoid using CMake-GUI to change CMakeCache.txt when using Qt Creator, and only use it to browse current settings.

For debugging, I installed Windows 7 SDK (just Developer Tools) and set the path to CDB debugger manually in @Options->Build-n-Run->Kits->Desktop@ (it was not auto-detected by Qt Creator): @C:\Program Files\Debugging Tools for Windows (x64)\cdb.exe@


  • 5413 was configured as qgis-qtc-install-start.bat
  • 5412 was configured as qgis-qtc-build-start.bat
  • 5411 was configured as qgis-qtc-start.bat
  • 5410 was configured as qtc-cmake-options.txt
  • 5407 was configured as qbrowser-qtc-build-start.bat
  • 5406 was configured as qgis-qtc-cmake-gui.bat
  • 5409 was configured as qgis-build-shell.bat
  • 5408 was configured as qbrowser-qtc-install-start.bat

@qgib
Copy link
Contributor Author

qgib commented May 10, 2013

Author Name: Nathan Woodrow (@NathanW2)


  • resolution was changed from to fixed
  • status_id was changed from In Progress to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS labels May 24, 2019
@qgib qgib added this to the Version 2.0.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

1 participant