Patrick Spendrin schrieb:
Ralf Habacker schrieb:
Hi,
with recent svn source code (tested with cmake 2.6.0 and 2.6.1) I got
linker errors:
Scanning dependencies of target kde4-config
Linking CXX executable ..\bin\kde4-config.exe
LINK : fatal error LNK1104: cannot open file 'optimized.lib'
LINK Pass 1 failed. with 2
A look into the related build.cmake shows that the term
optimized;E:/daten/kde/emerge-msvc-root/lib/kdewin32.lib;debug;E:/daten/kde/emerge-msvc-root/lib/kdewin32d.lib
from the CMakeCache.txt are evaluated into
optimized.lib
E:\daten\kde\emerge-msvc-root\lib\kdewin32.lib
debug.lib
E:\daten\kde\emerge-msvc-root\lib\kdewin32d.lib
The optimized.lib and debug.lib are complete wrong here and there should
only be one real library listed on the link line depending on the build
type.
Short time ago this does work without any problems. Any hints how to
solve this problem would be very welcome because it is currently not
possible to release several important binary packages for the KDE 4.1
release.
Exactly the same happens with the general keyword: it is not correctly used and thus produces strange errors (trying to link general.lib)-
The general keyword works for me with cmake 2.6.0 and 2.6.1
this seems to be a cmake related problem (maybe a buildsystem one as cmake
worked with this before).
When I remove the optimized/debug libraries from the related _DEPENDS
lines in CMakeCache.txt and add a
general;E:/daten/kde/emerge-msvc-root/lib/kdewin32d.lib (for debug
builds) then there is no linking error. I assume that there is a problem
in the area where cmake parses the _DEPENDS lines.
Ralf
Index: FindKDEWIN32.cmake
===================================================================
--- FindKDEWIN32.cmake (revision 841519)
+++ FindKDEWIN32.cmake (working copy)
@@ -25,18 +25,31 @@
${CMAKE_INCLUDE_PATH}
${CMAKE_INSTALL_PREFIX}/include
)
-
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set (LIBRARY_NAME kdewin32d)
+ else (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set (LIBRARY_NAME kdewin32)
+ endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
+
# search for kdewin32 in the default install directory for applications
(default of (n)make install)
FILE(TO_CMAKE_PATH "${CMAKE_LIBRARY_PATH}" _cmakeLibraryPathCmakeStyle)
- find_library_with_debug(KDEWIN32_LIBRARY
- WIN32_DEBUG_POSTFIX d
- NAMES kdewin32
+ find_library(KDEWIN32_LIBRARY
+ NAMES ${LIBRARY_NAME}
PATHS
${_cmakeLibraryPathCmakeStyle}
${CMAKE_INSTALL_PREFIX}/lib
NO_SYSTEM_ENVIRONMENT_PATH
)
+ # find_library_with_debug(KDEWIN32_LIBRARY
+# WIN32_DEBUG_POSTFIX d
+# NAMES kdewin32
+# PATHS
+# ${_cmakeLibraryPathCmakeStyle}
+# ${CMAKE_INSTALL_PREFIX}/lib
+# NO_SYSTEM_ENVIRONMENT_PATH
+# )
+
# kdelibs/win/ has to be built before the rest of kdelibs/
# eventually it will be moved out from kdelibs/
if (KDEWIN32_LIBRARY AND KDEWIN32_INCLUDE_DIR)
_______________________________________________
Kde-windows mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-windows