forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'k1ll/mingw'
This commit is contained in:
commit
d7cd4203ad
11 changed files with 64 additions and 10 deletions
|
@ -134,9 +134,11 @@ endif()
|
||||||
|
|
||||||
# Platform specific
|
# Platform specific
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
if(NOT MINGW)
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
set(PLATFORM_INCLUDE_DIR "platform")
|
set(PLATFORM_INCLUDE_DIR "platform")
|
||||||
add_definitions(-DBOOST_ALL_NO_LIB)
|
add_definitions(-DBOOST_ALL_NO_LIB)
|
||||||
|
endif(NOT MINGW)
|
||||||
|
|
||||||
# Suppress WinMain(), provided by SDL
|
# Suppress WinMain(), provided by SDL
|
||||||
add_definitions(-DSDL_MAIN_HANDLED)
|
add_definitions(-DSDL_MAIN_HANDLED)
|
||||||
|
|
|
@ -18,6 +18,10 @@ target_link_libraries(openmw-iniimporter
|
||||||
components
|
components
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (MINGW)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -municode")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (BUILD_WITH_CODE_COVERAGE)
|
if (BUILD_WITH_CODE_COVERAGE)
|
||||||
add_definitions (--coverage)
|
add_definitions (--coverage)
|
||||||
target_link_libraries(openmw-iniimporter gcov)
|
target_link_libraries(openmw-iniimporter gcov)
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
// For OutputDebugString
|
// For OutputDebugString
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <windows.h>
|
||||||
// makes __argc and __argv available on windows
|
// makes __argc and __argv available on windows
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "worldimp.hpp"
|
#include "worldimp.hpp"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
#include <boost/tr1/tr1/unordered_map>
|
#include <boost/tr1/tr1/unordered_map>
|
||||||
#elif defined HAVE_UNORDERED_MAP
|
#elif defined HAVE_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
@ -19,7 +19,46 @@ include(PreprocessorUtils)
|
||||||
# ENDIF (MYGUI_LIBRARIES AND MYGUI_INCLUDE_DIRS)
|
# ENDIF (MYGUI_LIBRARIES AND MYGUI_INCLUDE_DIRS)
|
||||||
|
|
||||||
IF (WIN32) #Windows
|
IF (WIN32) #Windows
|
||||||
|
|
||||||
MESSAGE(STATUS "Looking for MyGUI")
|
MESSAGE(STATUS "Looking for MyGUI")
|
||||||
|
|
||||||
|
IF(MINGW)
|
||||||
|
|
||||||
|
FIND_PATH ( MYGUI_INCLUDE_DIRS MyGUI.h PATH_SUFFIXES MYGUI)
|
||||||
|
FIND_PATH ( MYGUI_PLATFORM_INCLUDE_DIRS MyGUI_OgrePlatform.h PATH_SUFFIXES MYGUI)
|
||||||
|
FIND_LIBRARY ( MYGUI_LIBRARIES_REL NAMES
|
||||||
|
libMyGUIEngine${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||||
|
libMyGUI.OgrePlatform${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
|
HINTS
|
||||||
|
${MYGUI_LIB_DIR}
|
||||||
|
PATH_SUFFIXES "" release relwithdebinfo minsizerel )
|
||||||
|
|
||||||
|
FIND_LIBRARY ( MYGUI_LIBRARIES_DBG NAMES
|
||||||
|
libMyGUIEngine_d${CMAKE_SHARED_LIBRARY_SUFFIX}
|
||||||
|
libMyGUI.OgrePlatform_d${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
|
HINTS
|
||||||
|
${MYGUI_LIB_DIR}
|
||||||
|
PATH_SUFFIXES "" debug )
|
||||||
|
|
||||||
|
FIND_LIBRARY ( MYGUI_PLATFORM_LIBRARIES_REL NAMES
|
||||||
|
libMyGUI.OgrePlatform${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
|
HINTS
|
||||||
|
${MYGUI_LIB_DIR}
|
||||||
|
PATH_SUFFIXES "" release relwithdebinfo minsizerel )
|
||||||
|
|
||||||
|
FIND_LIBRARY ( MYGUI_PLATFORM_LIBRARIES_DBG NAMES
|
||||||
|
MyGUI.OgrePlatform_d${CMAKE_STATIC_LIBRARY_SUFFIX}
|
||||||
|
HINTS
|
||||||
|
${MYGUI_LIB_DIR}
|
||||||
|
PATH_SUFFIXES "" debug )
|
||||||
|
|
||||||
|
make_library_set ( MYGUI_LIBRARIES )
|
||||||
|
make_library_set ( MYGUI_PLATFORM_LIBRARIES )
|
||||||
|
|
||||||
|
MESSAGE ("${MYGUI_LIBRARIES}")
|
||||||
|
MESSAGE ("${MYGUI_PLATFORM_LIBRARIES}")
|
||||||
|
ENDIF(MINGW)
|
||||||
|
|
||||||
SET(MYGUISDK $ENV{MYGUI_HOME})
|
SET(MYGUISDK $ENV{MYGUI_HOME})
|
||||||
IF (MYGUISDK)
|
IF (MYGUISDK)
|
||||||
findpkg_begin ( "MYGUI" )
|
findpkg_begin ( "MYGUI" )
|
||||||
|
|
|
@ -127,6 +127,9 @@ set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(Qt4 COMPONENTS QtCore QtGui)
|
find_package(Qt4 COMPONENTS QtCore QtGui)
|
||||||
|
if(MINGW)
|
||||||
|
find_package(Bullet REQUIRED COMPONENTS Collision)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
|
if(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
|
||||||
add_component_qt_dir (contentselector
|
add_component_qt_dir (contentselector
|
||||||
|
@ -170,6 +173,14 @@ if (GIT_CHECKOUT)
|
||||||
add_dependencies (components git-version)
|
add_dependencies (components git-version)
|
||||||
endif (GIT_CHECKOUT)
|
endif (GIT_CHECKOUT)
|
||||||
|
|
||||||
|
if(MINGW)
|
||||||
|
target_link_libraries(components ${QT_LIBRARIES} ${BULLET_LIBRARIES})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_link_libraries(components shlwapi)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Fix for not visible pthreads functions for linker with glibc 2.15
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
target_link_libraries(components ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(components ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
#ifndef COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
||||||
#define COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
#define COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
#include <boost/tr1/tr1/unordered_map>
|
#include <boost/tr1/tr1/unordered_map>
|
||||||
#elif defined HAVE_UNORDERED_MAP
|
#elif defined HAVE_UNORDERED_MAP
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <Shlwapi.h>
|
#include <shlwapi.h>
|
||||||
|
|
||||||
#pragma comment(lib, "Shlwapi.lib")
|
|
||||||
|
|
||||||
#include <boost/locale.hpp>
|
#include <boost/locale.hpp>
|
||||||
namespace bconv = boost::locale::conv;
|
namespace bconv = boost::locale::conv;
|
||||||
|
|
|
@ -21,8 +21,8 @@ extern "C"
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(__MINGW32__)
|
||||||
#include <BaseTsd.h>
|
#include <basetsd.h>
|
||||||
|
|
||||||
typedef SSIZE_T ssize_t;
|
typedef SSIZE_T ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
2
extern/oics/tinyxml.cpp
vendored
2
extern/oics/tinyxml.cpp
vendored
|
@ -32,7 +32,7 @@ distribution.
|
||||||
#include "tinyxml.h"
|
#include "tinyxml.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Windows.h> // import MultiByteToWideChar
|
#include <windows.h> // import MultiByteToWideChar
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
2
extern/sdl4ogre/sdlwindowhelper.cpp
vendored
2
extern/sdl4ogre/sdlwindowhelper.cpp
vendored
|
@ -30,7 +30,7 @@ SDLWindowHelper::SDLWindowHelper (SDL_Window* window, int w, int h,
|
||||||
|
|
||||||
switch (wmInfo.subsystem)
|
switch (wmInfo.subsystem)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
case SDL_SYSWM_WINDOWS:
|
case SDL_SYSWM_WINDOWS:
|
||||||
// Windows code
|
// Windows code
|
||||||
winHandle = Ogre::StringConverter::toString((uintptr_t)wmInfo.info.win.window);
|
winHandle = Ogre::StringConverter::toString((uintptr_t)wmInfo.info.win.window);
|
||||||
|
|
Loading…
Reference in a new issue