| 72 | | find_package(Qt4 REQUIRED) |
| | 72 | # Check for Qt unless WITH_KDE is requested |
| | 73 | if (NOT WITH_KDE) |
| | 74 | find_package(Qt4 REQUIRED) |
| | 75 | else (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}) |
| | 99 | endif (NOT WITH_KDE) |
| | 100 | |
| 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) |