Operating System: Windows 10
My problem:
I'm trying to do the "Setting up an OGRE project" tutorial, but when Visual Studio detects my CMakeLists.txt, I get this error:
Code: Select all
Error CMake Error at CMakeLists.txt:9 (find_package):
By not providing "FindOGRE.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OGRE", but
CMake did not find one.
Could not find a package configuration file provided by "OGRE" (requested
version 1.11) with any of the following names:
OGREConfig.cmake
ogre-config.cmake
Add the installation prefix of "OGRE" to CMAKE_PREFIX_PATH or set
"OGRE_DIR" to a directory containing one of the above files. If "OGRE"
provides a separate development package or SDK, be sure it has been
installed. CMakeLists.txt
Code: Select all
cmake_minimum_required (VERSION 2.8)
project (ogreproj)
add_executable(ogreproj ogreproj.cpp)
set(${OGRE_DIR} C:/coding/OgrePlayground/deps/ogre3d/builds/ogre-1.11.5/sdk/CMake)
# specify which version and components you need
find_package(OGRE 1.11 REQUIRED COMPONENTS Bites RTShaderSystem)
# copy resource.cfg next to our binaries where OGRE looks for it
file(COPY ${OGRE_CONFIG_DIR}/resources.cfg DESTINATION ${CMAKE_BINARY_DIR})
I have generated a Visual Studio 15 2017 x64 Ogre project with CMake, then I built both ALL_BUILD and INSTALL. I swear I followed the setup tutorial to the letter, but it just doesn't want to work. Is there something that I'm missing here?