[SOLVED] Windows CMake error

TGrey

04-05-2014 07:49:17

Hello there, can somebody give me some help, i try many ways, but it's doesn't work :(

My enviroment

BOOST_ROOT=D:\boost
BULLET_INCLUDE_DIRS=D:\Ogre3d\bullet\src
BULLET_LIBS=D:\Ogre3d\bullet\build\lib
BULLET_ROOT=D:\Ogre3d\bullet
MYGUI_HOME=D:\MyGUI_3.2.0
NUMBER_OF_PROCESSORS=8
OGRE_DEPENDENCIES_DIR=D:\Ogre3d\lib
OGRE_HOME=D:\Ogre3d
OGRE_INCLUDE_DIR=D:\Ogre3d\include
OGRE_LIBS=D:\Ogre3d\lib
OGRE_SDK=D:\Ogre3d


I have installed OgreSDK 1.8.1 in D:\Ogre3d, i have builded sources in D:\Ogre3d\sources, i have bullet 2.82 in D:\Ogre3d\bullet, i have OgreBullet in D:\Ogre3d\ogrebullet. I successfully builded bullet itself. Now i try to build ogrebullet, when i start CMake, and add path
D:/Ogre3d/ogrebullet
D:/Ogre3d/ogrebullet/build

it show me error
CMake Error at CMakeLists.txt:21 (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" 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.


Configuring incomplete, errors occurred!
See also "D:/Ogre3d/ogrebullet/build/CMakeFiles/CMakeOutput.log".

Also OGRE_DIR = OGRE_DIR-NOTFOUND

I have added new var CMAKE_MODULE_PATH = D:/Ogre3d/CMake/FindOGRE.cmake, but it still show errors.

Any ideas?

AlexeyKnyshev

05-05-2014 05:21:14

Stange enough, looks like CMake couldn't find FindOGRE.cmake module. Have u changed CMAKE_MODULE_PATH at first atempt? You schouldn't try to use FindOGRE module shipped with Ogre, there is one in ogrebullet's cmake dir.
If you are trying to add another module path, write code like this:

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "your_path_here")


Best regards, Alexey

TGrey

05-05-2014 09:19:50

I will try later, thanks. But yes i did, i added this variable and set path to D:\ogre3d\Cmake\FindOgre.cmake. And will try with one in ogrebullet dir, i didn't see it.

AlexeyKnyshev

05-05-2014 11:19:39

Oh, you shouldn't do that. It uses FindOGRE module from ./cmake subdir by default.

TGrey

05-05-2014 18:28:21

That is really sad)
First: in CmakeList already exist this string

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
Obviously it's point nowhere, and variable from CMake gui has lower priority than this one. So i change it and it work.
Next error with OgreBullet demo.
CmakeList has string
set(SOURCES
# common/src/BetaGUI.cpp
common/src/Gorilla.cpp
common/src/OgreBulletGuiListener.cpp
common/src/OgreBulletInputListener.cpp
common/src/OgreBulletListener.cpp
common/src/OgreBulletApplication.cpp
src/Terrain_Demo.cpp
src/Vehicle_Demo.cpp
src/Constraints_Demo.cpp
src/Primitives_Demo.cpp
src/Ragdoll_Demo.cpp
src/main.cpp
src/TriMesh_Demo.cpp
)


common/src/Gorilla.cpp doesn't exits. So i change it.

Thanks for help!

AlexeyKnyshev

05-05-2014 23:49:33

Looks like u are talking about Demos. Sadly they wouldn't work until I fix them.

TGrey

06-05-2014 15:22:10

Yep, Demos. I spent all my time to fix it, and then i realize that i haven't media folder. It lucky that later i found some repo on github with fixed code and media.