From: Sune Vuorela 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 Index: pykde4-4.14.1/CMakeLists.txt =================================================================== --- CMakeLists.txt.orig +++ CMakeLists.txt @@ -252,16 +252,21 @@ python_install(__init__.py ${PYTHON_SITE # Install the .sip files for anyone that wants to build bindings on top of PyKDE4. # (Don't forget the / at the end of sip/.) install(FILES ${CMAKE_BINARY_DIR}/pykde_config.sip DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4/) -install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4 - PATTERN "*~" EXCLUDE # This sucks, why can't I just whitelist what I _do_ want? - PATTERN ".svn" EXCLUDE - PATTERN "*.in" EXCLUDE) +if(DEFAULT_PYTHON_VERSION) + install(DIRECTORY sip/ DESTINATION ${SIP_FILES_INSTALL_DIR}/PyKDE4 + PATTERN "*~" EXCLUDE # This sucks, why can't I just whitelist what I _do_ want? + PATTERN ".svn" EXCLUDE + PATTERN "*.in" EXCLUDE) + message("Installing sip files in this build pass") +else(DEFAULT_PYTHON_VERSION) + message("Not installing sip files in this build pass") +endif(DEFAULT_PYTHON_VERSION) add_subdirectory(tools) #add_subdirectory(docs) add_subdirectory(examples) -if (PYTHON_VERSION_MAJOR LESS 3) +if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) add_subdirectory(kpythonpluginfactory) -endif () +endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)