Skip to content

Commit

Permalink
Allow running fTools plugin from build dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Santilli committed Oct 23, 2012
1 parent 227401d commit b892a02
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
5 changes: 1 addition & 4 deletions python/plugins/fTools/CMakeLists.txt
@@ -1,14 +1,11 @@
FILE(GLOB INSTALLER_FILES *.py)
SET(INSTALLER_FILES ${INSTALLER_FILES})

FILE(GLOB UI_FILES *.ui)
PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})
PYQT4_ADD_RESOURCES(PYRC_FILES resources.qrc)
ADD_CUSTOM_TARGET(ftools ALL DEPENDS ${PYUI_FILES} ${PYRC_FILES})

SET(INSTALLER_FILES ${INSTALLER_FILES} ${PYUI_FILES} ${PYRC_FILES})

INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools)
PLUGIN_INSTALL(fTools . ${INSTALLER_FILES} __init__.py)

ADD_SUBDIRECTORY(tools)
ADD_SUBDIRECTORY(icons)
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/fTools/__init__.py
Expand Up @@ -50,5 +50,5 @@ def authorName():
return "Carson J. Q. Farmer"

def classFactory( iface ):
from fTools import fToolsPlugin
from .fTools import fToolsPlugin
return fToolsPlugin( iface )
3 changes: 2 additions & 1 deletion python/plugins/fTools/icons/CMakeLists.txt
Expand Up @@ -5,7 +5,8 @@ gis-0.1.svg
logo.svg
menu_icons.svg
)
INSTALL(FILES ${VECTOR_GRAPHICS_FILES} logo_small.png DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools/icons)

PLUGIN_INSTALL(fTools icons ${VECTOR_GRAPHICS_FILES} logo_small.png)

ADD_SUBDIRECTORY(default)
ADD_SUBDIRECTORY(gis)
3 changes: 2 additions & 1 deletion python/plugins/fTools/icons/default/CMakeLists.txt
Expand Up @@ -47,4 +47,5 @@ delaunay.png
layer_extent.png
merge_shapes.png
)
INSTALL(FILES ${ICON_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools/icons/default)

PLUGIN_INSTALL(fTools icons/default ${ICON_FILES})
3 changes: 2 additions & 1 deletion python/plugins/fTools/icons/gis/CMakeLists.txt
@@ -1,2 +1,3 @@
FILE(GLOB ICON_FILES *.png)
INSTALL(FILES ${ICON_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools/icons/gis)

PLUGIN_INSTALL(fTools icons/gis ${ICON_FILES})
5 changes: 1 addition & 4 deletions python/plugins/fTools/tools/CMakeLists.txt
Expand Up @@ -3,7 +3,4 @@ FILE(GLOB UI_FILES *.ui)

PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES})

ADD_CUSTOM_TARGET(ftools_tools ALL DEPENDS ${PYUI_FILES})

INSTALL(FILES ${PY_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools/tools)
INSTALL(FILES ${PYUI_FILES} DESTINATION ${QGIS_DATA_DIR}/python/plugins/fTools/tools)
PLUGIN_INSTALL(fTools tools ${PY_FILES} ${PYUI_FILES})

0 comments on commit b892a02

Please sign in to comment.