Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uphow to set sdl2 path #378
Comments
This comment has been minimized.
This comment has been minimized.
If that directory contains prebuilt SDL binaries (it's the cmake_minimum_required(VERSION 3.1)
project(MyApplication)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/modules/" ${CMAKE_MODULE_PATH})
# Add Corrade and Magnum as subprojects, add prebuilt SDL and enable Sdl2Application
list(APPEND CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR}/SDL2-2.0.10")
set(WITH_SDL2APPLICATION ON CACHE BOOL "" FORCE)
add_subdirectory(corrade)
add_subdirectory(magnum)
add_subdirectory(src) This seems to be the easiest, I'll mention it in the Getting Started guide. |
This comment has been minimized.
This comment has been minimized.
Getting Started Guide updated in 6b64ee6 and verified to be working. It should be now much easier to follow, with less pain points for Windows users. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I put SDL2.0 in C:\Users\chuyuwei\Desktop\duallerp\magnum-bootstrap\SDL2-2.0.10. So how should I write in cmake
it always shows
Could NOT find SDL2 (missing: SDL2_LIBRARY)
CMake Error at magnum/src/Magnum/Platform/CMakeLists.txt:289 (message):
SDL2 library, required by Sdl2Application, was not found. Set
WITH_SDL2APPLICATION to OFF to skip building it.
it is vs 2017