title: CMake 3.12 With Vulkan in CLion Issues
body: <p>I am trying to link Vulkan correctly in CMake, and I receive an error when I attempt to refresh/build. Here is my <code>CMakeList.txt</code>:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.12)
  project(game)
  
  set(CMAKE_CXX_STANDARD 17)
  set(SOURCE_FILES game.cpp window.cpp window.hpp type_definitions.hpp windows_definitions.hpp)
  
  add_executable(${PROJECT_NAME} ${SOURCE_FILES})
  
  find_package(Vulkan REQUIRED)
  
  include_directories(${Vulkan_INCLUDE_DIRS})
  target_link_libraries(${PROJECT_NAME} ${Vulkan_LIBRARY})
  </code></pre>
  
  <p>However, I receive the following error:</p>
  
  <blockquote>
    <p>C:\Users\username.CLion2018.2\system\cygwin_cmake\bin\cmake.exe
    -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /cygdrive/c/Users/username/Projects/Programming/game
    -- Could NOT find Vulkan (missing: Vulkan_LIBRARY)  CMake Error: The following variables are used in this project, but they are set to
    NOTFOUND. Please set them or make sure they are set and tested
    correctly in the CMake files: Vulkan_LIBRARY (ADVANCED)
        linked by target "game" in directory /cygdrive/c/Users/username/Projects/Programming/game</p>
  </blockquote>
  
  <p>So, I have tried to do it manually:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.12)
  project(game)
  
  set(CMAKE_CXX_STANDARD 17)
  set(SOURCE_FILES game.cpp window.cpp window.hpp type_definitions.hpp windows_definitions.hpp)
  
  add_executable(${PROJECT_NAME} ${SOURCE_FILES})
  
  find_path(Vulkan_INCLUDE_DIR NAMES vulkan/vulkan.h PATHS "$ENV{VULKAN_SDK}/Include")
  find_library(Vulkan_LIBRARY NAMES "vulkan-1" PATHS "$ENV{VULKAN_SDK}/Lib" NO_DEFAULT_PATH)
  
  include_directories(${Vulkan_INCLUDE_DIRS})
  target_link_libraries(${PROJECT_NAME} ${Vulkan_LIBRARY})
  </code></pre>
  
  <p>And still get another error...</p>
  
  <blockquote>
    <p>C:\Users\username.CLion2018.2\system\cygwin_cmake\bin\cmake.exe
    -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /cygdrive/c/Users/username/Projects/Programming/game CMake Error: The
    following variables are used in this project, but they are set to
    NOTFOUND. Please set them or make sure they are set and tested
    correctly in the CMake files: Vulkan_LIBRARY
        linked by target "game" in directory /cygdrive/c/Users/username/Projects/Programming/game</p>
  </blockquote>
  
  <p>Now, this baffles me because I have installed the Vulkan SDK and my <code>VULKAN_SDK</code> path variable is set correctly. It also seems to gather the include directory correctly, and only fails when trying to get the library. I have also checked in  my file explorer that the <code>vulkan-1.lib</code> file exists and is in the path searched by <code>$ENV{VULKAN_SDK}/Lib</code>. What could possibly go wrong? Is it something to do with cygwin or my cmake version? I am using c++ (GCC) 7.3.0 from cygwin x64 and cmake 3.12.3 bundled with CLion.</p>
  
  <p>EDIT: This works, but I do not want it to be a permanent solution:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.12)
  project(game)
  
  set(CMAKE_CXX_STANDARD 17)
  set(SOURCE_FILES game.cpp window.cpp window.hpp type_definitions.hpp windows_definitions.hpp)
  
  add_executable(${PROJECT_NAME} ${SOURCE_FILES})
  
  include_directories("$ENV{VULKAN_SDK}/Include")
  target_link_libraries(${PROJECT_NAME} "$ENV{VULKAN_SDK}/Lib/vulkan-1.lib")
  </code></pre>