KDE/kdelibs/cmake/modules

Sebastian Sauer mail at dipe.org
Sat Oct 21 20:10:58 CEST 2006


On Saturday 21 October 2006 12:08, you wrote:
> Christian Ehrlicher schrieb:
> > SVN commit 597662 by chehrlic:
> >
> > This is not needed at all - it  worked before without and now it doesn'
> > work with msvc anymore! cmake adds those libs automagically afaik
>
> I had to go back to rev. 597591 to get it kdelbis compile again with msvc!
> Why did you remove all the dbus stuff and changed all the other things?
> It compiled fine with mingw before.
> Please fix those things / go back to rev 597591 and start over with your
> mingw compile!

hmm... that's somewhat funny cause let's take a look at the commits I did (I 
try to just outline what has changed);

1. r597592

-if (NOT QT_DBUSXML2CPP_EXECUTABLE)
-   message(FATAL_ERROR "Qt4 qdbusxml2cpp was not found. Make sure it has been 
built and installed by Qt")
-endif (NOT QT_DBUSXML2CPP_EXECUTABLE)
+if (NOT WIN32)
+   if (NOT QT_DBUSXML2CPP_EXECUTABLE)
+      message(FATAL_ERROR "Qt4 qdbusxml2cpp was not found. Make sure it has 
been built and installed by Qt")
+   endif (NOT QT_DBUSXML2CPP_EXECUTABLE)
+endif (NOT WIN32)

This part is needed since the Qt 4.2.1 qmake does compile qdbusxml2cpp only 
for unix-systems

2. r597606

-   # add the winsock2 library, using find_library or something like this 
would probably be better
-   set(KDEWIN32_LIBRARIES ${KDEWIN32_LIBRARY} user32 shell32 ws2_32)
+   # add the winsock2 library
+   find_library(WIN32_USER32_LIBRARY NAMES user32 PATHS 
$ENV{WINDIR}/system32)
+   find_library(WIN32_SHELL32_LIBRARY NAMES shell32 PATHS 
$ENV{WINDIR}/system32)
+   find_library(WIN32_WS2_LIBRARY NAMES ws2_32 PATHS $ENV{WINDIR}/system32)
+   set(KDEWIN32_LIBRARIES "${KDEWIN32_LIBRARY} ${WIN32_USER32_LIBRARY} 
${WIN32_SHELL32_LIBRARY} ${WIN32_WS2_LIBRARY}")

You may note the "set(KDEWIN32_LIBRARIES ${KDEWIN32_LIBRARY} user32 shell32 
ws2_32)" which was there before I touched the code and just got replaced. The 
set() was totaly wrong anyway and I wonder it compiled at all since at least 
it was missing additional "-chars ( so, 
set(KDEWIN32_LIBRARIES "${KDEWIN32_LIBRARY} user32 shell32 ws2_32") ) but 
maybe <cmake 2.4.3 did not throw an error before while 2.4.3 does cause 
user32 is not an known keyword not was it a variable.

3. r597618

# FindZLIB.cmake
set(ZLIB_INCLUDE_DIR ${KDEWIN32_INCLUDES})
find_library(ZLIB_LIBRARY NAMES zlib PATHS ${KDEWIN32_LIBRARY_PATH})
...

if you look again at it, you may note that the relevant added code is in 
a "if(MINGW)" block, so it should be independend of compiling on MS Visual 
Studio except you use MINGW on MSVS? Then it should be propably checked for 
that condition imho.

4. r597624

- find_file(GNUWIN32_DIR_tmp gnuwin32 win32libs 
+ find_file(GNUWIN32_DIR_tmp gnuwin32 kdewin32 win32libs 

This one was needed cause the kdewin32-package (where the relevant GnuWin32 
files are located) is not named win32libs any longer (what was iirc the case 
for Qt3, or?)

Anyway... where exactly does it break? The only thing that really changed for 
all compilers was the 4. mention above. So, does revert it fix the break? 
btw, without 1. and 2. it does _not_ compile on win32/mingw for me :-(

btw, Laurent pointed me 
to "http://sourceforge.net/project/showfiles.php?group_id=171968" which 
should help to get it finally compiled (biggest prob I saw so far was the 
missing dbus-lib).

-- 
Sebastian Sauer aka dipesh[sebsauer]
http://www.dipe.org/public_key.asc
Fingerprint: 8F1E 219B 16E6 4EC7 29CC F408 E193 65E2 9134 2221
Coder in http://www.koffice.org && http://www.kmldonkey.org


More information about the Kde-buildsystem mailing list