Skip to content

Commit 1e34f86

Browse files
committedJan 31, 2017
FindQGIS.cmake fix plugins search path; add QGIS_UI_INCLUDE_DIR
1 parent 3ca86ba commit 1e34f86

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
 

‎cmake/FindQGIS.cmake‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
## QGIS_ANALYSIS_LIBRARY = full path to the ANALYSIS library
88
## QGIS_PLUGIN_DIR = full path to where QGIS plugins are installed
99
## QGIS_INCLUDE_DIR = where to find headers
10+
## QGIS_UI_INCLUDE_DIR = where to find ui_* generated headers
1011
##
1112
## Tim Sutton
13+
## Larry Shaffer (2017-01-31)
1214

1315
#MESSAGE("Searching for QGIS")
1416
IF(WIN32)
@@ -100,6 +102,7 @@ ELSE(WIN32)
100102
${QGIS_PREFIX_PATH}/lib/qgis/plugins/
101103
/usr/lib64/qgis/plugins
102104
/usr/lib/qgis
105+
/usr/lib/qgis/plugins
103106
/usr/local/lib/qgis/plugins
104107
${QGIS_MAC_PATH}/PlugIns/qgis
105108
"$ENV{LIB_DIR}/lib/qgis/plugins"
@@ -115,6 +118,15 @@ ELSE(WIN32)
115118
${QGIS_MAC_PATH}/Frameworks/qgis_core.framework/Headers
116119
"$ENV{LIB_DIR}/include/qgis"
117120
)
121+
FIND_PATH(QGIS_UI_INCLUDE_DIR
122+
NAMES ui_qgscredentialdialog.h
123+
PATHS
124+
{QGIS_PREFIX_PATH}/include/qgis
125+
/usr/include/qgis
126+
/usr/local/include/qgis
127+
/Library/Frameworks/qgis_gui.framework/Headers
128+
"$ENV{LIB_DIR}/include/qgis"
129+
)
118130
# also get other frameworks' headers folders on OS X
119131
IF (APPLE)
120132
FIND_PATH(QGIS_GUI_INCLUDE_DIR
@@ -133,8 +145,10 @@ ELSE(WIN32)
133145
${QGIS_INCLUDE_DIR}
134146
${QGIS_GUI_INCLUDE_DIR}
135147
${QGIS_ANALYSIS_INCLUDE_DIR}
148+
${QGIS_UI_INCLUDE_DIR}
136149
)
137150
ENDIF (APPLE)
151+
138152
FIND_LIBRARY(QGIS_CORE_LIBRARY
139153
NAMES qgis_core
140154
PATHS

0 commit comments

Comments
 (0)