Мой файл CMakeLists.txt выглядит так:
Код: Выделить всё
cmake_minimum_required(VERSION 3.20)
project(space_adventure CXX)
set(CMAKE_PREFIX_PATH "C:/sdl3")
find_package(SDL3 REQUIRED CONFIG)
file(GLOB_RECURSE "sources" "src/*.cpp")
add_executable(space_adventure ${sources})
target_link_libraries(space_adventure PRIVATE SDL3::SDL3)
Код: Выделить всё
cmake_minimum_required(VERSION 3.20)
project(space_adventure CXX)
set(CMAKE_PREFIX_PATH "C:/sdl3")
find_package(SDL3-static REQUIRED CONFIG)
file(GLOB_RECURSE "sources" "src/*.cpp")
add_executable(space_adventure ${sources})
target_link_libraries(space_adventure PRIVATE SDL3::SDL3-static)
Код: Выделить всё
CMake Error at CMakeLists.txt:5 (find_package):
By not providing "FindSDL3-static.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"SDL3-static", but CMake did not find one.
Could not find a package configuration file provided by "SDL3-static" with
any of the following names:
SDL3-staticConfig.cmake
sdl3-static-config.cmake
Add the installation prefix of "SDL3-static" to CMAKE_PREFIX_PATH or set
"SDL3-static_DIR" to a directory containing one of the above files. If
"SDL3-static" provides a separate development package or SDK, be sure it
has been installed.
Подробнее здесь: https://stackoverflow.com/questions/798 ... make-and-c
Мобильная версия