X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;h=da59dbdb602892868ce8a5e0bed125310b245fe2;hp=e28d90fb4c352874334504ee170a8d3a0782b4ff;hb=ff0f6746a6bf1b728d57352480e6cab0b98ac3a0;hpb=1514aaae673660c7a3e2a82545b8c3947ea3f9b7 diff --git a/CMakeLists.txt b/CMakeLists.txt index e28d90fb..da59dbdb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ # : select binaries to build # -DWITH_OPENSSL=OFF : Disable OpenSSL support # -DWITH_DBUS=OFF : Disable D-Bus support +# -DWITH_WEBKIT=OFF : Disable WebKit support # -DOXYGEN_ICONS=(Builtin|External) : If "Builtin" (the default), compile our Oxygen Icon Theme subset into the binary # : If "External", we assume Oxygen is already installed on the system # -DQUASSEL_ICONS=(Builtin|External) : If "Builtin" (the default), put our own icons into the binary @@ -20,7 +21,6 @@ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) - cmake_policy(SET CMP0005 NEW) endif(COMMAND cmake_policy) # Use our own (well, and KDE's) version of some modules @@ -34,6 +34,7 @@ option(WANT_MONO "Build the monolithic (all-in-one) binary" OFF) option(WITH_OPENSSL "Enable OpenSSL support if present on the system" ON) option(WITH_DBUS "Enable D-Bus support if present on the system" ON) +option(WITH_WEBKIT "Enable WebKit support if present on the system" ON) option(STATIC "Enable static building (might not be portable)" OFF) option(DEPLOY "Mac OS X only! Adds required libs to bundle resources and create a dmg. Note: requires Qt to be built with 10.4u SDK" OFF) @@ -61,8 +62,6 @@ set(DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/apps) set(ICON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/icons) set(XDG_APPS_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/applications) -add_definitions(-DPREFIX=${CMAKE_INSTALL_PREFIX}) - # Enable various flags on gcc if(CMAKE_COMPILER_IS_GNUCXX) # Let's just hope that all gccs support these options and skip the tests... @@ -136,6 +135,22 @@ else(WITH_DBUS) message(STATUS "Disabling D-Bus support") endif(WITH_DBUS) +# Setup QtWebKit support +if(WITH_WEBKIT) + if(QT_QTWEBKIT_FOUND) + message(STATUS "Found QtWebKit, enabling WebKit support") + add_definitions(-DHAVE_WEBKIT) + set(LINK_WEBKIT WEBKIT) + set(HAVE_WEBKIT true) + set(MOC_DEFINES ${MOC_DEFINES} -DHAVE_WEBKIT) + else(QT_QTWEBKIT_FOUND) + message(STATUS "QtWebKit not found, disabling D-Bus support") + endif(QT_QTWEBKIT_FOUND) +else(WITH_WEBKIT) + message(STATUS "Disabling WebKit support") +endif(WITH_WEBKIT) + + # Set global buildflags # This is very much non-portable, so don't use -DSTATIC until you know what # you do. @@ -147,15 +162,17 @@ if(STATIC AND CMAKE_COMPILER_IS_GNUCXX) endif(HAVE_SSL) endif(STATIC AND CMAKE_COMPILER_IS_GNUCXX) -if(STATIC AND WIN32) - link_libraries(imm32 winmm) # missing by default :/ - if(HAVE_SSL) +if(WIN32) + #if(STATIC) + link_libraries(imm32 winmm dbghelp) # missing by default :/ + #endif(STATIC) + if(HAVE_SSL) link_libraries(${OPENSSL_LIBRARIES} libeay32MD) - endif(HAVE_SSL) -endif(STATIC AND WIN32) + endif(HAVE_SSL) +endif(WIN32) if(WIN32) - set(RC_WIN32 pics/win32.rc) # for app icons on windows + set(RC_WIN32 ../pics/win32.rc) # for app icons on windows endif(WIN32) # This is dirty, but I haven't found a cleaner way to ensure that the generated .qrc files @@ -170,7 +187,7 @@ target_link_libraries(genversion ${QT_LIBRARIES} ${QT_CORE_LIB_DEPENDENCIES}) get_target_property(GENVERSION_EXECUTABLE genversion LOCATION) add_custom_target(genversion_run ALL ${GENVERSION_EXECUTABLE} - ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/src/common/version.gen) + ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/src/version.gen) add_dependencies(genversion_run genversion) # Decide what to do with icons @@ -203,7 +220,3 @@ add_subdirectory(icons) #add_subdirectory(pics) add_subdirectory(i18n) add_subdirectory(src) - -# Make sure version.gen exists before building mod_common -# TODO: make only main.cpp depend on that! Recompiles suck... -add_dependencies(mod_common genversion_run)