title: CMake and vcpkg x86_64-w64-mingw32/bin/ld: cannot find -lOpenGL32 when cross compiling
body: <p>I'm making project which uses sfml, imgui-sfml and nlohmann json. For my dependences im using vcpkg. My host machine is Arch and I wanna cross build to Windows x64. Im getting strange linking error, am I missing something easy here? Here is my toolchain file:</p>
  <pre><code>set(CMAKE_SYSTEM_NAME Windows)
  set(CMAKE_SYSTEM_PROCESSOR x64)
  
  # which tools to use
  set(CMAKE_PREFIX_PATH /usr/x86_64-w64-mingw32/)
  set(CMAKE_C_COMPILER   /usr/bin/x86_64-w64-mingw32-gcc)
  set(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)
  
  set(CMAKE_FIND_ROOT_PATH  /usr/x86_64-w64-mingw32)
  
  
  # search headers and libraries in the target environment
  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  </code></pre>
  <p>here is my custom triplet:</p>
  <pre><code>set(VCPKG_TARGET_ARCHITECTURE x64)
  set(VCPKG_CRT_LINKAGE dynamic)
  set(VCPKG_LIBRARY_LINKAGE static)
  
  set(VCPKG_CMAKE_SYSTEM_NAME MinGW)
  set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE /home/bor/Dokumenty/proj/sokoban/toolchain-minwin.cmake)
  
  </code></pre>
  <p>my CMakeLists.txt(im not using anywhere raw opengl, only sfml)</p>
  <pre><code>cmake_minimum_required(VERSION 3.5)
  cmake_policy(SET CMP0079 NEW)
  
  project(sokoban VERSION 0.0.0
                  DESCRIPTION &quot;Sokoban&quot;
                  LANGUAGES CXX)
  
  if(NOT CMAKE_BUILD_TYPE)
      set(CMAKE_BUILD_TYPE Debug)
  endif()
  
  
  #c++17 standard
  set(CMAKE_CXX_STANDARD 17)
  set(CMAKE_CXX_STANDARD_REQUIRED True)
  add_compile_options(-std=c++17)
  
  set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  
  add_subdirectory(src)
  
  #commented or not same error
  find_package(OpenGL REQUIRED)
  
  find_package(freetype CONFIG REQUIRED)
  find_package(nlohmann_json CONFIG REQUIRED)
  find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED)
  find_package(ImGui-SFML CONFIG REQUIRED)
  find_package(imgui CONFIG REQUIRED)
  
  target_link_libraries(sokoban PRIVATE nlohmann_json nlohmann_json::nlohmann_json)
  target_link_libraries(sokoban PRIVATE sfml-system sfml-network sfml-graphics sfml-window)
  target_link_libraries(sokoban PRIVATE ImGui-SFML::ImGui-SFML)
  target_link_libraries(sokoban PRIVATE imgui::imgui)
  target_link_libraries(sokoban PRIVATE freetype)
  
  </code></pre>
  <p>and my error</p>
  <pre><code>[bor@b0x build]$ cmake .. -DCMAKE_TOOLCHAIN_FILE=/home/bor/Dokumenty/proj/vcpkg/scripts/buildsystems/vcpkg.cmake  -DVCPKG_TARGET_TRIPLET=x64-custom -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/home/bor/Dokumenty/proj/sokoban/toolchain-minwin.cmake
  -- The CXX compiler identification is GNU 10.2.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/x86_64-w64-mingw32-g++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found OpenGL: opengl32   
  -- Found ZLIB: optimized;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/lib/libzlib.a;debug;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/debug/lib/libzlibd.a (found version &quot;1.2.11&quot;) 
  -- Found BZip2: optimized;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/lib/libbz2.a;debug;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/debug/lib/libbz2d.a (found version &quot;1.0.8&quot;) 
  -- Looking for BZ2_bzCompressInit
  -- Looking for BZ2_bzCompressInit - found
  -- Found PNG: optimized;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/debug/lib/libpng.a;debug;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/debug/lib/libpng16d.a (found version &quot;1.6.37&quot;) 
  -- Found nlohmann_json: /home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/share/nlohmann_json/nlohmann_jsonConfig.cmake (found version &quot;3.9.1&quot;) 
  -- Found Freetype: optimized;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/lib/libfreetype.a;debug;/home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/debug/lib/libfreetyped.a (found version &quot;2.10.4&quot;) 
  -- Found SFML 2.5.1 in /home/bor/Dokumenty/proj/vcpkg/installed/x64-custom/share/sfml
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/bor/Dokumenty/proj/sokoban/build
  [bor@b0x build]$ make
  Scanning dependencies of target sokoban
  [ 10%] Building CXX object src/CMakeFiles/sokoban.dir/main.cpp.obj
  [ 20%] Building CXX object src/CMakeFiles/sokoban.dir/Game.cpp.obj
  [ 30%] Building CXX object src/CMakeFiles/sokoban.dir/states/PlayingState.cpp.obj
  [ 40%] Building CXX object src/CMakeFiles/sokoban.dir/states/MainMenuState.cpp.obj
  [ 50%] Building CXX object src/CMakeFiles/sokoban.dir/states/LevelEditorState.cpp.obj
  [ 60%] Building CXX object src/CMakeFiles/sokoban.dir/Level.cpp.obj
  [ 70%] Building CXX object src/CMakeFiles/sokoban.dir/LevelConfig.cpp.obj
  [ 80%] Building CXX object src/CMakeFiles/sokoban.dir/objects/Player.cpp.obj
  [ 90%] Building CXX object src/CMakeFiles/sokoban.dir/map/Map.cpp.obj
  [100%] Linking CXX executable ../sokoban.exe
  /usr/lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lOpenGL32
  collect2: error: ld returned 1 exit status
  make[2]: *** [src/CMakeFiles/sokoban.dir/build.make:255: sokoban.exe] Error 1
  make[1]: *** [CMakeFiles/Makefile2:133: src/CMakeFiles/sokoban.dir/all] Error 2
  make: *** [Makefile:103: all] Error 2
  </code></pre>