Ticket #47125: optional_install_sip_files.diff

File optional_install_sip_files.diff, 1.6 KB (added by RJVB (René Bertin), 10 years ago)
  • CMakeLists.txt

    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 
    252252# Install the .sip files for anyone that wants to build bindings on top of PyKDE4.
    253253# (Don't forget the / at the end of sip/.)
    254254install(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)
     255if(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")
     261else(DEFAULT_PYTHON_VERSION)
     262   message("Not installing sip files in this build pass")
     263endif(DEFAULT_PYTHON_VERSION)
    259264
    260265add_subdirectory(tools)
    261266#add_subdirectory(docs)
    262267add_subdirectory(examples)
    263 if (PYTHON_VERSION_MAJOR LESS 3)
     268if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
    264269    add_subdirectory(kpythonpluginfactory)
    265 endif ()
     270endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
    266271
    267272feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)