From 736012bf4a8b834d1adb2f4a3b0156380ecb5dcc Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Thu, 19 Feb 2009 23:24:36 +0100 Subject: [PATCH] fixing images in webpreview when linked statically --- CMakeLists.txt | 10 ++++++---- src/common/main.cpp | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bebf683..00b4e661 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,18 +248,20 @@ if(STATIC AND CMAKE_COMPILER_IS_GNUCXX) endif(STATIC AND CMAKE_COMPILER_IS_GNUCXX) if(WIN32) - #if(STATIC) link_libraries(imm32 winmm dbghelp Secur32) # missing by default :/ - #endif(STATIC) + if(HAVE_SSL) link_libraries(${OPENSSL_LIBRARIES} libeay32MD) endif(HAVE_SSL) -endif(WIN32) -if(WIN32) set(RC_WIN32 ../pics/win32.rc) # for app icons on windows endif(WIN32) +if(STATIC) + link_directories(${QT_PLUGINS_DIR}/imageformats) + link_libraries(qjpeg qgif) +endif(STATIC) + # We need to create a version.gen # For this, we create our genversion binary and make sure it is run every time. add_executable(genversion ${CMAKE_SOURCE_DIR}/src/common/genversion.cpp) diff --git a/src/common/main.cpp b/src/common/main.cpp index b567af4f..2a33a3d8 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -41,6 +41,12 @@ # include "kcmdlinewrapper.h" #endif +#if !defined(BUILD_CORE) && defined(STATIC) +#include +Q_IMPORT_PLUGIN(qjpeg) +Q_IMPORT_PLUGIN(qgif) +#endif + #include "cliparser.h" #include "quassel.h" -- 2.20.1