link_libraries(${CARBON_LIBRARY})
endif()
-# Always embed on Windows, OSX or for a static build; never embed when enabling KDE integration
+# Always embed on Windows or OSX; never embed when enabling KDE integration
set(EMBED_DEFAULT OFF)
-if (STATIC OR WIN32 OR APPLE)
+if (WIN32 OR APPLE)
set(EMBED_DEFAULT ON)
endif()
cmake_dependent_option(EMBED_DATA "Embed icons and translations into the binaries instead of installing them" ${EMBED_DEFAULT}
- "NOT STATIC;NOT WIN32;NOT WITH_KDE" ${EMBED_DEFAULT})
+ "NOT WIN32;NOT WITH_KDE" ${EMBED_DEFAULT})
if (NOT EMBED_DEFAULT)
add_feature_info(EMBED_DATA EMBED_DATA "Embed icons and translations in the binaries instead of installing them")
endif()
# The following options are not for end-user consumption, so don't list them in the feature summary
cmake_dependent_option(DEPLOY "Add required libs to bundle resources and create a dmg. Note: requires Qt to be built with 10.4u SDK" OFF "APPLE" OFF)
-# Static builds are not supported and require some manual setup! Don't enable unless you know what you're doing (we don't know either)
-cmake_dependent_option(STATIC "Enable static building (not supported)" OFF "NOT WITH_KDE" OFF)
-
-# For static builds, arbitrary extra libs might need to be linked
-# Define a comma-separated list here
-# e.g. for pgsql, we need -DLINK_EXTRA=pq;crypt
-set(LINK_EXTRA "" CACHE STRING "Semicolon-separated list of libraries to be linked")
-if (LINK_EXTRA)
- string(REPLACE "," ";" LINK_EXTRA ${LINK_EXTRA})
- link_libraries(${LINK_EXTRA})
-endif()
-
# List of authenticators and the cmake flags to build them
# (currently that's just LDAP, but more can be added here).
link_libraries(Version dwmapi shlwapi)
set(QT_QTMAIN_LIBRARY Qt5::WinMain)
endif()
- if(HAVE_SSL AND STATIC)
- find_package(OpenSSL REQUIRED)
- link_libraries(${OPENSSL_LIBRARIES} ${OPENSSL_EAY_LIBRARIES})
- endif()
-endif()
-
-
-# Static builds (very much non-portable, so don't use -DSTATIC
-# unless you know what you do!)
-#####################################################################
-
-if(STATIC AND CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "-static-libgcc ${CMAKE_CXX_FLAGS}")
- link_directories(${CMAKE_BINARY_DIR}/staticlibs) # override dynamic libs
- if (HAVE_SSL)
- set(QUASSEL_SSL_LIBRARIES ssl crypto) # these miss in static builds
- endif()
endif()
+++ /dev/null
-These notes should help you to build a quasselcore statically linked to Qt
-and OpenSSL. Note that these are just hints that work for me; ymmv.
-
-1.) Get a statically linked Qt
- As of Qt 4.4, this configure line for building should probably work if
- you only want to build a static core (since we disable most GUI
- components here; you'd need to adjust that line for a full Qt!)
-
- ./configure -static -no-accessibility -qt-sql-sqlite -qt-zlib -no-qt3support \
- -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg -nomake demos -nomake examples \
- -nomake gui -nomake uic -nomake opengl -nomake tools -no-opengl -no-sm -no-xshape \
- -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-fontconfig -no-tablet \
- -no-xkb -no-glib -no-svg -openssl-linked -no-phonon -no-webkit -no-dbus -no-xmlpatterns \
- -prefix /usr/local/Trolltech/qt-4.4-static
-
- To only build non-X dependent parts of Qt:
-
- $> export QT4_TARGET_DIRECTORIES="src/tools/moc src/tools/rcc src/tools/uic src/corelib src/xml \
- src/network src/sql src/plugins/codecs src/script"
- $> for i in $QT4_TARGET_DIRECTORIES; do make -C $i; done
-
- NOTE: This has not really been tested and may or may not be working for
- you. If in doubt, follow the official route and just do make
- and make install.
-
-2.) Link some system libs into /path/to/builddir/staticlibs
- (we need this, because otherwise your quasselcore wouldn't be
- portable)
-
- On my system, I have this in staticlibs:
- libcrypto.a -> /usr/lib/libcrypto.a
- libssl.a -> /usr/lib/libssl.a
- libstdc++.a -> /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/libstdc++.a
-
- YMMV depending on the exact versions installed on your system, of course.
-
-3.) Build Quassel Core:
-
- $> cd /path/to/builddir
- $> cmake /path/to/source -DSTATIC=1 -DWANT_QTCLIENT=0 -DWANT_MONO=0 -DQT=/usr/local/Trolltech/qt-4.4-static
- $> make
-
-4.) Enjoy.
message(STATUS "WARNING: lconvert not found, you won't have translations!")
endif()
-# For a static or win32 build, we need to include Qt translations if available
+# For a Win32 build, we need to include Qt translations if available
if(QT_TRANSLATIONS_DIR)
- if(STATIC OR WIN32)
+ if(WIN32)
foreach(LANG ${gen_linguas})
file(GLOB lang_files ${QT_TRANSLATIONS_DIR}/qt_${LANG}*.qm)
foreach(absfile ${lang_files})
include_directories(BEFORE client)
include_directories(BEFORE uisupport)
include_directories(BEFORE qtui)
-
- if(STATIC)
- link_directories(${QT_PLUGINS_DIR}/imageformats)
- set(CLIENT_LIBRARIES ${CLIENT_LIBRARIES} qjpeg qgif)
- endif()
endif()
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) # for version.gen
# include <KCoreAddons/Kdelibs4ConfigMigrator>
#endif
-#if !defined(BUILD_CORE) && defined(STATIC)
-#include <QtPlugin>
-Q_IMPORT_PLUGIN(qjpeg)
-Q_IMPORT_PLUGIN(qgif)
-#endif
-
#include "quassel.h"
#include "types.h"