DESCRIPTION "KDE Frameworks"
PURPOSE "Required for integration into the Plasma desktop"
)
- else(WITH_KDE)
+ else()
find_package(KF5Sonnet QUIET)
set_package_properties(KF5Sonnet PROPERTIES TYPE RECOMMENDED
URL "http://api.kde.org/frameworks-api/frameworks5-apidocs/sonnet/html"
DESCRIPTION "framework for providing spell-checking capabilities"
PURPOSE "Enables spell-checking support in input widgets"
)
- endif(WITH_KDE)
- endif(ECM_FOUND)
+ endif()
+ endif()
- endif(BUILD_GUI)
+ endif()
if (BUILD_CORE)
find_package(Qt5Script QUIET)
PURPOSE "Required for encryption support"
)
- endif(BUILD_CORE)
+ endif()
find_package(Qt5LinguistTools QUIET)
set_package_properties(Qt5LinguistTools PROPERTIES TYPE RECOMMENDED
endif()
endif()
-else(USE_QT5)
+else()
message(STATUS "Building for Qt4...")
set(QT_MIN_VERSION "4.8.0")
)
set(CMAKE_C_FLAGS ${_cflags})
- else(WITH_KDE)
+ else()
find_package(Phonon QUIET)
set_package_properties(Phonon PROPERTIES TYPE RECOMMENDED
URL "https://projects.kde.org/projects/kdesupport/phonon"
DESCRIPTION "a multimedia abstraction library"
PURPOSE "Required for audio notifications"
)
- endif(WITH_KDE)
+ endif()
find_package(IndicateQt QUIET)
set_package_properties(IndicateQt PROPERTIES TYPE OPTIONAL
PURPOSE "Provides integration into the Ayatana notification system used by e.g. Ubuntu"
)
- endif(BUILD_GUI)
+ endif()
if (BUILD_CORE)
check_function_exists(umask HAVE_UMASK)
if(HAVE_UMASK)
add_definitions(-DHAVE_UMASK)
- endif(HAVE_UMASK)
+ endif()
endif()
if (NOT GIT_HEAD OR NOT GIT_DESCRIBE)
if (DEFINED ENV{GIT_HEAD})
set(GIT_HEAD $ENV{GIT_HEAD})
- endif ()
+ endif()
if (DEFINED ENV{GIT_DESCRIBE})
set(GIT_DESCRIBE $ENV{GIT_DESCRIBE})
endif()
if(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
set(EXECINFO_INCLUDES "")
-else(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
+else()
# We found the header file's include dir.
# Now determine if it's built-in or not, by searching the library file.
# Built-in, no further action is needed
set(EXECINFO_LIBRARIES "")
message(STATUS "Found execinfo (built-in)")
- else(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND")
+ else()
# It's an external library.
message(STATUS "Found execinfo: ${EXECINFO_LIBRARIES}")
- endif(EXECINFO_LIBRARIES STREQUAL "EXECINFO_LIBRARIES-NOTFOUND")
+ endif()
set(EXECINFO_FOUND true)
-endif(EXECINFO_INCLUDES STREQUAL "EXECINFO_INCLUDES-NOTFOUND")
+endif()
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h")
if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
- endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
+ endif()
file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000)
string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
set(PHONON_VERSION "${CMAKE_MATCH_1}")
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
_phonon_find_version()
-endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
+endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Phonon DEFAULT_MSG PHONON_INCLUDE_DIR PHONON_LIBRARY)
# in cache already
set(QCA2-QT5_FOUND TRUE)
-else (QCA2-QT5_INCLUDE_DIR AND QCA2-QT5_LIBRARIES)
+else()
if (NOT WIN32)
find_package(PkgConfig)
pkg_check_modules(PC_QCA2-QT5 QUIET qca2-qt5)
set(QCA2-QT5_DEFINITIONS ${PC_QCA2-QT5_CFLAGS_OTHER})
- endif (NOT WIN32)
+ endif()
find_library_with_debug(QCA2-QT5_LIBRARIES
WIN32_DEBUG_POSTFIX d
mark_as_advanced(QCA2-QT5_INCLUDE_DIR QCA2-QT5_LIBRARIES)
-endif (QCA2-QT5_INCLUDE_DIR AND QCA2-QT5_LIBRARIES)
+endif()
endif()
# in cache already
set(QCA2_FOUND TRUE)
-else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
+else()
if (NOT WIN32)
find_package(PkgConfig)
pkg_check_modules(PC_QCA2 QUIET qca2)
set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER})
- endif (NOT WIN32)
+ endif()
find_library_with_debug(QCA2_LIBRARIES
WIN32_DEBUG_POSTFIX d
mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES)
-endif (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
+endif()
"-o ${CMAKE_CURRENT_BINARY_DIR}/win32.o"
"--include-dir=${CMAKE_CURRENT_SOURCE_DIR}")
set(COMMON_DEPS ${COMMON_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/win32.o PARENT_SCOPE)
- endif(WINDRES_EXECUTABLE)
- else(MINGW)
+ endif()
+ else()
set(COMMON_DEPS ${COMMON_DEPS} ${CMAKE_CURRENT_SOURCE_DIR}/win32.rc PARENT_SCOPE)
- endif(MINGW)
-endif(WIN32)
+ endif()
+endif()
if(WANT_MONO OR WANT_QTCLIENT)
if(EMBED_DATA)
set(CLIENT_RCS ${CLIENT_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/pics.qrc PARENT_SCOPE)
- else(EMBED_DATA)
+ else()
# We don't find them yet externally, so disable installation
set(CLIENT_RCS ${CLIENT_RCS} ${CMAKE_CURRENT_SOURCE_DIR}/pics.qrc PARENT_SCOPE)
# install(FILES qt-logo.png
# quassel-large.png
# DESTINATION ${DATA_INSTALL_DIR}/quassel/pics)
- endif(EMBED_DATA)
-endif(WANT_MONO OR WANT_QTCLIENT)
+ endif()
+endif()
set(flg 1)
if(LINGUAS)
string(REGEX MATCH "${lang}" flg ${LINGUAS})
- endif(LINGUAS)
+ endif()
if(flg)
generate_ts(QM ${basename})
generate_qm(QM ${basename})
list(APPEND qm_files ${QM})
list(APPEND gen_linguas ${lang})
- endif(flg)
+ endif()
endforeach(PO_FILE ${avail_pofiles})
if(gen_linguas)
list(REMOVE_DUPLICATES gen_linguas)
- endif(gen_linguas)
+ endif()
message(STATUS "Including languages: ${gen_linguas}")
-else(QT_LCONVERT_EXECUTABLE)
+else()
message(STATUS "WARNING: lconvert not found, you won't have translations!")
-endif(QT_LCONVERT_EXECUTABLE)
+endif()
# For a static or win32 build, we need to include Qt translations if available
if(QT_TRANSLATIONS_DIR)
list(APPEND qm_files ${CMAKE_CURRENT_BINARY_DIR}/${filename})
endforeach(absfile ${lang_files})
endforeach(LANG ${gen_linguas})
- endif(STATIC OR WIN32)
-endif(QT_TRANSLATIONS_DIR)
+ endif()
+endif()
# Write resource file
set(resfile ${CMAKE_CURRENT_BINARY_DIR}/i18n.qrc)
if(EMBED_DATA)
set(COMMON_RCS ${COMMON_RCS} ${resfile} PARENT_SCOPE)
-else(EMBED_DATA)
+else()
install(FILES ${qm_files} DESTINATION ${CMAKE_INSTALL_DATADIR}/quassel/translations)
-endif(EMBED_DATA)
+endif()
add_custom_target(po DEPENDS ${qm_files})
if(BUILD_CORE)
add_subdirectory(core)
include_directories(BEFORE core)
-endif(BUILD_CORE)
+endif()
if(BUILD_GUI)
add_subdirectory(client)
add_subdirectory(uisupport)
if(STATIC)
link_directories(${QT_PLUGINS_DIR}/imageformats)
set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} qjpeg qgif)
- endif(STATIC)
-endif(BUILD_GUI)
+ endif()
+endif()
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) # for version.gen
OUTPUT_NAME ../quasselcore)
target_link_libraries(quasselcore mod_core mod_common ${COMMON_LIBRARIES} ${QUASSEL_SSL_LIBRARIES} ${QT_QTMAIN_LIBRARY})
install(TARGETS quasselcore RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-endif(WANT_CORE)
+endif()
if (KDE4_FOUND)
include_directories(${KDE4_INCLUDES})
OUTPUT_NAME ../quasselclient)
target_link_libraries(quasselclient mod_qtui mod_uisupport mod_client mod_common ${COMMON_LIBRARIES} ${CLIENT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES} ${QT_QTMAIN_LIBRARY})
install(TARGETS quasselclient RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-endif(WANT_QTCLIENT)
+endif()
if(WANT_MONO)
add_executable(quassel WIN32 common/main.cpp qtui/monoapplication.cpp ${CLIENT_DEPS} ${CORE_DEPS} ${COMMON_DEPS})
OUTPUT_NAME ../quassel)
target_link_libraries(quassel mod_qtui mod_uisupport mod_client mod_core mod_common ${COMMON_LIBRARIES} ${CLIENT_LIBRARIES} ${QUASSEL_SSL_LIBRARIES} ${QT_QTMAIN_LIBRARY})
install(TARGETS quassel RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-endif(WANT_MONO)
+endif()
# Build bundles for MacOSX
if(APPLE)
COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Core ..)
add_custom_command(TARGET quasselcore POST_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/scripts/build/macosx_makePackage.sh Mono ..)
- endif(DEPLOY)
-endif(APPLE)
+ endif()
+endif()
if (APPLE)
set(SOURCES ${SOURCES} mac_utils.cpp)
-endif(APPLE)
+endif()
if (WIN32)
set(SOURCES ${SOURCES} logbacktrace_win.cpp)
if (APPLE)
target_link_libraries(mod_common "-framework CoreServices" "-framework CoreFoundation")
-endif(APPLE)
+endif()
target_link_libraries(mod_common ${CMAKE_DL_LIBS} ${EXECINFO_LIBRARIES})
if(HAVE_SSL)
set(SOURCES ${SOURCES} sslserver.cpp)
include_directories(${OPENSSL_INCLUDE_DIR})
-endif(HAVE_SSL)
+endif()
if (QCA2_FOUND)
add_definitions(-DHAVE_QCA2)
if(HAVE_SSL)
set(SOURCES ${SOURCES} sslinfodlg.cpp)
set(FORMS ${FORMS} sslinfodlg.ui)
-endif(HAVE_SSL)
+endif()
if (INDICATEQT_FOUND)
add_definitions(-DHAVE_INDICATEQT)