title: cmake target_link_libraries() launching error Cannot specify link libraries for target "debug"
body: <p>I'm trying to link CLion and SFML (using windows, mingw w64, SFML 64, CMake)
  and i triied to configure the CMakeLists.txt properly.</p>
  
  <p>here's the cmakelist :</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.2)
  project(Test_Utilisation_SFML)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  
  set(SOURCE_FILES main.cpp)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
  
  message(WARNING "CMake runtime output Directory : ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
  
  add_executable(Test_Utilisation_SFML.exe ${SOURCE_FILES})
  
  # Detect and add SFML
  set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
  #Find any version 2.X of SFML
  #See the FindSFML.cmake file for additional details and instructions
  
  
  
  find_package(SFML 2 REQUIRED system window graphics network audio)
  
  if(SFML_FOUND)
      include_directories(${SFML_INCLUDE_DIR})
      message (WARNING "lib dir : ${SFML_INCLUDE_DIR}")
      message (WARNING "libs : ${SFML_LIBRARIES}")
      target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES})
      message(WARNING "Line that does not appear because it fails the previous line")
  endif()
  </code></pre>
  
  <p>and here's the output of CMake : </p>
  
  <pre><code>Error:Cannot specify link libraries for target "debug" which is not built by this project.
  Warning:CMake runtime output Directory : D:/JetBrains/workspace/c++/Test Utilisation SFML/bin
  Warning:lib dir : C:/lib/SFML/SFML-2.3/include
  Warning:libs : debug;C:/lib/SFML/SFML-2.3/lib/libsfml-system-d.a;optimized;C:/lib/SFML/SFML-2.3/lib/libsfml-system.a;debug;C:/lib/SFML/SFML-2.3/lib/libsfml-window-d.a;optimized;C:/lib/SFML/SFML-2.3/lib/libsfml-window.a;debug;C:/lib/SFML/SFML-2.3/lib/libsfml-graphics-d.a;optimized;C:/lib/SFML/SFML-2.3/lib/libsfml-graphics.a;debug;C:/lib/SFML/SFML-2.3/lib/libsfml-network-d.a;optimized;C:/lib/SFML/SFML-2.3/lib/libsfml-network.a;debug;C:/lib/SFML/SFML-2.3/lib/libsfml-audio-d.a;optimized;C:/lib/SFML/SFML-2.3/lib/libsfml-audio.a
  </code></pre>
  
  <p>I honnestly found it weird to see only "debug" as a target, i changed the findSFML.cmake file to make it</p>
  
  <pre><code>debug C:/lib/SFML/SFML-2.3/lib/libsfml-system-d.a
  </code></pre>
  
  <p>but it didn't change anything. it began earlier, i noticed i put my "add_executable" after the target_link_libraries command then changed that, the error didn't get any better.</p>
  
  <p>I didn't put any flag (like -lsfml-graphics etc) as i don't build for now (i can't, more precisely.)
  the set_CMAKE_RUNTIME_OUTPUT_DIRECTORY is here to force the output in the bin folder of the project, instead of in the Clion directory.</p>