mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Merge pull request #3803 from dakcarto/qt5py3-more-mac-fixes
This commit is contained in:
commit
fe8dfe1c1c
@ -4,6 +4,34 @@
|
|||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||||
|
|
||||||
|
# Macro that checks for extra include directories set during GRASS compilation.
|
||||||
|
# This helps for platforms where GRASS is built against dependencies in
|
||||||
|
# non-standard locations; like on Mac, where the system gettext is too old and
|
||||||
|
# GRASS is built off of gettext in /usr/local/opt, or some other custom prefix.
|
||||||
|
# Such includes may need found again when including some GRASS headers.
|
||||||
|
|
||||||
|
MACRO (CHECK_GRASS_EXTRA_INCLUDE_DIRS GRASS_VERSION)
|
||||||
|
SET(GRASS_EXTRA_INCLUDE_DIRS${GRASS_VERSION} ""
|
||||||
|
CACHE STRING "Extra includes string used for GRASS${GRASS_VERSION}")
|
||||||
|
|
||||||
|
IF(UNIX AND EXISTS ${GRASS_INCLUDE_DIR${GRASS_VERSION}}/Make/Platform.make
|
||||||
|
AND "${GRASS${GRASS_VERSION}_EXTRA_INCLUDE_DIRS}" STREQUAL "")
|
||||||
|
|
||||||
|
FILE(READ ${GRASS_INCLUDE_DIR${GRASS_VERSION}}/Make/Platform.make _platformfile)
|
||||||
|
STRING(REGEX MATCH "INCLUDE_DIRS *= *[^\n]*" _config_includes "${_platformfile}")
|
||||||
|
SET(_extra_includes "")
|
||||||
|
IF(NOT "${_config_includes}" STREQUAL "")
|
||||||
|
STRING(REGEX REPLACE "INCLUDE_DIRS *= *([^\n]*)" "\\1" _extra_includes "${_config_includes}")
|
||||||
|
ENDIF()
|
||||||
|
IF(NOT "${_extra_includes}" STREQUAL "")
|
||||||
|
SET(GRASS_EXTRA_INCLUDE_DIRS${GRASS_VERSION} ${_extra_includes}
|
||||||
|
CACHE STRING "Extra includes string used for GRASS${GRASS_VERSION}" FORCE)
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED (GRASS_EXTRA_INCLUDE_DIRS${GRASS_VERSION})
|
||||||
|
ENDMACRO (CHECK_GRASS_EXTRA_INCLUDE_DIRS GRASS_VERSION)
|
||||||
|
|
||||||
# macro that checks for grass installation in specified directory
|
# macro that checks for grass installation in specified directory
|
||||||
|
|
||||||
MACRO (CHECK_GRASS G_PREFIX)
|
MACRO (CHECK_GRASS G_PREFIX)
|
||||||
@ -108,10 +136,12 @@ MACRO (CHECK_GRASS G_PREFIX)
|
|||||||
SET(GRASS_FOUND${GRASS_FIND_VERSION} TRUE)
|
SET(GRASS_FOUND${GRASS_FIND_VERSION} TRUE)
|
||||||
SET(GRASS_FOUND TRUE) # GRASS_FOUND is true if at least one version was found
|
SET(GRASS_FOUND TRUE) # GRASS_FOUND is true if at least one version was found
|
||||||
SET(GRASS_PREFIX${GRASS_CACHE_VERSION} ${G_PREFIX})
|
SET(GRASS_PREFIX${GRASS_CACHE_VERSION} ${G_PREFIX})
|
||||||
|
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_CACHE_VERSION})
|
||||||
IF(GRASS_FIND_VERSION EQUAL 6)
|
IF(GRASS_FIND_VERSION EQUAL 6)
|
||||||
# Set also normal variable with number
|
# Set also normal variable with number
|
||||||
SET(GRASS_INCLUDE_DIR${GRASS_FIND_VERSION} ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}})
|
SET(GRASS_INCLUDE_DIR${GRASS_FIND_VERSION} ${GRASS_INCLUDE_DIR${GRASS_CACHE_VERSION}})
|
||||||
SET(GRASS_PREFIX${GRASS_FIND_VERSION} ${G_PREFIX})
|
SET(GRASS_PREFIX${GRASS_FIND_VERSION} ${G_PREFIX})
|
||||||
|
CHECK_GRASS_EXTRA_INCLUDE_DIRS(${GRASS_FIND_VERSION})
|
||||||
ENDIF(GRASS_FIND_VERSION EQUAL 6)
|
ENDIF(GRASS_FIND_VERSION EQUAL 6)
|
||||||
ENDIF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
|
ENDIF(GRASS_LIBRARIES_FOUND${GRASS_FIND_VERSION})
|
||||||
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
|
ENDIF(GRASS_MAJOR_VERSION${GRASS_FIND_VERSION} EQUAL GRASS_FIND_VERSION)
|
||||||
|
@ -31,16 +31,15 @@ else(QCA_INCLUDE_DIR AND QCA_LIBRARY)
|
|||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
if(APPLE)
|
set(_qca_fw)
|
||||||
if(QCA_LIBRARY AND QCA_LIBRARY MATCHES "qca(2)?-qt5\\.framework")
|
if(QCA_LIBRARY MATCHES "/qca.*\\.framework")
|
||||||
set(QCA_LIBRARY "${QCA_LIBRARY}" CACHE FILEPATH "QCA framework" FORCE)
|
string(REGEX REPLACE "^(.*/qca.*\\.framework).*$" "\\1" _qca_fw "${QCA_LIBRARY}")
|
||||||
set(QCA_INCLUDE_DIR "${QCA_LIBRARY}/Headers" CACHE FILEPATH "QCA framework headers" FORCE)
|
endif()
|
||||||
endif()
|
|
||||||
endif(APPLE)
|
|
||||||
|
|
||||||
find_path(QCA_INCLUDE_DIR
|
find_path(QCA_INCLUDE_DIR
|
||||||
NAMES QtCrypto
|
NAMES QtCrypto
|
||||||
PATHS
|
PATHS
|
||||||
|
"${_qca_fw}/Headers"
|
||||||
${LIB_DIR}/include
|
${LIB_DIR}/include
|
||||||
"$ENV{LIB_DIR}/include"
|
"$ENV{LIB_DIR}/include"
|
||||||
$ENV{INCLUDE}
|
$ENV{INCLUDE}
|
||||||
|
@ -24,16 +24,14 @@ IF(EXISTS QSCINTILLA_VERSION_STR)
|
|||||||
SET(QSCINTILLA_FOUND TRUE)
|
SET(QSCINTILLA_FOUND TRUE)
|
||||||
ELSE(EXISTS QSCINTILLA_VERSION_STR)
|
ELSE(EXISTS QSCINTILLA_VERSION_STR)
|
||||||
|
|
||||||
FIND_PATH(QSCINTILLA_INCLUDE_DIR
|
set(QSCINTILLA_LIBRARY_NAMES
|
||||||
NAMES Qsci/qsciglobal.h
|
qscintilla2-qt5
|
||||||
PATHS
|
libqt5scintilla2
|
||||||
${Qt5Core_INCLUDE_DIRS}
|
libqscintilla2-qt5
|
||||||
"${QT_INCLUDE_DIR}"
|
qt5scintilla2
|
||||||
/usr/local/include
|
libqscintilla2-qt5.dylib
|
||||||
/usr/include
|
qscintilla2
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QSCINTILLA_LIBRARY_NAMES qscintilla2-qt5 libqt5scintilla2 libqscintilla2-qt5 qt5scintilla2 libqscintilla2-qt5.dylib)
|
|
||||||
|
|
||||||
find_library(QSCINTILLA_LIBRARY
|
find_library(QSCINTILLA_LIBRARY
|
||||||
NAMES ${QSCINTILLA_LIBRARY_NAMES}
|
NAMES ${QSCINTILLA_LIBRARY_NAMES}
|
||||||
@ -43,6 +41,21 @@ ELSE(EXISTS QSCINTILLA_VERSION_STR)
|
|||||||
/usr/lib
|
/usr/lib
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(_qsci_fw)
|
||||||
|
if(QSCINTILLA_LIBRARY MATCHES "/qscintilla.*\\.framework")
|
||||||
|
string(REGEX REPLACE "^(.*/qscintilla.*\\.framework).*$" "\\1" _qsci_fw "${QSCINTILLA_LIBRARY}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
FIND_PATH(QSCINTILLA_INCLUDE_DIR
|
||||||
|
NAMES Qsci/qsciglobal.h
|
||||||
|
PATHS
|
||||||
|
"${_qsci_fw}/Headers"
|
||||||
|
${Qt5Core_INCLUDE_DIRS}
|
||||||
|
"${QT_INCLUDE_DIR}"
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
)
|
||||||
|
|
||||||
IF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
|
IF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
|
||||||
SET(QSCINTILLA_FOUND TRUE)
|
SET(QSCINTILLA_FOUND TRUE)
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ ELSE(EXISTS QSCI_MOD_VERSION_STR)
|
|||||||
IF(QSCI_FOUND)
|
IF(QSCI_FOUND)
|
||||||
FIND_PATH(QSCI_SIP_DIR
|
FIND_PATH(QSCI_SIP_DIR
|
||||||
NAMES Qsci/qscimod5.sip
|
NAMES Qsci/qscimod5.sip
|
||||||
PATHS ${PYQT5_SIP_DIR}
|
PATHS ${PYQT5_SIP_DIR} ${SIP_DEFAULT_SIP_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(NOT QSCI_FIND_QUIETLY)
|
IF(NOT QSCI_FIND_QUIETLY)
|
||||||
|
@ -12,15 +12,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
|
set(QWT_LIBRARY_NAMES qwt-qt5 qwt6-qt5 qwt)
|
||||||
/usr/include
|
|
||||||
/usr/local/include
|
|
||||||
"$ENV{LIB_DIR}/include"
|
|
||||||
"$ENV{INCLUDE}"
|
|
||||||
PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6
|
|
||||||
)
|
|
||||||
|
|
||||||
set(QWT_LIBRARY_NAMES qwt-qt5 qwt6-qt5)
|
|
||||||
|
|
||||||
find_library(QWT_LIBRARY
|
find_library(QWT_LIBRARY
|
||||||
NAMES ${QWT_LIBRARY_NAMES}
|
NAMES ${QWT_LIBRARY_NAMES}
|
||||||
@ -31,6 +23,20 @@ find_library(QWT_LIBRARY
|
|||||||
"$ENV{LIB}"
|
"$ENV{LIB}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(_qwt_fw)
|
||||||
|
if(QWT_LIBRARY MATCHES "/qwt.*\\.framework")
|
||||||
|
string(REGEX REPLACE "^(.*/qwt.*\\.framework).*$" "\\1" _qwt_fw "${QWT_LIBRARY}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
|
||||||
|
"${_qwt_fw}/Headers"
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
"$ENV{LIB_DIR}/include"
|
||||||
|
"$ENV{INCLUDE}"
|
||||||
|
PATH_SUFFIXES qwt-qt4 qwt qwt5 qwt6
|
||||||
|
)
|
||||||
|
|
||||||
IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
|
IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
|
||||||
SET(QWT_FOUND TRUE)
|
SET(QWT_FOUND TRUE)
|
||||||
ENDIF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
|
ENDIF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
|
||||||
|
@ -12,15 +12,6 @@
|
|||||||
# QWTPOLAR_INCLUDE_DIR = where to find headers
|
# QWTPOLAR_INCLUDE_DIR = where to find headers
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
FIND_PATH(QWTPOLAR_INCLUDE_DIR NAMES qwt_polar.h PATHS
|
|
||||||
/usr/include
|
|
||||||
/usr/local/include
|
|
||||||
"$ENV{LIB_DIR}/include"
|
|
||||||
"$ENV{INCLUDE}"
|
|
||||||
PATH_SUFFIXES qwtpolar qwt
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(QWTPOLAR_LIBRARY NAMES qwtpolar PATHS
|
FIND_LIBRARY(QWTPOLAR_LIBRARY NAMES qwtpolar PATHS
|
||||||
/usr/lib
|
/usr/lib
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
@ -28,6 +19,20 @@ FIND_LIBRARY(QWTPOLAR_LIBRARY NAMES qwtpolar PATHS
|
|||||||
"$ENV{LIB}/lib"
|
"$ENV{LIB}/lib"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
SET(_qwtpolar_fw)
|
||||||
|
IF (QWTPOLAR_LIBRARY MATCHES "/qwtpolar.*\\.framework")
|
||||||
|
STRING(REGEX REPLACE "^(.*/qwtpolar.*\\.framework).*$" "\\1" _qwtpolar_fw "${QWTPOLAR_LIBRARY}")
|
||||||
|
ENDIF ()
|
||||||
|
|
||||||
|
FIND_PATH(QWTPOLAR_INCLUDE_DIR NAMES qwt_polar.h PATHS
|
||||||
|
"${_qwtpolar_fw}/Headers"
|
||||||
|
/usr/include
|
||||||
|
/usr/local/include
|
||||||
|
"$ENV{LIB_DIR}/include"
|
||||||
|
"$ENV{INCLUDE}"
|
||||||
|
PATH_SUFFIXES qwtpolar qwt
|
||||||
|
)
|
||||||
|
|
||||||
IF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
IF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
||||||
SET(QWTPOLAR_FOUND TRUE)
|
SET(QWTPOLAR_FOUND TRUE)
|
||||||
ENDIF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
ENDIF (QWTPOLAR_INCLUDE_DIR AND QWTPOLAR_LIBRARY)
|
||||||
|
@ -24,6 +24,7 @@ __copyright__ = '(C) 2016, Victor Olaya'
|
|||||||
__revision__ = '$Format:%H$'
|
__revision__ = '$Format:%H$'
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import codecs
|
||||||
import yaml
|
import yaml
|
||||||
from qgis.core import Qgis, QgsWkbTypes
|
from qgis.core import Qgis, QgsWkbTypes
|
||||||
from qgis.PyQt.QtCore import QSettings, QLocale
|
from qgis.PyQt.QtCore import QSettings, QLocale
|
||||||
@ -35,7 +36,7 @@ def loadShortHelp():
|
|||||||
for f in os.listdir(path):
|
for f in os.listdir(path):
|
||||||
if f.endswith("yaml"):
|
if f.endswith("yaml"):
|
||||||
filename = os.path.join(path, f)
|
filename = os.path.join(path, f)
|
||||||
with open(filename) as stream:
|
with codecs.open(filename, encoding='utf-8') as stream:
|
||||||
h.update(yaml.load(stream))
|
h.update(yaml.load(stream))
|
||||||
version = ".".join(Qgis.QGIS_VERSION.split(".")[0:2])
|
version = ".".join(Qgis.QGIS_VERSION.split(".")[0:2])
|
||||||
overrideLocale = QSettings().value('locale/overrideFlag', False, bool)
|
overrideLocale = QSettings().value('locale/overrideFlag', False, bool)
|
||||||
|
@ -190,7 +190,7 @@ MACRO(ADD_GRASSPLUGIN GRASS_BUILD_VERSION)
|
|||||||
)
|
)
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(grassplugin${GRASS_BUILD_VERSION} PROPERTIES
|
SET_TARGET_PROPERTIES(grassplugin${GRASS_BUILD_VERSION} PROPERTIES
|
||||||
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\""
|
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" ${GRASS_EXTRA_INCLUDE_DIRS${GRASS_BUILD_VERSION}}"
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
@ -216,7 +216,7 @@ MACRO(ADD_GRASSPLUGIN GRASS_BUILD_VERSION)
|
|||||||
ADD_EXECUTABLE(qgis.g.browser${GRASS_BUILD_VERSION} ${GRASS_BROWSER_SRCS})
|
ADD_EXECUTABLE(qgis.g.browser${GRASS_BUILD_VERSION} ${GRASS_BROWSER_SRCS})
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(qgis.g.browser${GRASS_BUILD_VERSION} PROPERTIES
|
SET_TARGET_PROPERTIES(qgis.g.browser${GRASS_BUILD_VERSION} PROPERTIES
|
||||||
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\""
|
COMPILE_FLAGS "-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\" ${GRASS_EXTRA_INCLUDE_DIRS${GRASS_BUILD_VERSION}}"
|
||||||
)
|
)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES (qgis.g.browser${GRASS_BUILD_VERSION}
|
TARGET_LINK_LIBRARIES (qgis.g.browser${GRASS_BUILD_VERSION}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user