Warning, /libraries/phonon-vlc/cmake/FindKDEWin.cmake is written in an unsupported language. File is not indexed.
0001 # - Try to find the KDEWIN library 0002 # 0003 # Once done this will define 0004 # 0005 # KDEWIN_FOUND - system has KDEWIN 0006 # KDEWIN_INCLUDES - the KDEWIN include directories 0007 # KDEWIN_LIBRARIES - The libraries needed to use KDEWIN 0008 0009 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> 0010 # Copyright (c) 2007-2009, Ralf Habacker, <ralf.habacker@freenet.de> 0011 # 0012 # Redistribution and use is allowed according to the terms of the BSD license. 0013 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0014 0015 0016 if (WIN32) 0017 0018 if(WINCE) 0019 FIND_PACKAGE(WCECOMPAT REQUIRED) 0020 endif(WINCE) 0021 0022 if (NOT KDEWIN_LIBRARY) 0023 0024 0025 find_path(KDEWIN_INCLUDE_DIR kdewin_export.h 0026 ${KDE4_INCLUDE_DIR} 0027 ${CMAKE_INCLUDE_PATH} 0028 ${CMAKE_INSTALL_PREFIX}/include 0029 ) 0030 0031 # search for kdewin in the default install directory for applications (default of (n)make install) 0032 FILE(TO_CMAKE_PATH "${CMAKE_LIBRARY_PATH}" _cmakeLibraryPathCmakeStyle) 0033 0034 string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER) 0035 if (CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) 0036 set (LIBRARY_NAME kdewind) 0037 else(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) 0038 set (LIBRARY_NAME kdewin) 0039 endif (CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) 0040 0041 find_library(KDEWIN_LIBRARY 0042 NAMES ${LIBRARY_NAME} 0043 PATHS 0044 ${KDE4_LIB_DIR} 0045 ${_cmakeLibraryPathCmakeStyle} 0046 ${CMAKE_INSTALL_PREFIX}/lib 0047 NO_SYSTEM_ENVIRONMENT_PATH 0048 ) 0049 endif (NOT KDEWIN_LIBRARY) 0050 0051 if (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR) 0052 set(KDEWIN_FOUND TRUE) 0053 # add needed system libs 0054 if(NOT WINCE) 0055 set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} user32 shell32 ws2_32 netapi32 userenv) 0056 else(NOT WINCE) 0057 set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} ws2 ${WCECOMPAT_LIBRARIES}) 0058 endif(NOT WINCE) 0059 0060 if (MINGW) 0061 #mingw compiler 0062 set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/mingw ${QT_INCLUDES}) 0063 else (MINGW) 0064 # msvc compiler 0065 # add the MS SDK include directory if available 0066 file(TO_CMAKE_PATH "$ENV{MSSDK}" MSSDK_DIR) 0067 if (WINCE) 0068 set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${WCECOMPAT_INCLUDE_DIR} ${QT_INCLUDES} ${MSSDK_DIR}) 0069 else(WINCE) 0070 set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${QT_INCLUDES} ${MSSDK_DIR}) 0071 endif(WINCE) 0072 endif (MINGW) 0073 0074 endif (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR) 0075 # required for configure 0076 set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN_INCLUDES}) 0077 set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${KDEWIN_LIBRARIES}) 0078 0079 if (KDEWIN_FOUND) 0080 if (NOT KDEWin_FIND_QUIETLY) 0081 message(STATUS "Found KDEWin library: ${KDEWIN_LIBRARY}") 0082 endif (NOT KDEWin_FIND_QUIETLY) 0083 0084 else (KDEWIN_FOUND) 0085 if (KDEWin_FIND_REQUIRED) 0086 message(FATAL_ERROR "Could NOT find KDEWin library\nPlease install it first") 0087 endif (KDEWin_FIND_REQUIRED) 0088 endif (KDEWIN_FOUND) 0089 endif (WIN32)