Awesome! These guides were very helpful with my Linux installation. I am an Ogre newb. ;)
Feedback:
- Setting up Ogre on Linux:
- - Requirements:
- - - TortoiseHG 4.5.2 available on their website. With the latest Ubuntu 17.10, using their instructions for Launchpad PPA, it seemed that this version of Ubuntu will not accept their source as this specific version is unsupported. Just to get working, I ran "sudo apt-get install tortoisehg", which got me version 4.3, which worked fine. It was much easier.
After that experience, I did the same with qtcreator.
- - Downloading Ogre
- - - Command line: mkdir Ogre should be ogre, and is not a necessary step as the hgclone command creates the folder. I ended up with an empty Ogre folder, and the repository in the ogre folder, so I just deleted Ogre.
- - Building Dependencies:
- - - change Ogre -> ogre
- - - remove the second "cd build" command.
- - - change instal -> install
- - Building Ogre
- - - change Ogre -> ogre
- Using Ogre in your App: I followed the directions in Speeding things up.
- - Speeding things up:
- - - Creating your application with 'EmptyProject' script:
- - - - This section needs to be clarified with more specific steps. It took me couple of minutes to figure out how to clear the "RelWithDebInfo was not found" issue given the instructions there.
- - - - While compiling, "#include <SDL.h>" is failing to find that header file. I need to dive into CMake and see why SDL2/include is being dropped from the include paths for the compiler.
If anyone knows why, let me know. Otherwise I'll post/edit when I figure it out.
Thanks again for all the hard work you put into this guide. It's really helped me out.
Edit: I found the problem with the SDL2 mismatch. In OGRE.cmake, we have:
OGRE.cmake:
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()
I ran cmake for the empty project with --trace-output, and found the following:
/home/rduplin/OgreLJE/CMake/Dependencies/OGRE.cmake(227): find_package(SDL2 )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(3): set(prefix /usr )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(4): set(exec_prefix ${prefix} )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(5): set(libdir ${prefix}/lib/x86_64-linux-gnu )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(6): set(SDL2_PREFIX /usr )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(7): set(SDL2_EXEC_PREFIX /usr )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(8): set(
SDL2_INCLUDE_DIRS ${prefix}/include/SDL2 )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(9): set(
SDL2_LIBRARIES -lSDL2 )
/usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake(10): string(STRIP ${SDL2_LIBRARIES} SDL2_LIBRARIES )
/home/rduplin/OgreLJE/CMake/Dependencies/OGRE.cmake(228): if(NOT SDL2_FOUND )
/home/rduplin/OgreLJE/CMake/Dependencies/OGRE.cmake(230): else()
/home/rduplin/OgreLJE/CMake/Dependencies/OGRE.cmake(231): message(STATUS Found SDL2 )
-- Found SDL2
/home/rduplin/OgreLJE/CMake/Dependencies/OGRE.cmake(232): include_directories(${
SDL2_INCLUDE_DIR} )
/home/rduplin/OgreLJE/CMake/Dependencies/OGRE.cmake(233): set(OGRE_DEPENDENCY_LIBS ${OGRE_DEPENDENCY_LIBS} ${
SDL2_LIBRARY} )
I edited OGRE.cmake and change SDL2_INCLUDE_DIR to SDL2_INCLUDE_DIRS, and also SDL2_LIBRARY to SDL2_LIBRARIES. After that, I was able to build and run the empty project just fine.