XP support (using mingw compiler)

This commit is contained in:
emb
2015-02-23 22:15:26 -06:00
parent 2e9f82b16e
commit 7b5ba862f7
3 changed files with 29 additions and 28 deletions

View File

@@ -26,7 +26,7 @@ if(WIN32)
set(DIRENT_INCLUDE_DIR "${RETROFE_THIRD_PARTY_DIR}/dirent-1.20.1/include")
endif()
if(MSVC)
if(WIN32)
find_package(Glib2 REQUIRED)
find_package(GStreamer REQUIRED)
find_package(SDL2 REQUIRED)
@@ -56,9 +56,12 @@ set(RETROFE_INCLUDE_DIRS
"${ZLIB_INCLUDE_DIRS}"
"${SQLITE3_ROOT}"
"${RAPIDXML_ROOT}"
"${DIRENT_INCLUDE_DIR}"
)
if(MSVC)
LIST(APPEND RETROFE_INCLUDE_DIRS "${DIRENT_INCLUDE_DIR}")
endif()
set(RETROFE_LIBRARIES
${GLIB2_LIBRARIES}
${GSTREAMER_LIBRARIES}
@@ -69,7 +72,7 @@ set(RETROFE_LIBRARIES
${ZLIB_LIBRARIES}
)
if(NOT MSVC)
if(NOT WIN32)
LIST(APPEND RETROFE_LIBRARIES ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})
endif()
@@ -176,6 +179,10 @@ add_definitions(-DRETROFE_VERSION_MAJOR=${VERSION_MAJOR})
add_definitions(-DRETROFE_VERSION_MINOR=${VERSION_MINOR})
add_definitions(-DRETROFE_VERSION_BUILD=${VERSION_BUILD})
if(MINGW)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
endif()
if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)

View File

@@ -114,10 +114,10 @@
#define __SOLARIS__ 1
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__)
#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW32__)
/* Try to find out if we're compiling for WinRT or non-WinRT */
/* If _USING_V110_SDK71_ is defined it means we are using the v110_xp or v120_xp toolset. */
#if defined(__MINGW32__) || (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
#if (defined(_MSC_VER) && (_MSC_VER >= 1700) && !_USING_V110_SDK71_) /* _MSC_VER==1700 for MSVC 2012 */
#include <winapifamily.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#undef __WINDOWS__