From d0c4e0de9d3f771d6ac6b79c4105b911ea35cb0d Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Wed, 15 Jul 2020 20:00:49 +0300 Subject: [PATCH] Use SIP_INCLUDE_DIR and SIP_MODULE_DIR only with SIP v4 --- cmake/FindSIP.cmake | 6 ++++-- python/CMakeLists.txt | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/cmake/FindSIP.cmake b/cmake/FindSIP.cmake index 8ad24b66d99..80ae7553c8e 100644 --- a/cmake/FindSIP.cmake +++ b/cmake/FindSIP.cmake @@ -40,8 +40,10 @@ ELSE(SIP_VERSION) STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config}) STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_BINARY_PATH ${sip_config}) STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config}) - STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config}) - STRING(REGEX REPLACE ".*\nsip_module_dir:([^\n]+).*$" "\\1" SIP_MODULE_DIR ${sip_config}) + IF(${SIP_VERSION_STR} VERSION_LESS 5) + STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config}) + STRING(REGEX REPLACE ".*\nsip_module_dir:([^\n]+).*$" "\\1" SIP_MODULE_DIR ${sip_config}) + ENDIF(${SIP_VERSION_STR} VERSION_LESS 5) SET(SIP_FOUND TRUE) ENDIF(sip_config) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index ae08e14b27a..d31d0339733 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -85,6 +85,12 @@ INCLUDE_DIRECTORIES(SYSTEM ${SPATIALINDEX_INCLUDE_DIR} ) +IF (${SIP_VERSION_STR} VERSION_LESS 5) + INCLUDE_DIRECTORIES(SYSTEM + ${SIP_INCLUDE_DIR} + ) +ENDIF (${SIP_VERSION_STR} VERSION_LESS 5) + IF (WITH_GUI) INCLUDE_DIRECTORIES(SYSTEM ${QSCINTILLA_INCLUDE_DIR}