SuperTux / supertux

SuperTux source code
https://supertux.org
GNU General Public License v3.0
2.47k stars 472 forks source link

[Bug]: cmake cannot find sdl2 #2947

Closed PaxtonPenguin closed 1 month ago

PaxtonPenguin commented 1 month ago

SuperTux Version

commit 83e4bf7

System Information

Windows 11 64-bit

Expected Behavior

cmake to build the .sln file for visual studio

Actual Behavior

CMake Error at C:/Users/Paxton/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package): Could not find a configuration file for package "SDL2" that is compatible with requested version "".

The following configuration files were considered but not accepted:

C:/Users/Paxton/vcpkg/installed/x64-windows/share/sdl2/SDL2Config.cmake, version: 2.30.1 (64bit)

Steps To Reproduce Actual Behavior

  1. git clone and .\vcpkg
  2. cmake .. [insert other arguments]
  3. Configuring incomplete, errors occurred!

Additional Information

cmake output:

-- Building for: Visual Studio 17 2022
CMake Deprecation Warning at CMakeLists.txt:34 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.40.33808.0
-- The CXX compiler identification is MSVC 19.40.33808.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_ICONV_CONST
-- Performing Test HAVE_ICONV_CONST - Failed
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
-- Check size of void* - done
-- Size of void* is 4
-- Found glm: C:/Users/Paxton/vcpkg/installed/x64-windows/include
-- Could NOT find fmt, using external/fmt fallback
-- Module support is disabled.
-- Version: 8.0.1
-- Build type: Release
-- CXX_STANDARD: 17
-- Performing Test has_std_17_flag
-- Performing Test has_std_17_flag - Failed
-- Performing Test has_std_1z_flag
-- Performing Test has_std_1z_flag - Failed
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS
-- Performing Test SUPPORTS_USER_DEFINED_LITERALS - Success
-- Performing Test FMT_HAS_VARIANT
-- Performing Test FMT_HAS_VARIANT - Success
-- Required features: cxx_variadic_templates
-- Looking for _strtod_l
-- Looking for _strtod_l - found
-- Checking for SDL2
CMake Error at C:/Users/Paxton/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
  Could not find a configuration file for package "SDL2" that is compatible
  with requested version "".

  The following configuration files were considered but not accepted:

    C:/Users/Paxton/vcpkg/installed/x64-windows/share/sdl2/SDL2Config.cmake, version: 2.30.1 (64bit)

Call Stack (most recent call first):
  mk/cmake/SuperTux/ProvideSDL2.cmake:4 (find_package)
  CMakeLists.txt:172 (include)

-- Configuring incomplete, errors occurred!

Guidelines For Reporting Issues

PaxtonPenguin commented 1 month ago

nvm, just messed up the cmake command