visual studio ide problems

William A. Hoffman billlist at nycap.rr.com
Fri Apr 14 22:58:08 CEST 2006


There are some PATH issues with visual studio and kdelibs.

To successfully build kdelibs with the ide, you have to have perl
and the qt dll's in your PATH during the build.  The visual studio
IDE has its own environment.  It can be set, but it is not a common
thing to do.  (In fact, I am not even sure where the menu is to
set the PATH, but I am sure I could find it.)   So, most developers
will run cmake, then load the solution and try to build.   They will
get errors, and give up.  Even if you run the IDE from a shell, it does not get
that environment.   I have some ideas for fixes:

1. For windows, every tool that is run during the build, gets run
from a driver .bat file.  The driver bat file is a configured 
file that has the correct paths built into it.   

kdewindriver.bat ${KDE4_DCOPIDL2CPP_EXECUTABLE} ....

kdewindriver.bat ${KDE4_DCOPIDL_EXECUTABLE}  ....

It would work with the nmake and ide builds reducing the environment
setup needed to run the build.

2. I add some sort of global variable that allows you to set PATH
in ALL custom commands in CMake.  It is possible in a custom command
to do set PATH=c:/perl/bin;%PATH% as part of the command.

SET(CMAKE_CUSTOM_COMMAND_WINDOWS_PATH  /path/to/qt/bin;/path/to/perl)

This would work only with VS IDE.

pros:  It is a small fix to cmake.
cons:  It is specific to only one generator.

This is much like the rpath problem on unix.
I am thinking that 1 maybe a better way to go.
Any other ideas?

-Bill



More information about the Kde-buildsystem mailing list