title: Link external library CMakeLists.txt on Windows
body: <p>I'm trying to realize a CMakeLists.txt to compile my project under Linux and Windows. I use two libraries : SFML and boost. However, I want that my project can be built under Linux or Windows without the installation of libraries from a user.</p>
  
  <p>I explain. Libraries SFML and boost are compiled and placed in my folder project and I want that no matter on which computer I download my project, I can build it.</p>
  
  <p>And here is my problem, I can't link externally from the libraries folder in my folder project, the SFML and boost libraries.</p>
  
  <p>Here is my CMakeLists.txt :</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.0)
  
  project(r-type_client CXX)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
  
  include_directories(./boost/include
          ./SFML/include
          ./include
          )
  
  if(UNIX)
  
  set(BOOST_LIBRARY
  -L./boost/linux
  -lboost_regex
  )
  
  set(SFML_LIBRARY
  -L./SFML/linux
  -lsfml-graphics
  -lsfml-window
  -lsfml-system
  )
  
  add_executable(r-type_client
         srcs/Main.cpp
         )
  
  target_link_libraries(r-type_client
            ${BOOST_LIBRARY}
            ${SFML_LIBRARY}
            )
  
  elseif(WIN32)
  
  add_library(bar SHARED IMPORTED)
  set_property(TARGET bar PROPERTY IMPORTED_LOCATION        
  C:/Users/Hugo/Downloads/Old/client/SFML/windows/sfml-graphics.dll)
  set_property(TARGET bar PROPERTY IMPORTED_IMPLIB         
  C:/Users/Hugo/Downloads/Old/client/SFML/windows/sfml-graphics.lib)
  add_library(bor SHARED IMPORTED)
  set_property(TARGET bor PROPERTY IMPORTED_LOCATION 
  C:/Users/Hugo/Downloads/Old/client/SFML/windows/sfml-window.dll)
  set_property(TARGET bor PROPERTY IMPORTED_IMPLIB 
  C:/Users/Hugo/Downloads/Old/client/SFML/windows/sfml-window.lib)
  add_library(bur SHARED IMPORTED)
  set_property(TARGET bur PROPERTY IMPORTED_LOCATION 
  C:/Users/Hugo/Downloads/Old/client/SFML/windows/sfml-system.dll)
  set_property(TARGET bur PROPERTY IMPORTED_IMPLIB 
  C:/Users/Hugo/Downloads/Old/client/SFML/windows/sfml-system.lib)
  add_executable(r-type_client srcs/Main.cpp)
  target_link_libraries(r-type_client bar bor bur)
  
  endif(UNIX)
  </code></pre>