From d955a0efc498fcdf2d3a35d2939aeff6ef59cec3 Mon Sep 17 00:00:00 2001 From: athile Date: Mon, 30 Aug 2010 02:12:54 +0100 Subject: [PATCH] WIP Windows build --- .gitignore | 1 + CMakeLists.txt | 33 +++++++++++++++++++++++++- apps/openmw/mwworld/actionteleport.cpp | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b8383fd51..774478e2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build *~ Doxygen +prebuilt \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index ca21824b6..352f3c950 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,34 @@ option(USE_MPG123 "use mpg123 + libsndfile for sound" ON) # We probably support older versions than this. cmake_minimum_required(VERSION 2.6) + +# +# Pre-built binaries being used? +# +IF(EXISTS "${CMAKE_SOURCE_DIR}/prebuilt/ogre_1_7_1") + message (STATUS "OpenMW pre-built binaries found. Attempting to use pre-built binaries.") + + SET(ENV{OGRE_HOME} "${CMAKE_SOURCE_DIR}/prebuilt/ogre_1_7_1") + + SET(ENV{BOOST_ROOT} "${CMAKE_SOURCE_DIR}/prebuilt/boost_1_42_0") + set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_MULTITHREADED ON) + set(ENV{BOOST_INCLUDEDIR} "${BOOST_ROOT}/include") + set(ENV{BOOST_LIBRARYDIR} "${BOOST_ROOT}/lib") + + set(ENV{FREETYPE_DIR} "${CMAKE_SOURCE_DIR}/prebuilt/freetype-2.3.5-1") + + set(USE_MPG123 OFF) + set(USE_AUDIERE ON) + set(AUDIERE_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/prebuilt/audiere-1.9.4/include") + set(AUDIERE_LIBRARY "${CMAKE_SOURCE_DIR}/prebuilt/audiere-1.9.4/lib/audiere.lib") + + set(ENV{OPENALDIR} "${CMAKE_SOURCE_DIR}/prebuilt/OpenAL 1.1 SDK") + +ELSE() + message (STATUS "OpenMW pre-built binaries not found. Using standard locations.") +ENDIF() + # Add path for CMake scripts set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/) @@ -166,6 +194,9 @@ if (WIN32) else (WIN32) set(PLATFORM_INCLUDE_DIR "") endif (WIN32) +if (MSVC10) +set(PLATFORM_INCLUDE_DIR "") +endif() # Dependencies @@ -180,10 +211,10 @@ include_directories("." ${CMAKE_HOME_DIRECTORY}/extern/caelum/include ${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/MyGUIEngine/include ${CMAKE_HOME_DIRECTORY}/extern/mygui_3.0.1/OgrePlatform/include + ${OPENAL_INCLUDE_DIR} ${LIBDIR} ) - link_directories(${Boost_LIBRARY_DIRS} ${OGRE_LIB_DIR}) add_subdirectory( extern/caelum ) diff --git a/apps/openmw/mwworld/actionteleport.cpp b/apps/openmw/mwworld/actionteleport.cpp index 4edc02c30..f757b70be 100644 --- a/apps/openmw/mwworld/actionteleport.cpp +++ b/apps/openmw/mwworld/actionteleport.cpp @@ -11,7 +11,7 @@ namespace MWWorld : mCellName (cellName), mPosition (position) {} - void ActionTeleportPlayer::ActionTeleportPlayer::execute (Environment& environment) + void ActionTeleportPlayer::execute (Environment& environment) { environment.mWorld->changeCell (mCellName, mPosition); }