Merged in CMake and header cleanups from zinnschlag

actorid
Nicolay Korslund 15 years ago
commit fdb41f0774

1
.gitignore vendored

@ -9,3 +9,4 @@ openmw
Ogre.log Ogre.log
ogre.cfg ogre.cfg
build build
plugins.cfg

@ -7,14 +7,31 @@ cmake_minimum_required(VERSION 2.6)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
# Local files # Local files
set(BSA bsa/bsa_archive.cpp bsa/bsa_file.cpp) 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 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 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(MANGLE_VFS mangle/vfs/servers/ogre_vfs.cpp)
set(OGRE ogre/renderer.cpp) set(OGRE ogre/renderer.cpp)
set(OGRE_HEADER ogre/renderer.hpp)
set(INPUT input/oismanager.cpp) 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 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 game/render/mwscene.cpp)
set(GAMEREND_HEADER game/render/cell.hpp game/render/mwscene.hpp)
# Platform specific # Platform specific
if (WIN32) if (WIN32)
@ -24,14 +41,39 @@ set(PLATFORM_INCLUDE_DIR "")
endif (WIN32) endif (WIN32)
# Dependencies # Dependencies
find_package(OGRE REQUIRED) find_package(OGRE REQUIRED)
find_package(Boost REQUIRED COMPONENTS system filesystem) find_package(Boost REQUIRED COMPONENTS system filesystem)
find_package(OIS REQUIRED) 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}) 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 # Main executable
add_executable(openmw ${BSA} ${TOOLS} ${OGRE} ${INPUT} ${GAME} ${GAMEREND}) add_executable(openmw
target_link_libraries(openmw ${OGRE_LIBRARIES}) ${BSA} ${BSA_HEADER}
target_link_libraries(openmw ${OIS_LIBRARIES}) ${TOOLS} ${TOOLS_HEADER}
target_link_libraries(openmw ${Boost_LIBRARIES}) ${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 /System/Library/Frameworks
/Network/Library/Frameworks /Network/Library/Frameworks
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/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/Release
${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug ${CMAKE_CURRENT_SOURCE_DIR}/../lib/Debug
) )
FOREACH(dir ${${fwk}_FRAMEWORK_PATH}) FOREACH(dir ${${fwk}_FRAMEWORK_PATH})
SET(fwkpath ${dir}/${fwk}.framework) SET(fwkpath ${dir}/${fwk}.framework)

@ -16,11 +16,7 @@ void maintest()
const char* esmFile = "data/Morrowind.esm"; const char* esmFile = "data/Morrowind.esm";
const char* bsaFile = "data/Morrowind.bsa"; const char* bsaFile = "data/Morrowind.bsa";
#ifdef _WIN32 const char* plugCfg = "plugins.cfg";
const char* plugCfg = "plugins.cfg.win32";
#else
const char* plugCfg = "plugins.cfg.linux";
#endif
cout << "Hello, fellow traveler!\n"; cout << "Hello, fellow traveler!\n";

@ -2,6 +2,13 @@
#include <assert.h> #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 Render;
using namespace Ogre; using namespace Ogre;

@ -3,6 +3,14 @@
#include "ogre/renderer.hpp" #include "ogre/renderer.hpp"
namespace Ogre
{
class Camera;
class Viewport;
class SceneManager;
class SceneNode;
}
namespace Render namespace Render
{ {
/** Class responsible for Morrowind-specific interfaces to OGRE. /** Class responsible for Morrowind-specific interfaces to OGRE.

@ -4,7 +4,10 @@
#include "oismanager.hpp" #include "oismanager.hpp"
#include "ogre/renderer.hpp" #include "ogre/renderer.hpp"
#include <iostream> #include <OgreFrameListener.h>
#include <OgreRenderWindow.h>
//#include <iostream>
namespace Input namespace Input
{ {

@ -2,12 +2,14 @@
#include <assert.h> #include <assert.h>
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <iostream>
#include "OgreRenderWindow.h"
using namespace Input; using namespace Input;
using namespace Ogre; using namespace Ogre;
using namespace OIS; using namespace OIS;
#include <iostream>
using namespace std; using namespace std;
OISManager::OISManager(Render::OgreRenderer &rend) OISManager::OISManager(Render::OgreRenderer &rend)

@ -1,5 +1,10 @@
#include "renderer.hpp" #include "renderer.hpp"
#include "OgreRoot.h"
#include "OgreRenderWindow.h"
#include "OgreLogManager.h"
#include "OgreLog.h"
using namespace Ogre; using namespace Ogre;
using namespace Render; using namespace Render;

@ -5,9 +5,15 @@
Ogre renderer class Ogre renderer class
*/ */
#include <Ogre.h> #include <OgreRoot.h>
#include <string> #include <string>
namespace Ogre
{
class Root;
class RenderWindow;
}
namespace Render namespace Render
{ {
class OgreRenderer class OgreRenderer

Loading…
Cancel
Save