title: Building library with cmake
body: <p>I apologize for bothering you all, but I have a little compilation problem with cmake.</p>
  
  <p>I have a CMakeLists.txt file I'm using to build a test executable, and a shared library. They both have dependency to another library (SFML).</p>
  
  <p>I'm using cmake on window with MinGW.</p>
  
  <p>I know the name of the lib I'm building is kinda confusing with the sfml one, but it's supposed to be a SFML wrapper, so, I didn't find a better name!</p>
  
  <p>Here the CMakeLists.txt</p>
  
  <pre class="lang-none prettyprint-override"><code>cmake_minimum_required(VERSION 2.6)
  project(projectName)
  
  set(EXECUTABLE_NAME testSFML)
  set(LIBRARY_NAME    SFMLwindow)
  
  set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin/)
  
  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include /
  ${CMAKE_CURRENT_SOURCE_DIR}/../../include
  )
  
  link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../lib/)
  
  file(
      GLOB_RECURSE
      SRC_FILES
      src/*
  )
  
  file(
      GLOB_RECURSE
      INCLUDE_FILES
      include/*
  )
  
  add_executable(
  ${EXECUTABLE_NAME}
  main.cpp
  ${SRC_FILES}
  ${INCLUDE_FILES}
  )
  
  target_link_libraries(
      ${EXECUTABLE_NAME}
      sfml-main
      sfml-system
      sfml-window
  )
  
  
  add_library(
  ${LIBRARY_NAME}
  SHARED
  ${SRC_FILES}
  )
  </code></pre>
  
  <p>And what I get in the terminal : </p>
  
  <pre><code>"C:\MinGW\bin\mingw32-make.exe" 
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/iksemel/docs/WorkBench/programming/projets/TestSFML/cmake
  Linking CXX shared library libSFMLwindow.dll
  Creating library file: libSFMLwindow.dll.a
  CMakeFiles\SFMLwindow.dir/objects.a(SFMLWindow.cpp.obj):SFMLWindow.cpp:(.text+0x59):undefined reference to `_imp___ZN2sf9VideoModeC1Ejjj'
  CMakeFiles\SFMLwindow.dir/objects.a(SFMLWindow.cpp.obj):SFMLWindow.cpp:(.text+0xda): undefined reference to `_imp___ZN2sf6WindowC1ENS_9VideoModeERKSsjRKNS_15ContextSettingsE'
  CMakeFiles\SFMLwindow.dir/objects.a(SFMLWindow.cpp.obj):SFMLWindow.cpp:(.text+0x163): undefined reference to `_imp___ZN2sf6Window5closeEv'
  CMakeFiles\SFMLwindow.dir/objects.a(SFMLWindow.cpp.obj):SFMLWindow.cpp:(.text+0x1bd): undefined reference to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
  CMakeFiles\SFMLwindow.dir/objects.a(SFMLWindow.cpp.obj):SFMLWindow.cpp:(.text+0x1d8): undefined reference to `_imp___ZN2sf6Window7displayEv'
  collect2: ld a retourné 1 code d'état d'exécution
  mingw32-make.exe[2]: *** [libSFMLwindow.dll] Error 1
  mingw32-make.exe[1]: *** [CMakeFiles/SFMLwindow.dir/all] Error 2
  mingw32-make.exe: *** [all] Error 2
  </code></pre>
  
  <p>If anybody have a clue on what's happening, I'd be very gratefull!</p>