Ticket #47125: python_modules_dont_link_against_libpython.diff

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

    From: Adeodato Simó <adeodato@debian.org>
    Subject: Do not let python modules link against libpython.
    Forwarded: no
    Origin: vendor
    Last-Update: 2008-01-25
    
    Do not link python modules against -lpython2.X. Since KDE4's cmake file
    uses --no-undefined by default, we have to remove that from the default
    CMAKE_SHARED_LINKER_FLAGS variable, but only for the pykde4 subdirectory.
    
    old new if (NOT _exit_code) 
    152152    python_install(${CMAKE_CURRENT_BINARY_DIR}/pykdeconfig.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
    153153endif ()
    154154
     155# Do not use --no-undefined for python modules.
     156STRING(REPLACE -Wl,--no-undefined "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
     157
    155158file(GLOB kdecore_files_sip sip/kdecore/*.sip)
    156159set(SIP_EXTRA_FILES_DEPEND ${kdecore_files_sip})
    157160add_sip_python_module(PyKDE4.kdecore sip/kdecore/kdecoremod.sip ${KDE4_KDECORE_LIBS} ${KDE4_KPTY_LIBS} ${QT_QTNETWORK_LIBRARY})