View Full Version : Multiple folders and Kdevelop

16th June 2009, 13:30
I'm having a frustrating problem, not sure if this belongs here or in the Noobs forum, sorry if it's in the wrong place.

I have a project that has a few different flavours. Basically the majority of the code lives in 1 folder, and there are 2 sub folders that contain just contains a defines.h file (with site specific Name / URL / Logo info), a .qrc file (with associated images) and a project file for the sub-projects.

Although it works fine from the command line, using it in QDevelop is a headache, as I can't double click on a file in the QMake manager to open it when I am working on a sub-project, which leads me to believe I might be going about this the wrong way.

Here is my folder structure:

Project Folder
project.pro (subdirs template)
-> src (folder) (common .cpp and .h files needed by both projects, no .pro file)
-> project1 (folder) (defines.h, a .qrc and project1.pro file)
-> project2 (folder) (defines.h, a .qrc and project2.pro file)

Basically, the only difference between project1 and project 2 is what is in defines.h, and different resources (logos, icons etc) as well as producing a different output file.

The only way I got it to play nicely within Kdevelop was to add "../src/" before every header and source filename in the .pro files, which seems a little excessive.. adding DEPENDPATH made it compile fine from the command line, but meant I could not open any source or header files by double-clicking on them from the QMake manager in KDevelop.

Anyone have a suggestion for how to correctly layout a project such as this? I have considered having multiple .pro files in the main src folder.. would that be any better? What is the 'proper' way to do this, I've searched though the QMake documentation but gained little insight :-(

Thanks in advance for any help.