Warning, /games/kajongg/cmake-modules/FindTwisted.cmake is written in an unsupported language. File is not indexed.
0001 # Find Python-Twisted 0002 # ~~~~~~~~~~ 0003 # Copyright (c) 2010, Wolfgang Rohdewald <wolfgang@rohdewald.de> 0004 # adapted from FindPyDBus.cmake in the project guidance-power-manager 0005 # Redistribution and use is allowed according to the terms of the BSD license. 0006 # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 0007 # 0008 # Python Twisted website: https://www.twistedmatrix.com 0009 # 0010 # Find the installed version of Python Twisted 0011 0012 IF(TWISTED_FOUND) 0013 # Already in cache, be silent 0014 SET(TWISTED_FOUND TRUE) 0015 ELSE(TWISTED_FOUND) 0016 0017 GET_FILENAME_COMPONENT(_cmake_module_path ${CMAKE_CURRENT_LIST_FILE} PATH) 0018 0019 EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} 0020 ${_cmake_module_path}/FindTwisted.py 0021 OUTPUT_VARIABLE twisted_config) 0022 0023 IF(twisted_config) 0024 STRING(REGEX MATCH "twisted_version:([^\n]+).*$" _dummy ${twisted_config}) 0025 SET(TWISTED_VERSION "${CMAKE_MATCH_1}" CACHE STRING "Twisted's version as a human-readable string") 0026 IF(TWISTED_VERSION VERSION_LESS TWISTED_MIN_VERSION) 0027 set(TWISTED_VERSION_COMPATIBLE FALSE) 0028 ELSE() 0029 set(TWISTED_VERSION_COMPATIBLE TRUE) 0030 SET(TWISTED_FOUND TRUE) 0031 ENDIF() 0032 ENDIF(twisted_config) 0033 0034 IF(TWISTED_FOUND) 0035 IF(NOT TWISTED_FIND_QUIETLY) 0036 MESSAGE(STATUS "Found python3-twisted") 0037 ENDIF(NOT TWISTED_FIND_QUIETLY) 0038 ELSE(TWISTED_FOUND) 0039 IF(TWISTED_FIND_REQUIRED) 0040 MESSAGE(FATAL_ERROR "Could not find python3-twisted") 0041 ELSE(TWISTED_FIND_REQUIRED) 0042 MESSAGE(STATUS "did not find python3-twisted") 0043 ENDIF(TWISTED_FIND_REQUIRED) 0044 ENDIF(TWISTED_FOUND) 0045 0046 ENDIF(TWISTED_FOUND)