fixing images in webpreview when linked statically
authorMarcus Eggenberger <egs@quassel-irc.org>
Thu, 19 Feb 2009 22:24:36 +0000 (23:24 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 20 Feb 2009 09:11:52 +0000 (10:11 +0100)
CMakeLists.txt
src/common/main.cpp

index 3bebf68..00b4e66 100644 (file)
@@ -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)
index b567af4..2a33a3d 100644 (file)
 #  include "kcmdlinewrapper.h"
 #endif
 
+#if !defined(BUILD_CORE) && defined(STATIC)
+#include <QtPlugin>
+Q_IMPORT_PLUGIN(qjpeg)
+Q_IMPORT_PLUGIN(qgif)
+#endif
+
 #include "cliparser.h"
 #include "quassel.h"