staged-plugins_cmake-patch.diff

Larry Shaffer, 2013-03-12 12:19 PM

Download (1.86 KB)

View differences:

python/plugins/CMakeLists.txt
14 14

  
15 15
ADD_CUSTOM_TARGET(staged-plugins)
16 16

  
17
ADD_CUSTOM_TARGET(staged-plugins-pyc DEPENDS staged-plugins
18
  COMMAND ${PYTHON_EXECUTABLE} -m compileall -q "${PYTHON_OUTPUT_DIRECTORY}/plugins"
19
  WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
20
  COMMENT "Byte-compiling staged Python plugins..."
21
)
22

  
23
# plugins can also be staged with CMake option at build time
24
IF(WITH_STAGED_PLUGINS)
25
  IF(WITH_PY_COMPILE)
26
    ADD_CUSTOM_TARGET(staged-plugins-on-build ALL DEPENDS staged-plugins-pyc)
27
  ELSE(WITH_PY_COMPILE)
28
    ADD_CUSTOM_TARGET(staged-plugins-on-build ALL DEPENDS staged-plugins)
29
  ENDIF(WITH_PY_COMPILE)
30
ENDIF(WITH_STAGED_PLUGINS)
31

  
32
ADD_CUSTOM_TARGET(clean-staged-plugins
33
  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PYTHON_OUTPUT_DIRECTORY}/plugins
34
)
35

  
36 17
MACRO (PLUGIN_INSTALL plugin subdir )
37 18

  
38 19
  # regular project build's install command and target
......
79 60
ADD_SUBDIRECTORY(GdalTools)
80 61
ADD_SUBDIRECTORY(db_manager)
81 62
ADD_SUBDIRECTORY(sextante)
63

  
64

  
65
ADD_CUSTOM_TARGET(staged-plugins-pyc DEPENDS staged-plugins
66
  COMMAND ${PYTHON_EXECUTABLE} -m compileall -q "${PYTHON_OUTPUT_DIRECTORY}/plugins"
67
  WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
68
  COMMENT "Byte-compiling staged Python plugins..."
69
)
70

  
71
# plugins can also be staged with CMake option at build time
72
IF(WITH_STAGED_PLUGINS)
73
  IF(WITH_PY_COMPILE)
74
    ADD_CUSTOM_TARGET(staged-plugins-on-build ALL DEPENDS staged-plugins-pyc)
75
  ELSE(WITH_PY_COMPILE)
76
    ADD_CUSTOM_TARGET(staged-plugins-on-build ALL DEPENDS staged-plugins)
77
  ENDIF(WITH_PY_COMPILE)
78
ENDIF(WITH_STAGED_PLUGINS)
79

  
80
ADD_CUSTOM_TARGET(clean-staged-plugins
81
  COMMAND ${CMAKE_COMMAND} -E remove_directory ${PYTHON_OUTPUT_DIRECTORY}/plugins
82
)