OIS as dependency for Ogre

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Mido
Gnoblar
Posts: 10
Joined: Wed Feb 07, 2018 12:36 pm

OIS as dependency for Ogre

Post by Mido »

Hi
I am using Ubuntu 16.04 STL and installed OIS as a dependency for Ogre.OIS installed and the lib generated in the path:/usr/local/lib
Also, I installed ogre without any problems. my main problem is when trying to build my application gives me the following errors :

Failed to find OIS on your system.
Graphical Client is not built as some dependencies are not met.

Here is a part of CMakeList file:
##############
# OGRE 1.9.x #
##############

# If no custom path is specified for Ogre, see if system environment variables point to it.
if(NOT OGRE_HOME)
set(OGRE_HOME $ENV{OGRE_HOME} CACHE PATH "Base directory to look for Ogre.")
string(REGEX REPLACE "\\\\" "/" OGRE_HOME "${OGRE_HOME}")
endif(NOT OGRE_HOME)

if(WIN32)
set(CMAKE_MODULE_PATH ${OGRE_HOME}/CMake ${CMAKE_MODULE_PATH})
else(WIN32)
set(CMAKE_MODULE_PATH ${OGRE_HOME}/lib/OGRE/cmake /usr/local/lib/OGRE/cmake ${CMAKE_MODULE_PATH})
endif(WIN32)

find_package(OGRE QUIET)
if(OGRE_FOUND)
if(NOT "${OGRE_VERSION_NAME}" STREQUAL "Ghadamon")
message(WARNING "You compile against Ogre version ${OGRE_VERSION_NAME} although only Ghadamon (Ogre 1.9) is tested. Problems might arise...")
endif()

if(NOT ${OGRE_Terrain_FOUND})
message("Failed to find the terrain component in your Ogre distribution.")
set(CLIENT_DEPENDENCIES_NOT_MET TRUE)
endif()

find_package(OIS QUIET)
if(NOT OIS_FOUND)
message("Failed to find OIS on your system.")
set(CLIENT_DEPENDENCIES_NOT_MET TRUE)
endif(NOT OIS_FOUND)
else(OGRE_FOUND)
message("Failed to find Ogre3D on your system.")
set(CLIENT_DEPENDENCIES_NOT_MET TRUE)
endif(OGRE_FOUND)


################
# Client build #
################

# Check for dependencies and define target if all libraries are available.
if(CLIENT_DEPENDENCIES_NOT_MET)
message("Graphical Client is not build as some dependencies are not met.")
else(CLIENT_DEPENDENCIES_NOT_MET)
#################################################################################
User avatar
tod
Troll
Posts: 1394
Joined: Wed Aug 02, 2006 9:41 am
Location: Bucharest
x 94
Contact:

Re: OIS as dependency for Ogre

Post by tod »

You must have OIS_DIR pointing to the folder where the cmake file is.
Mido
Gnoblar
Posts: 10
Joined: Wed Feb 07, 2018 12:36 pm

Re: OIS as dependency for Ogre

Post by Mido »

tod wrote: Thu Feb 08, 2018 11:18 am You must have OIS_DIR pointing to the folder where the cmake file is.
OIS_DIR or OIS_HOME??
the file is in /usr/local/lib

Also, Where I have to add this variable? in .bashrc file from the home directory or in another location?
Post Reply