Index: Tools/CMakeLists.txt =================================================================== --- Tools/CMakeLists.txt (revision 0) +++ Tools/CMakeLists.txt (revision 0) @@ -0,0 +1,75 @@ +cmake_minimum_required(VERSION 2.4) + +# Avoid warning under CMake 2.6 +IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + cmake_policy(SET CMP0003 NEW) +ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + +project(GameEngine) + +# game engine sets +set(GAMEENGINE_ANIMATION_SOURCES) +set(GAMEENGINE_BULLETPHYSICS_SOURCES) +set(GAMEENGINE_SCENEGRAPH_SOURCES) +set(GAMEENGINE_SOUNDENGINE_SOURCES) + +set(GAMEENGINE_INCLUDE_DIRS + ${GAMEENGINE_INCLUDE_DIRS} + ${GameEngine_SOURCE_DIR}/../Horde3D/Bindings/C++ + ${GameEngine_SOURCE_DIR}/../Horde3D/Shared + ${GameEngine_SOURCE_DIR}/Dependencies/Lua/src + ${GameEngine_SOURCE_DIR}/Dependencies/Ogg + ${GameEngine_SOURCE_DIR}/Dependencies/Bullet + ) + +set(GAMEENGINE_LIBS + ${GAMEENGINE_LIBS} + ${GameEngine_SOURCE_DIR}/Dependencies/XMLParser/${CMAKE_SYSTEM_NAME} + ${GameEngine_SOURCE_DIR}/Dependencies/Lua/${CMAKE_SYSTEM_NAME} + ${GameEngine_SOURCE_DIR}/Dependencies/Ogg/${CMAKE_SYSTEM_NAME} + ${GameEngine_SOURCE_DIR}/Dependencies/Bullet/${CMAKE_SYSTEM_NAME} + ${GameEngine_SOURCE_DIR}/../Horde3D/Binaries/${CMAKE_SYSTEM_NAME} + ) + +option(GAMEENGINE_BUILD_ANIMATION "Build the game engine animation component" OFF) +option(GAMEENGINE_BUILD_BULLETPHYSICS "Build the game engine physics component" OFF) +option(GAMEENGINE_BUILD_SCENEGRAPH "Build the game engine scenegraph component" OFF) +option(GAMEENGINE_BUILD_SOUNDENGINE "Build the game engine soundengine component" OFF) +option(GAMEENGINE_BUILD_EDITOR "Build the game engine editor component" OFF) + +IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + IF(WIN32) + IF(MSVC) + SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries + CACHE STRING "Where binaries and .dll files go" FORCE) + ELSE(MSVC) + SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries/Win32 + CACHE STRING "Where binaries and .dll files go" FORCE) + ENDIF(MSVC) + ELSE(WIN32) + SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries/${CMAKE_SYSTEM_NAME} + CACHE STRING "Where binaries and .dll files go" FORCE) + ENDIF(WIN32) +ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + IF(WIN32) + IF(MSVC) + SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries + CACHE STRING "Where executable files go" FORCE) + ELSE(MSVC) + SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries/Win32 + CACHE STRING "Where executable files go" FORCE) + ENDIF(MSVC) + IF(MSVC) + SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries + CACHE STRING "Where dll files go" FORCE) + ELSE(MSVC) + SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries/Win32 + CACHE STRING "Where dll files go" FORCE) + ENDIF(MSVC) + ELSE(WIN32) + SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../Horde3D/Binaries/${CMAKE_SYSTEM_NAME} + CACHE STRING "Where executable files go" FORCE) + ENDIF(WIN32) +ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + +add_subdirectory(GameEngine) Index: Tools/Dependencies/CMakeLists.txt =================================================================== --- Tools/Dependencies/CMakeLists.txt (revision 0) +++ Tools/Dependencies/CMakeLists.txt (revision 0) @@ -0,0 +1,10 @@ +add_subdirectory(Lua) +add_subdirectory(XMLParser) + +if(GAMEENGINE_BUILD_BULLETPHYSICS) + add_subdirectory(Bullet) +endif(GAMEENGINE_BUILD_BULLETPHYSICS) + +if(GAMEENGINE_BUILD_SOUNDENGINE) + add_subdirectory(Ogg) +endif(GAMEENGINE_BUILD_SOUNDENGINE) \ No newline at end of file Index: Tools/Dependencies/Lua/CMakeLists.txt =================================================================== --- Tools/Dependencies/Lua/CMakeLists.txt (revision 0) +++ Tools/Dependencies/Lua/CMakeLists.txt (revision 0) @@ -0,0 +1,68 @@ +set(LUA_SOURCES + src/lapi.h + src/lauxlib.h + src/lcode.h + src/ldebug.h + src/ldo.h + src/lfunc.h + src/lgc.h + src/llex.h + src/llimits.h + src/lmem.h + src/lobject.h + src/lopcodes.h + src/lparser.h + src/lstate.h + src/lstring.h + src/ltable.h + src/ltm.h + src/lua.h + src/luaconf.h + src/lualib.h + src/lundump.h + src/lvm.h + src/lzio.h + src/lapi.c + src/lauxlib.c + src/lbaselib.c + src/lcode.c + src/ldblib.c + src/ldebug.c + src/ldo.c + src/ldump.c + src/lfunc.c + src/lgc.c + src/linit.c + src/liolib.c + src/llex.c + src/lmathlib.c + src/lmem.c + src/loadlib.c + src/lobject.c + src/lopcodes.c + src/loslib.c + src/lparser.c + src/lstate.c + src/lstring.c + src/lstrlib.c + src/ltable.c + src/ltablib.c + src/ltm.c + src/lundump.c + src/lvm.c + src/lzio.c + src/print.c + ) + +add_library(lua STATIC + ${LUA_SOURCES} + ) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") Index: Tools/Dependencies/XMLParser/CMakeLists.txt =================================================================== --- Tools/Dependencies/XMLParser/CMakeLists.txt (revision 0) +++ Tools/Dependencies/XMLParser/CMakeLists.txt (revision 0) @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 2.4) + +# Avoid warning under CMake 2.6 +IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + cmake_policy(SET CMP0003 NEW) +ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + +project(XMLParser) + +set(XMLPARSER_SOURCES + ../../../Horde3D/Source/Shared/utXMLParser.h + ../../../Horde3D/Source/Shared/utXMLParser.cpp + ) + +add_library(XmlParser STATIC + ${XMLPARSER_SOURCES} + ) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") Index: Tools/GameEngine/CMakeLists.txt =================================================================== --- Tools/GameEngine/CMakeLists.txt (revision 0) +++ Tools/GameEngine/CMakeLists.txt (revision 0) @@ -0,0 +1 @@ +add_subdirectory(src) \ No newline at end of file Index: Tools/GameEngine/src/CMakeLists.txt =================================================================== --- Tools/GameEngine/src/CMakeLists.txt (revision 0) +++ Tools/GameEngine/src/CMakeLists.txt (revision 0) @@ -0,0 +1,19 @@ +# Add game engine directories + +add_subdirectory(GameEngineCore) + +if(GAMEENGINE_BUILD_ANIMATION) + add_subdirectory(GameAnimationComponent) +endif(GAMEENGINE_BUILD_ANIMATION) + +if(GAMEENGINE_BUILD_BULLETPHYSICS) + add_subdirectory(GameBulletPhysicsComponent) +endif(GAMEENGINE_BUILD_BULLETPHYSICS) + +if(GAMEENGINE_BUILD_SCENEGRAPH) + add_subdirectory(GameSceneGraphComponent) +endif(GAMEENGINE_BUILD_SCENEGRAPH) + +if(GAMEENGINE_BUILD_SOUNDENGINE) + add_subdirectory(GameSoundEngineComponent) +endif(GAMEENGINE_BUILD_SOUNDENGINE) Index: Tools/GameEngine/src/GameAnimationComponent/CMakeLists.txt =================================================================== --- Tools/GameEngine/src/GameAnimationComponent/CMakeLists.txt (revision 0) +++ Tools/GameEngine/src/GameAnimationComponent/CMakeLists.txt (revision 0) @@ -0,0 +1,39 @@ +include_directories(${GAMEENGINE_INCLUDE_DIRS}) + +set(GAMEENGINE_ANIMATION_SOURCES + ${GAMEENGINE_ANIMATION_SOURCES} + AnimationLua.h +#AnimationSquirrel.h - uncomment for squirrel + GameEngine_Animations.h + KeyframeAnimComponent.h + KeyframeAnimManager.h + MorphtargetAnimComponent.h + MorphtargetAnimManager.h + MoveAnimComponent.h + MoveAnimManager.h + AnimationLua.cpp +#AnimationSquirrel.cpp - uncomment for squirrel + GameEngine_Animations.cpp + KeyframeAnimComponent.cpp + KeyframeAnimManager.cpp + main.cpp + MorphtargetAnimComponent.cpp + MorphtargetAnimManager.cpp + MoveAnimComponent.cpp + MoveAnimManager.cpp + ) + +add_library(GameAnimationsComponent SHARED + ${GAMEENGINE_ANIMATION_SOURCES} + ) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(GameAnimationsComponent GameEngineCore XmlParser Horde3D Horde3DUtils Lua opengl32) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(GameAnimationsComponent GameEngineCore XmlParser Horde3D Horde3DUtils Lua GL) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") Index: Tools/GameEngine/src/GameBulletPhysicsComponent/CMakeLists.txt =================================================================== --- Tools/GameEngine/src/GameBulletPhysicsComponent/CMakeLists.txt (revision 0) +++ Tools/GameEngine/src/GameBulletPhysicsComponent/CMakeLists.txt (revision 0) @@ -0,0 +1,31 @@ +include_directories(${GAMEENGINE_INCLUDE_DIRS}) + +set(GAMEENGINE_BULLETPHYSICS_SOURCES + ${GAMEENGINE_BULLETPHYSICS_SOURCES} + GameEngine_BulletPhysics.cpp + GameEngine_BulletPhysics.h + GLPhysicsView.cpp + GLPhysicsView.h + main.cpp + Physics.cpp + Physics.h + PhysicsComponent.cpp + PhysicsComponent.h + PhysicsLua.cpp + PhysicsLua.h + ) + +add_library(GameBulletPhysicsComponent SHARED + ${GAMEENGINE_CORE_SOURCES} + ) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(GameEngineCore XmlParser libbulletcollision libbulletdynamics libbulletmath libGIMPACTUtils libconvexdecomposition glu32 opengl32 Lua) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(GameEngineCore XmlParser libbulletcollision libbulletdynamics libbulletmath libGIMPACTUtils libconvexdecomposition GLU GL Lua) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") Index: Tools/GameEngine/src/GameEngineCore/CMakeLists.txt =================================================================== --- Tools/GameEngine/src/GameEngineCore/CMakeLists.txt (revision 0) +++ Tools/GameEngine/src/GameEngineCore/CMakeLists.txt (revision 0) @@ -0,0 +1,46 @@ +include_directories(${GAMEENGINE_INCLUDE_DIRS}) + +set(GAMEENGINE_CORE_SOURCES + config.h + DynLib.h + GameComponent.h + GameComponentManager.h + GameComponentRegistry.h + GameEngine.h + GameEntity.h + GameEvent.h + GameLog.h + GameModules.h + GamePlugInManager.h + GameWorld.h + PerformanceTimer.h + TimingManager.h + DynLib.cpp + GameComponent.cpp + GameComponentRegistry.cpp + GameEngine.cpp + GameEngine_Events.cpp + GameEngine_Lua.cpp + GameEntity.cpp + GameLog.cpp + GameModules.cpp + GamePlugInManager.cpp + GameWorld.cpp + PerformanceTimer.cpp + TimingManager.cpp + ) + +add_library(GameEngineCore SHARED + ${GAMEENGINE_CORE_SOURCES} + ) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(GameEngineCore XmlParser Lua opengl32) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(GameEngineCore XmlParser Lua GL) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") Index: Tools/GameEngine/src/GameEngineCore/GameLog.h =================================================================== --- Tools/GameEngine/src/GameEngineCore/GameLog.h (revision 359) +++ Tools/GameEngine/src/GameEngineCore/GameLog.h (working copy) @@ -24,7 +24,7 @@ #ifndef GAMELOG_H_ #define GAMELOG_H_ -#include +#include "config.h" /** \addtogroup GameEngineCore * @{ Index: Tools/GameEngine/src/GameSceneGraphComponent/CMakeLists.txt =================================================================== --- Tools/GameEngine/src/GameSceneGraphComponent/CMakeLists.txt (revision 0) +++ Tools/GameEngine/src/GameSceneGraphComponent/CMakeLists.txt (revision 0) @@ -0,0 +1,28 @@ +include_directories(${GAMEENGINE_INCLUDE_DIRS}) + +set(GAMEENGINE_SCENEGRAPH_SOURCES + ${GAMEENGINE_SCENEGRAPH_SOURCES} + GameEngine_SceneGraph.h + SceneGraph.h + SceneGraphComponent.h + SceneGraphLua.h + GameEngine_SceneGraph.cpp + main.cpp + SceneGraph.cpp + SceneGraphComponent.cpp + ) + +add_library(GameSceneGraphComponent SHARED + ${GAMEENGINE_SCENEGRAPH_SOURCES} + ) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(GameSceneGraphComponent XmlParser Lua Horde3D Horde3DUtils opengl32) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(GameSceneGraphComponent XmlParser Lua Horde3D Horde3DUtils GL) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") Index: Tools/GameEngine/src/GameSoundEngineComponent/CMakeLists.txt =================================================================== --- Tools/GameEngine/src/GameSoundEngineComponent/CMakeLists.txt (revision 0) +++ Tools/GameEngine/src/GameSoundEngineComponent/CMakeLists.txt (revision 0) @@ -0,0 +1,35 @@ +include_directories(${GAMEENGINE_INCLUDE_DIRS}) + +set(GAMEENGINE_SOUNDENGINE_SOURCES + ${GAMEENGINE_SOUNDENGINE_SOURCES} + CWaves.h + GameEngine_Sound.h + Ogg.h + SoundComponent.h + SoundListenerComponent.h + SoundManager.h + SoundResourceManager.h + CWaves.cpp + GameEngine_Sound.cpp + main.cpp + Ogg.cpp + SoundComponent.cpp + SoundListenerComponent.cpp + SoundManager.cpp + SoundResourceManager.cpp + ) + +add_library(GameSceneGraphComponent SHARED + ${GAMEENGINE_SOUNDENGINE_SOURCES} + ) + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + target_link_libraries(openal32) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(AL) +endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") +endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") \ No newline at end of file