title: Creating a static and dynamic lib at once
body: <p>How can I create a static and a dynamic library at once? I am using qt 5.1. I would like to have a <code>.pro</code> file which does both lib types. I would need it for windows and linux. I found something like this:</p>
  
  <pre><code>CONFIG += staticlib
  </code></pre>
  
  <p>But how can I also build the shared one?</p>
  
  <p>Here is my example at the moment (for the .so):</p>
  
  <pre><code>ROOT_DIR = ./..
  INCLUDE_DIR = $$ROOT_DIR/include
  SRC_DIR = $$ROOT_DIR/src
  BIN_DIR = $$ROOT_DIR/bin
  LIB_DIR = $$ROOT_DIR/lib
  MAKE_DIR = .
  
  unix {
  MOC_DIR = $$ROOT_DIR/moc
  OBJECTS_DIR = $$ROOT_DIR/obj
  }
  
  win32 {
  MOC_DIR = $$ROOT_DIR/moc.win
  OBJECTS_DIR = $$ROOT_DIR/obj.win
  }
  
  QT       -= gui
  
  TARGET = test
  TEMPLATE = lib
  
  DESTDIR = $$BIN_DIR
  
  DEFINES += TEST_LIBRARY
  
  SOURCES += Test.cpp
  
  HEADERS += Test.h\
          test_global.h
  </code></pre>
  
  <p>Can somebody tell my how to add the static library, also? And as I said, it should also work for windows, so, I need the right libs there. Thanks so far!</p>