aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2009-07-07 14:55:50 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2009-07-07 14:55:50 +0000
commite8e499b81748508ea167e0aa50f69bcb199ba650 (patch)
treee9f0df1608ee890f44511f3fd2b06b9b401aa5d7
parent7aab253a3d616da4b8569147d12255f3545c6bdb (diff)
downloadextra-cmake-modules-e8e499b81748508ea167e0aa50f69bcb199ba650.tar.gz
extra-cmake-modules-e8e499b81748508ea167e0aa50f69bcb199ba650.tar.bz2
KDEWIN_INCLUDES and KDEWIN_LIBRARIES need to be set always, not only for the first time
svn path=/trunk/KDE/kdelibs/; revision=992670
-rw-r--r--modules/FindKDEWin.cmake46
1 files changed, 24 insertions, 22 deletions
diff --git a/modules/FindKDEWin.cmake b/modules/FindKDEWin.cmake
index 354ecb91..f034b738 100644
--- a/modules/FindKDEWin.cmake
+++ b/modules/FindKDEWin.cmake
@@ -14,7 +14,7 @@
if (WIN32)
- if (NOT KDEWIN_LIBRARIES)
+ if (NOT KDEWIN_LIBRARY)
find_path(KDEWIN_INCLUDE_DIR kdewin_export.h
${CMAKE_INCLUDE_PATH}
@@ -26,9 +26,12 @@ if (WIN32)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set (LIBRARY_NAME kdewind)
- else (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ else(CMAKE_BUILD_TYPE STREQUAL "Debug")
set (LIBRARY_NAME kdewin)
endif (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ if (MSVC_IDE )
+ set (LIBRARY_NAME "kdewind")
+ endif (MSVC_IDE)
find_library(KDEWIN_LIBRARY
NAMES ${LIBRARY_NAME}
@@ -37,28 +40,27 @@ if (WIN32)
${CMAKE_INSTALL_PREFIX}/lib
NO_SYSTEM_ENVIRONMENT_PATH
)
+ endif (NOT KDEWIN_LIBRARY)
- if (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR)
- set(KDEWIN_FOUND TRUE)
- # add needed system libs
- set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} user32 shell32 ws2_32 netapi32 userenv)
-
- if (MINGW)
- #mingw compiler
- set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/mingw ${QT_INCLUDES})
- else (MINGW)
- # msvc compiler
- # add the MS SDK include directory if available
- file(TO_CMAKE_PATH "$ENV{MSSDK}" MSSDK_DIR)
- set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${QT_INCLUDES} ${MSSDK_DIR})
- endif (MINGW)
-
- endif (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR)
- # required for configure
- set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN_INCLUDES})
- set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${KDEWIN_LIBRARIES})
+ if (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR)
+ set(KDEWIN_FOUND TRUE)
+ # add needed system libs
+ set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} user32 shell32 ws2_32 netapi32 userenv)
- endif (NOT KDEWIN_LIBRARIES)
+ if (MINGW)
+ #mingw compiler
+ set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/mingw ${QT_INCLUDES})
+ else (MINGW)
+ # msvc compiler
+ # add the MS SDK include directory if available
+ file(TO_CMAKE_PATH "$ENV{MSSDK}" MSSDK_DIR)
+ set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${QT_INCLUDES} ${MSSDK_DIR})
+ endif (MINGW)
+
+ endif (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR)
+ # required for configure
+ set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN_INCLUDES})
+ set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${KDEWIN_LIBRARIES})
if (KDEWIN_FOUND)
if (NOT KDEWIN_FIND_QUIETLY)