Show
Ignore:
Timestamp:
01/15/08 07:13:45 (10 months ago)
Author:
erijo
Message:

Enable KDE4 support.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/qt-gui_qt4/CMakeLists.txt

    r5888 r6048  
    7070set(QT_MIN_VERSION "4.3.0") 
    7171 
    72 find_package(Qt4 REQUIRED) 
     72# Check for Qt unless WITH_KDE is requested 
     73if (NOT WITH_KDE) 
     74  find_package(Qt4 REQUIRED) 
     75else (NOT WITH_KDE) 
     76  find_package(KDE4 REQUIRED) 
     77  set(USE_KDE ${KDE4_FOUND}) 
     78 
     79  # FindKDE4Internal adds "-Wl,--no-undefined" to the linker command 
     80  # line. This doesn't work for use, since all symbols from the daemon 
     81  # are undefined. So we remove it. 
     82  string(REPLACE "-Wl,--no-undefined" "" 
     83    CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") 
     84 
     85  # FindKDE4Internal adds "-fvisibility=hidden" to the compiler 
     86  # command line. This hides symbols in the plugin that the daemon 
     87  # looks for. So we remove it. 
     88  string(REPLACE "-fvisibility=hidden" "" 
     89    CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 
     90 
     91  add_definitions(${KDE4_DEFINITIONS}) 
     92  link_directories(${KDE4_LIB_DIR}) 
     93 
     94  include_directories(${KDE4_INCLUDE_DIR}) 
     95  set(LIBRARIES ${LIBRARIES} 
     96    ${KDE4_KDECORE_LIBS} 
     97    ${KDE4_KDEUI_LIBS} 
     98    ${KDE4_KIO_LIBS}) 
     99endif (NOT WITH_KDE) 
     100 
    73101include_directories(${QT_INCLUDE_DIR} 
    74102  ${QT_QTCORE_INCLUDE_DIR} 
     
    89117  set(LIBRARIES ${LIBRARIES} ${GPGME_LIBRARIES}) 
    90118endif (GPGME_FOUND) 
    91  
    92  
    93 # Optional, check for KDE4 
    94 if (WITH_KDE) 
    95   message(FATAL_ERROR "KDE4 not yet supported. Please compile without KDE support.") 
    96   find_package(KDE4 REQUIRED) 
    97   set(USE_KDE ${KDE4_FOUND}) 
    98  
    99   add_definitions(${KDE4_DEFINITIONS}) 
    100   link_directories(${KDE4_LIB_DIR}) 
    101   include_directories(${KDE4_INCLUDE_DIR}) 
    102   set(LIBRARIES ${LIBRARIES} kdeui kio kabc) 
    103 endif (WITH_KDE) 
    104119 
    105120