File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ ELSE(WIN32)
45
45
SET(ENV{PYTHONPATH} \" ${QGIS_OUTPUT_DIRECTORY} /python/:\$ ENV{PYTHONPATH}\" )
46
46
MESSAGE(\" LD_LIBRARY_PATH:\$ ENV{LD_LIBRARY_PATH}\" )
47
47
ENDIF(WIN32)
48
+
49
+ IF(APPLE)
50
+ SET(ENV{QGIS_MAC_PKGDATA_DIR} \" ${CMAKE_SOURCE_DIR} \" )
51
+ SET(ENV{QGIS_MAC_SVG_DIR} \" ${CMAKE_SOURCE_DIR} /images/svg\" )
52
+ ENDIF(APPLE)
53
+
48
54
MESSAGE(\" PYTHONPATH:\$ ENV{PYTHONPATH}\" )
49
55
MESSAGE(STATUS \" Running ${PYTHON_EXECUTABLE} ${loc} ${wo_semicolon} \" )
50
56
EXECUTE_PROCESS(
Original file line number Diff line number Diff line change 1
1
IF (ENABLE_TESTS )
2
2
IF (APPLE )
3
3
# override default data path, otherwise looks for Resources in app bundle
4
- SET (QGIS_DATA_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR } /resources" )
4
+ SET (QGIS_DATA_SUBDIR "${CMAKE_SOURCE_DIR } /resources" )
5
5
ENDIF (APPLE )
6
6
ADD_SUBDIRECTORY (src )
7
7
ADD_SUBDIRECTORY (bench )
Original file line number Diff line number Diff line change @@ -73,6 +73,18 @@ def getQgisTestApp():
73
73
myUseDefaultPathFlag = True
74
74
QGISAPP .setPrefixPath (myPath , myUseDefaultPathFlag )
75
75
76
+ if sys .platform .startswith ('darwin' ):
77
+ # override resource paths, otherwise looks for Resources in app
78
+ if 'QGIS_MAC_PKGDATA_DIR' in os .environ :
79
+ myPkgPath = os .environ ['QGIS_MAC_PKGDATA_DIR' ]
80
+ QGISAPP .setPkgDataPath (myPkgPath )
81
+ if 'QGIS_MAC_SVG_DIR' in os .environ :
82
+ mySVGPath = os .environ ['QGIS_MAC_SVG_DIR' ]
83
+ mySVGPaths = QGISAPP .svgPaths ()
84
+ # doesn't get rid of incorrect path, just adds correct one
85
+ mySVGPaths .prepend (mySVGPath )
86
+ QGISAPP .setDefaultSvgPaths (mySVGPaths )
87
+
76
88
QGISAPP .initQgis ()
77
89
s = QGISAPP .showSettings ()
78
90
print s
You can’t perform that action at this time.
0 commit comments