aboutsummaryrefslogtreecommitdiff
path: root/modules/FindKDEWin.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/FindKDEWin.cmake')
-rw-r--r--modules/FindKDEWin.cmake60
1 files changed, 28 insertions, 32 deletions
diff --git a/modules/FindKDEWin.cmake b/modules/FindKDEWin.cmake
index 2da5384e..354ecb91 100644
--- a/modules/FindKDEWin.cmake
+++ b/modules/FindKDEWin.cmake
@@ -14,10 +14,9 @@
if (WIN32)
- if (NOT KDEWIN_LIBRARY)
+ if (NOT KDEWIN_LIBRARIES)
find_path(KDEWIN_INCLUDE_DIR kdewin_export.h
- ${KDE4_INCLUDE_DIR}
${CMAKE_INCLUDE_PATH}
${CMAKE_INSTALL_PREFIX}/include
)
@@ -27,51 +26,48 @@ 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}
PATHS
- ${KDE4_LIB_DIR}
${_cmakeLibraryPathCmakeStyle}
${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 (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 (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})
+ endif (NOT KDEWIN_LIBRARIES)
if (KDEWIN_FOUND)
- if (NOT KDEWin_FIND_QUIETLY)
- message(STATUS "Found KDEWin library: ${KDEWIN_LIBRARY}")
- endif (NOT KDEWin_FIND_QUIETLY)
+ if (NOT KDEWIN_FIND_QUIETLY)
+ message(STATUS "Found KDEWIN library: ${KDEWIN_LIBRARY}")
+ endif (NOT KDEWIN_FIND_QUIETLY)
else (KDEWIN_FOUND)
- if (KDEWin_FIND_REQUIRED)
- message(FATAL_ERROR "Could NOT find KDEWin library\nPlease install it first")
- endif (KDEWin_FIND_REQUIRED)
+ if (KDEWIN_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find KDEWIN library\nPlease install it first")
+ endif (KDEWIN_FIND_REQUIRED)
endif (KDEWIN_FOUND)
endif (WIN32)