[Development] Header file copies from the soure to include folder

Laszlo Papp lpapp at kde.org
Wed Apr 4 13:47:27 CEST 2012


Hi,

I have a small bit of issue with the functionality of the buildsystem.
Let me explain it in details. I have for instance a Qt5 Add-on module
for which I would like to support qt4 as well. I have for instance
solved the issues code-wise, but I am facing some build system issues
as well. I would like to ask for help about this.

The situation is that it is not recommended for Qt5 add-on modules
according to the relevant wikipage to create a $projectroot/include
folder with the pre-generated "raw" and "forward" header files.
Luckily enough, I do not need to install private header files in case
Qt4 since the Qt4 project does not do that either, and this is
feasible for me. I am about to install (copy) the header files from
$projectroot/src/ to $projectroot/include/modulename/, but I do not
seem to find a simple option for that. It is automatically done in the
Qt5 project itself by the syncqt util. I have tried to clone the Qt4
repository for getting the syncqt tool, but it is not that supported
like in case Qt5. In addition, I have had many issues with it. Also, I
consider it somewhat broken workflow as well, if developers need to
clone the Qt4 repository for copying files from folder A to folder B
on the fly.

I have tried to dig myself into this and other google results, but did
not work for me:
http://www.qtcentre.org/threads/2059-Installing-collecting-library-header-files-with-qmake

I have the same issue like the person here, as in: I would not like to
break the build process for subfolders like tests, examples and demos,
if I run the build like "make" on Linux in the project root. I have
then tried to use the "QMAKE_EXTRA_TARGETS" variable, but I got no
$projectroot/include/modulename folder at all after qmake and make
processes. I am not enthusiast about getting answer like copy the
whole bunch of syncqt beast for a "simple copy". Yes, there are many
customers involved ours who will have been Qt4 for years, still. I
would not like to reinvent the wheel by rewriting a Qt5 Add-on, not
even maintaining two separate projects after a fork.

I am now trying to ask differently: Either 1) What is way of doing
copy in the same "make" process without an explicite "make install"
execution. or 2) Is it possible to set up the environment in case Qt4
to think that src/qt4support/include is the include directory and
handle accordingly and conditionally ? I am a bit unhappy so that I
was able to manage the support in the codebase fairly fast, but the
build system seems to be a trouble so far. :/ I hope there is a fix
around I can accomplish. I would be personally happy, if I can just
"copy" the header files without even creating forward header files for
the time being as the first step.

Thank you in advance!

Best Regards,
Laszlo Papp



More information about the Development mailing list