Warning, /frameworks/kdelibs4support/cmake/modules/FindSIP.cmake is written in an unsupported language. File is not indexed.
0001 # Find SIP 0002 # ~~~~~~~~ 0003 # 0004 # SIP website: http://www.riverbankcomputing.co.uk/sip/index.php 0005 # 0006 # Find the installed version of SIP. FindSIP should be called after Python 0007 # has been found. 0008 # 0009 # This file defines the following variables: 0010 # 0011 # SIP_VERSION - The version of SIP found expressed as a 6 digit hex number 0012 # suitable for comparison as a string. 0013 # 0014 # SIP_VERSION_STR - The version of SIP found as a human readable string. 0015 # 0016 # SIP_EXECUTABLE - Path and filename of the SIP command line executable. 0017 # 0018 # SIP_INCLUDE_DIR - Directory holding the SIP C++ header file. 0019 # 0020 # SIP_DEFAULT_SIP_DIR - Default directory where .sip files should be installed 0021 # into. 0022 0023 # Copyright (c) 2007, Simon Edwards <simon@simonzone.com> 0024 # Redistribution and use is allowed according to the terms of the BSD license. 0025 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0026 0027 0028 0029 IF(SIP_VERSION) 0030 # Already in cache, be silent 0031 SET(SIP_FOUND TRUE) 0032 ELSE(SIP_VERSION) 0033 0034 FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH}) 0035 0036 EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config) 0037 IF(sip_config) 0038 STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config}) 0039 STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config}) 0040 STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_EXECUTABLE ${sip_config}) 0041 IF(NOT SIP_DEFAULT_SIP_DIR) 0042 STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config}) 0043 ENDIF(NOT SIP_DEFAULT_SIP_DIR) 0044 STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config}) 0045 FILE(TO_CMAKE_PATH ${SIP_DEFAULT_SIP_DIR} SIP_DEFAULT_SIP_DIR) 0046 FILE(TO_CMAKE_PATH ${SIP_INCLUDE_DIR} SIP_INCLUDE_DIR) 0047 IF(EXISTS ${SIP_EXECUTABLE}) 0048 SET(SIP_FOUND TRUE) 0049 ELSE() 0050 MESSAGE(STATUS "Found SIP configuration but the sip executable could not be found.") 0051 ENDIF() 0052 ENDIF(sip_config) 0053 0054 IF(SIP_FOUND) 0055 IF(NOT SIP_FIND_QUIETLY) 0056 MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}") 0057 ENDIF(NOT SIP_FIND_QUIETLY) 0058 ELSE(SIP_FOUND) 0059 IF(SIP_FIND_REQUIRED) 0060 MESSAGE(FATAL_ERROR "Could not find SIP") 0061 ENDIF(SIP_FIND_REQUIRED) 0062 ENDIF(SIP_FOUND) 0063 0064 ENDIF(SIP_VERSION)