Operating System: Windows 10
Render System:
Visual Studio Version: 2017
Hi everyone,
I have built Ogre3D 2.1 according to this tuturial: https://ogrecave.github.io/ogre/api/2.1 ... ndows.html
The engine is inside of the C:/OgreTest/Ogre folder, while the build is in C:/OgreTest/Ogre/build.
I can run the solution and the provided samples work fine.
To create my own project, I have copied the EmptyProject folder from Samples to C:\EmptyProject.
In CMake, I've set OGRE_BINARIES to C:/OgreTest/Ogre/build and OGRE_SOURCE to C:/OgreTest/Ogre.
The project configures, but CMake cannot find the SDL directory:
Code: Select all
Detected DLL build of Ogre
CMake Warning at CMake/Dependencies/OGRE.cmake:227 (find_package):
By not providing "FindSDL2.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SDL2", but
CMake did not find one.
Could not find a package configuration file provided by "SDL2" with any of
the following names:
SDL2Config.cmake
sdl2-config.cmake
Add the installation prefix of "SDL2" to CMAKE_PREFIX_PATH or set
"SDL2_DIR" to a directory containing one of the above files. If "SDL2"
provides a separate development package or SDK, be sure it has been installed
.
Call Stack (most recent call first):
CMakeLists.txt:21 (setupOgre)
Could not find SDL2. https://www.libsdl.org/
Copying Hlms data files from Ogre repository
Copying Common data files from Ogre repository
Copying DLLs and generating Plugins.cfg for Debug
Copying DLLs and generating Plugins.cfg for Release
Copying DLLs and generating Plugins.cfg for RelWithDebInfo
Copying DLLs and generating Plugins.cfg for MinSizeRel
Generating C:/EmptyProject/bin/Data/resources2.cfg from template
C:/EmptyProject/CMake/Templates/Resources.cfg.in
Copying OgreSamplesCommon cpp and header files to
C:/EmptyProject/include/OgreCommon
C:/EmptyProject/src/OgreCommon/
Configuring done
Code: Select all
if( NOT IOS )
set( CMAKE_PREFIX_PATH "${OGRE_SOURCE}/Dependencies ${CMAKE_PREFIX_PATH}" )
find_package( SDL2 )
if( NOT SDL2_FOUND )
message( "Could not find SDL2. https://www.libsdl.org/" )
else()
message( STATUS "Found SDL2" )
include_directories( ${SDL2_INCLUDE_DIR} )
set( OGRE_DEPENDENCY_LIBS ${OGRE_DEPENDENCY_LIBS} ${SDL2_LIBRARY} )
endif()
endif()
- C:\OgreTest\Ogre\Dependencies
- C:\OgreTest\Ogre\Dependencies\build
- C:\OgreTest\Ogre\Dependencies\build\ogredeps
- C:\SDL-2.0.9 (where I have the SDL's VS development libraries)
The generated solution complains about the SDL include not being found, and when I add them with the lib directory inside of VS2017, I get unresolved externals in GraphicsSystem.obj and SdlInputHandler.obj
I would greatly appreciate any help.