forked from mirror/openmw-tes3mp
Merged in CMake and header cleanups from zinnschlag
This commit is contained in:
commit
fdb41f0774
12 changed files with 85 additions and 15 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,3 +9,4 @@ openmw
|
|||
Ogre.log
|
||||
ogre.cfg
|
||||
build
|
||||
plugins.cfg
|
||||
|
|
|
@ -7,14 +7,31 @@ cmake_minimum_required(VERSION 2.6)
|
|||
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
|
||||
|
||||
# Local files
|
||||
|
||||
set(BSA bsa/bsa_archive.cpp bsa/bsa_file.cpp)
|
||||
set(BSA_HEADER bsa/bsa_archive.hpp bsa/bsa_file.hpp)
|
||||
|
||||
set(NIF nif/nif_file.cpp nifogre/ogre_nif_loader.cpp)
|
||||
set(NIF_HEADER nif/controlled.hpp nif/effect.hpp nif/nif_types.hpp nif/record.hpp
|
||||
nif/controller.hpp nif/extra.hpp nif/node.hpp nif/record_ptr.hpp
|
||||
nif/data.hpp nif/nif_file.hpp nif/property.hpp)
|
||||
|
||||
set(TOOLS tools/stringops.cpp tools/fileops.cpp)
|
||||
set(TOOLS_HEADER tools/fileops.hpp tools/slice_array.hpp tools/stringops.hpp)
|
||||
|
||||
set(MANGLE_VFS mangle/vfs/servers/ogre_vfs.cpp)
|
||||
|
||||
set(OGRE ogre/renderer.cpp)
|
||||
set(OGRE_HEADER ogre/renderer.hpp)
|
||||
|
||||
set(INPUT input/oismanager.cpp)
|
||||
set(INPUT_HEADER input/oismanager.hpp input/listener.hpp)
|
||||
|
||||
set(GAME game/main.cpp game/esm_store/store.cpp game/cell_store.cpp)
|
||||
set(GAME_HEADER game/cell_store.hpp game/esm_store/reclists.hpp game/esm_store/store.hpp)
|
||||
|
||||
set(GAMEREND game/render/mwscene.cpp)
|
||||
set(GAMEREND_HEADER game/render/cell.hpp game/render/mwscene.hpp)
|
||||
|
||||
# Platform specific
|
||||
if (WIN32)
|
||||
|
@ -24,14 +41,39 @@ set(PLATFORM_INCLUDE_DIR "")
|
|||
endif (WIN32)
|
||||
|
||||
# Dependencies
|
||||
|
||||
find_package(OGRE REQUIRED)
|
||||
find_package(Boost REQUIRED COMPONENTS system filesystem)
|
||||
find_package(OIS REQUIRED)
|
||||
include_directories("." ${OGRE_INCLUDE_DIR} ${Boost_INCLUDE_DIR} ${PLATFORM_INCLUDE_DIR})
|
||||
include_directories("."
|
||||
${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
|
||||
${PLATFORM_INCLUDE_DIR})
|
||||
link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR})
|
||||
|
||||
# Specify build paths
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}")
|
||||
|
||||
# Other files
|
||||
|
||||
if (WIN32)
|
||||
configure_file(${OpenMW_SOURCE_DIR}/files/plugins.cfg.win32
|
||||
"${OpenMW_BINARY_DIR}/plugins.cfg" COPYONLY)
|
||||
else (WIN32)
|
||||
configure_file(${OpenMW_SOURCE_DIR}/files/plugins.cfg.linux
|
||||
"${OpenMW_BINARY_DIR}/plugins.cfg" COPYONLY)
|
||||
endif (WIN32)
|
||||
|
||||
# Main executable
|
||||
add_executable(openmw ${BSA} ${TOOLS} ${OGRE} ${INPUT} ${GAME} ${GAMEREND})
|
||||
target_link_libraries(openmw ${OGRE_LIBRARIES})
|
||||
target_link_libraries(openmw ${OIS_LIBRARIES})
|
||||
target_link_libraries(openmw ${Boost_LIBRARIES})
|
||||
add_executable(openmw
|
||||
${BSA} ${BSA_HEADER}
|
||||
${TOOLS} ${TOOLS_HEADER}
|
||||
${OGRE} ${OGRE_HEADER}
|
||||
${INPUT} ${INPUT_HEADER}
|
||||
${GAME} ${GAME_HEADER}
|
||||
${GAMEREND} ${GAMEREND_HEADER})
|
||||
|
||||
target_link_libraries(openmw
|
||||
${OGRE_LIBRARIES}
|
||||
${OIS_LIBRARIES}
|
||||
${Boost_LIBRARIES})
|
||||
|
|
|
@ -129,8 +129,8 @@ MACRO(findpkg_framework fwk)
|
|||
/System/Library/Frameworks
|
||||
/Network/Library/Frameworks
|
||||
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks/
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib/Release
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../lib/Release
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../lib/Debug
|
||||
)
|
||||
FOREACH(dir ${${fwk}_FRAMEWORK_PATH})
|
||||
SET(fwkpath ${dir}/${fwk}.framework)
|
||||
|
|
|
@ -16,11 +16,7 @@ void maintest()
|
|||
const char* esmFile = "data/Morrowind.esm";
|
||||
const char* bsaFile = "data/Morrowind.bsa";
|
||||
|
||||
#ifdef _WIN32
|
||||
const char* plugCfg = "plugins.cfg.win32";
|
||||
#else
|
||||
const char* plugCfg = "plugins.cfg.linux";
|
||||
#endif
|
||||
const char* plugCfg = "plugins.cfg";
|
||||
|
||||
cout << "Hello, fellow traveler!\n";
|
||||
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#include "OgreRoot.h"
|
||||
#include "OgreRenderWindow.h"
|
||||
#include "OgreSceneManager.h"
|
||||
#include "OgreViewport.h"
|
||||
#include "OgreCamera.h"
|
||||
#include "OgreTextureManager.h"
|
||||
|
||||
using namespace Render;
|
||||
using namespace Ogre;
|
||||
|
||||
|
|
|
@ -3,6 +3,14 @@
|
|||
|
||||
#include "ogre/renderer.hpp"
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Camera;
|
||||
class Viewport;
|
||||
class SceneManager;
|
||||
class SceneNode;
|
||||
}
|
||||
|
||||
namespace Render
|
||||
{
|
||||
/** Class responsible for Morrowind-specific interfaces to OGRE.
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
#include "oismanager.hpp"
|
||||
#include "ogre/renderer.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <OgreFrameListener.h>
|
||||
#include <OgreRenderWindow.h>
|
||||
|
||||
//#include <iostream>
|
||||
|
||||
namespace Input
|
||||
{
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
#include <assert.h>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
|
||||
#include "OgreRenderWindow.h"
|
||||
|
||||
using namespace Input;
|
||||
using namespace Ogre;
|
||||
using namespace OIS;
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
OISManager::OISManager(Render::OgreRenderer &rend)
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#include "renderer.hpp"
|
||||
|
||||
#include "OgreRoot.h"
|
||||
#include "OgreRenderWindow.h"
|
||||
#include "OgreLogManager.h"
|
||||
#include "OgreLog.h"
|
||||
|
||||
using namespace Ogre;
|
||||
using namespace Render;
|
||||
|
||||
|
|
|
@ -5,9 +5,15 @@
|
|||
Ogre renderer class
|
||||
*/
|
||||
|
||||
#include <Ogre.h>
|
||||
#include <OgreRoot.h>
|
||||
#include <string>
|
||||
|
||||
namespace Ogre
|
||||
{
|
||||
class Root;
|
||||
class RenderWindow;
|
||||
}
|
||||
|
||||
namespace Render
|
||||
{
|
||||
class OgreRenderer
|
||||
|
|
Loading…
Reference in a new issue