Skip to content
Permalink
Browse files
move internal python extensions to common directory and fix metasearc…
…h install
  • Loading branch information
jef-n committed May 17, 2014
1 parent f89b2cc commit 25885b8a0cfbc01764f63feb98d0eddeaaf65f3e
Showing 848 changed files with 62 additions and 27 deletions.
@@ -60,7 +60,6 @@ SET (WITH_INTERNAL_QWTPOLAR TRUE CACHE BOOL "Use internal build of QwtPolar")
SET (WITH_INTERNAL_QEXTSERIALPORT TRUE CACHE BOOL "Use internal build of Qextserialport")

SET (WITH_INTERNAL_SPATIALITE FALSE CACHE BOOL "Determines whether SPATIALITE support should be built internally")
SET (WITH_PYSPATIALITE FALSE CACHE BOOL "Determines whether PYSPATIALITE should be built")
SET (WITH_QSPATIALITE FALSE CACHE BOOL "Determines whether QSPATIALITE sql driver should be built")
IF(WITH_INTERNAL_SPATIALITE)
SET(SPATIALITE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/core/spatialite/headers)
@@ -70,8 +69,6 @@ IF(WITH_INTERNAL_SPATIALITE)
ENDIF(WIN32 OR APPLE OR CYGWIN)
ENDIF (WITH_INTERNAL_SPATIALITE)

SET (WITH_INTERNAL_HTTPLIB TRUE CACHE BOOL "Use internal httplib2")

SET (WITH_ORACLE FALSE CACHE BOOL "Determines whether Oracle support should be built")
IF(WITH_ORACLE)
SET(HAVE_ORACLE TRUE)
@@ -1,13 +1,10 @@
SET (PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python)
SET(PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python)

ADD_SUBDIRECTORY(plugins)
ADD_SUBDIRECTORY(qsci_apis)
ADD_SUBDIRECTORY(console)
ADD_SUBDIRECTORY(pyplugin_installer)

IF (WITH_PYSPATIALITE)
ADD_SUBDIRECTORY(pyspatialite)
ENDIF (WITH_PYSPATIALITE)
ADD_SUBDIRECTORY(ext-libs)

IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(
@@ -205,3 +202,4 @@ IF(WITH_PY_COMPILE)
DEPENDS pyutils
)
ENDIF(WITH_PY_COMPILE)

@@ -0,0 +1,42 @@
SET (QGIS_PYTHON_DIR ${QGIS_DATA_DIR}/python)
SET (PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python)

SET (WITH_PYSPATIALITE FALSE CACHE BOOL "Determines whether PYSPATIALITE should be built")
IF (WITH_PYSPATIALITE)
ADD_SUBDIRECTORY(pyspatialite)
ENDIF (WITH_PYSPATIALITE)

MACRO(EXT_PYLIB lib)
STRING(TOUPPER ${lib} ulib)
SET (WITH_INTERNAL_${ulib} TRUE CACHE BOOL "Determines whether ${ulib} should be included")
IF(WITH_INTERNAL_${ulib})
INSTALL(DIRECTORY ${lib} DESTINATION "${QGIS_PYTHON_DIR}")

ADD_CUSTOM_TARGET(py${lib} ALL)
FILE(GLOB_RECURSE files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${lib}/*)
FOREACH(file ${files})
ADD_CUSTOM_COMMAND(TARGET py${lib}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${file} "${PYTHON_OUTPUT_DIRECTORY}/${file}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Copy ${file} => ${PYTHON_OUTPUT_DIRECTORY}/${file}"
DEPENDS ${file}
)
ENDFOREACH(file)
ENDIF(WITH_INTERNAL_${ulib})
ENDMACRO(EXT_PYLIB lib)

FOREACH(pkg httplib2 jinja2 markupsafe owslib pygments dateutil pytz)
EXT_PYLIB(${pkg})
ENDFOREACH(pkg)

IF(WITH_INTERNAL_SIX)
INSTALL(FILES six.py DESTINATION "${QGIS_PYTHON_DIR}")

ADD_CUSTOM_COMMAND(TARGET pyutils
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy six.py "${PYTHON_OUTPUT_DIRECTORY}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS six.py
)
ENDIF(WITH_INTERNAL_SIX)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,3 @@
FILE(GLOB PY_FILES *.py)

PLUGIN_INSTALL(processing ./httplib2 ${PY_FILES})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.