From: Sune Vuorela <sune@debian.org>
Subject: Install sip files only when building for default python version
Forwarded: not-needed
Origin: vendor
Last-Update: 2011-07-01
Make it possible to only install the sip files under some conditions
old
|
new
|
python_install(__init__.py ${PYTHON_SITE |
252 | 252 | # Install the .sip files for anyone that wants to build bindings on top of PyKDE4. |
253 | 253 | # (Don't forget the / at the end of sip/.) |
254 | 254 | install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/) |
255 | | install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4 |
256 | | PATTERN "*~" EXCLUDE # This sucks, why can't I just whitelist what I _do_ want? |
257 | | PATTERN ".svn" EXCLUDE |
258 | | PATTERN "*.in" EXCLUDE) |
| 255 | if(DEFAULT_PYTHON_VERSION) |
| 256 | install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4 |
| 257 | PATTERN "*~" EXCLUDE # This sucks, why can't I just whitelist what I _do_ want? |
| 258 | PATTERN ".svn" EXCLUDE |
| 259 | PATTERN "*.in" EXCLUDE) |
| 260 | message("Installing sip files in this build pass") |
| 261 | else(DEFAULT_PYTHON_VERSION) |
| 262 | message("Not installing sip files in this build pass") |
| 263 | endif(DEFAULT_PYTHON_VERSION) |
259 | 264 | |
260 | 265 | add_subdirectory(tools) |
261 | 266 | #add_subdirectory(docs) |
262 | 267 | add_subdirectory(examples) |
263 | | if (PYTHON_VERSION_MAJOR LESS 3) |
| 268 | if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) |
264 | 269 | add_subdirectory(kpythonpluginfactory) |
265 | | endif () |
| 270 | endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) |
266 | 271 | |
267 | 272 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) |