Set up ogre project fails on mac os

Problems building or running the engine, queries about how to use features etc.
Post Reply
pum_purum
Gnoblar
Posts: 2
Joined: Wed Jul 25, 2018 12:31 am

Set up ogre project fails on mac os

Post by pum_purum » Wed Jul 25, 2018 12:12 pm

Ogre Version:[1.11]
Operating System:[macOS 10.12.6]

I'm trying to build my project with Ogre on macOs and I faced with a problem -- cmake can't find "OgreTargets.cmake".
I've done this steps:
1) I build ogre with generator "Unix Makefiles" (with official ogre instruction -- https://ogrecave.github.io/ogre/api/lat ... -ogre.html . Also with Xcode generator I got some error)
2) I set up project with this instruction: https://ogrecave.github.io/ogre/api/latest/setup.html

The first step was successful.
However when after second step I run "cmake" command I get an error:


Code: Select all

CMake Error at /Users/vlad/Documents/game/ogre_build/cmake/OGREConfig.cmake:91 (include):
  include could not find load file:

    /Users/vlad/Documents/game/ogre_build/cmake/OgreTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:8 (find_package)


-- Found OGRE
--   static     : OFF
--   components : Bites;HLMS;MeshLodGenerator;Overlay;Paging;Property;RTShaderSystem;Terrain;Volume
--   plugins    : Plugin_BSPSceneManager;Plugin_OctreeSceneManager;Plugin_PCZSceneManager;Plugin_ParticleFX;RenderSystem_GL;RenderSystem_GL3Plus
--   media      : /Users/vlad/Documents/game/ogre_build/Media
My project CMakeLists.txt looks like this.

Code: Select all

cmake_minimum_required (VERSION 2.6)
project (A)


get_filename_component(MAIN_OGRE_DIR ${CMAKE_CURRENT_SOURCE_DIR} PATH)
set(OGRE_DIR ${MAIN_OGRE_DIR}/ogre_build/cmake)

find_package(OGRE 1.11 REQUIRED COMPONENTS Bites RTShaderSystem)

file(COPY ${OGRE_CONFIG_DIR}/resources.cfg DESTINATION ${CMAKE_BINARY_DIR})
add_executable(A main.cxx)
target_link_libraries(A ${OGRE_LIBRARIES})
What have I done wrong?
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 615
Joined: Sun Mar 30, 2014 2:51 pm
x 85
Contact:

Re: Set up ogre project fails on mac os

Post by paroj » Wed Jul 25, 2018 1:33 pm

you missed the install step. (see first link)
0 x

pum_purum
Gnoblar
Posts: 2
Joined: Wed Jul 25, 2018 12:31 am

Re: Set up ogre project fails on mac os

Post by pum_purum » Wed Jul 25, 2018 2:59 pm

paroj wrote:
Wed Jul 25, 2018 1:33 pm
you missed the install step. (see first link)
I did all steps in first link - uncluding "make install". The problem was that I used wrong path to the SDK.
However now when I run "make" with my project directory:
0 x

paroj
OGRE Team Member
OGRE Team Member
Posts: 615
Joined: Sun Mar 30, 2014 2:51 pm
x 85
Contact:

Re: Set up ogre project fails on mac os

Post by paroj » Wed Jul 25, 2018 5:15 pm

someting is wrong with you toolchain. Make sure that you use xcode (not make) and C++11 support is enabled. Also this code was compiled on your system when you were building the SDK.
0 x

Post Reply