Warning, /frameworks/kdelibs4support/cmake/modules/FindKopete.cmake is written in an unsupported language. File is not indexed.

0001 # - Try to find the Kopete library
0002 # Once done this will define
0003 #
0004 #  Kopete_FOUND - system has kopete
0005 #  KOPETE_INCLUDE_DIR - the kopete include directory
0006 #  KOPETE_LIBRARIES - Link these to use kopete
0007 
0008 # Copyright (c) 2007 Charles Connell <charles@connells.org>
0009 #
0010 # Redistribution and use is allowed according to the terms of the BSD license.
0011 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0012 
0013 if(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES)
0014 
0015   # read from cache
0016   set(Kopete_FOUND TRUE)
0017 
0018 else(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES)
0019 
0020   FIND_PATH(KOPETE_INCLUDE_DIR 
0021     NAMES
0022     kopete/kopete_export.h
0023     PATHS 
0024     ${KDE4_INCLUDE_DIR}
0025     ${INCLUDE_INSTALL_DIR}
0026     )
0027   
0028   FIND_LIBRARY(KOPETE_LIBRARIES 
0029     NAMES
0030     kopete
0031     PATHS
0032     ${KDE4_LIB_DIR}
0033     ${LIB_INSTALL_DIR}
0034     )
0035   if(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES)
0036     set(Kopete_FOUND TRUE)
0037   endif(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES)
0038 
0039   if(MSVC)
0040     FIND_LIBRARY(KOPETE_LIBRARIES_DEBUG 
0041       NAMES
0042       kopeted
0043       PATHS
0044       ${KDE4_LIB_DIR}
0045       ${LIB_INSTALL_DIR}
0046       )
0047     if(NOT KOPETE_LIBRARIES_DEBUG)
0048       set(Kopete_FOUND FALSE)
0049     endif(NOT KOPETE_LIBRARIES_DEBUG)
0050     
0051     if(MSVC_IDE)
0052       if( NOT KOPETE_LIBRARIES_DEBUG OR NOT KOPETE_LIBRARIES)
0053         message(FATAL_ERROR "\nCould NOT find the debug AND release version of the Kopete library.\nYou need to have both to use MSVC projects.\nPlease build and install both kopete libraries first.\n")
0054       endif( NOT KOPETE_LIBRARIES_DEBUG OR NOT KOPETE_LIBRARIES)
0055     else(MSVC_IDE)
0056       string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
0057       if(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
0058         set(KOPETE_LIBRARIES ${KOPETE_LIBRARIES_DEBUG})
0059       else(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
0060         set(KOPETE_LIBRARIES ${KOPETE_LIBRARIES})
0061       endif(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
0062     endif(MSVC_IDE)
0063   endif(MSVC)
0064 
0065   if(Kopete_FOUND)
0066     if(NOT Kopete_FIND_QUIETLY)
0067       message(STATUS "Found Kopete: ${KOPETE_LIBRARIES}")
0068     endif(NOT Kopete_FIND_QUIETLY)
0069   else(Kopete_FOUND)
0070     if(Kopete_FIND_REQUIRED)
0071       if(NOT KOPETE_INCLUDE_DIR)
0072         message(FATAL_ERROR "Could not find Kopete includes.")
0073       endif(NOT KOPETE_INCLUDE_DIR)
0074       if(NOT KOPETE_LIBRARIES)
0075         message(FATAL_ERROR "Could not find Kopete library.")
0076       endif(NOT KOPETE_LIBRARIES)
0077     else(Kopete_FIND_REQUIRED)
0078       if(NOT KOPETE_INCLUDE_DIR)
0079         message(STATUS "Could not find Kopete includes.")
0080       endif(NOT KOPETE_INCLUDE_DIR)
0081       if(NOT KOPETE_LIBRARIES)
0082         message(STATUS "Could not find Kopete library.")
0083       endif(NOT KOPETE_LIBRARIES)
0084     endif(Kopete_FIND_REQUIRED)
0085   endif(Kopete_FOUND)
0086 
0087 endif(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES)