removed the cmake toolchain file, modified the cmakelists files to include an additional library to properly link with sfml and for linking statically with libgcc and stdc++ libs via mingw

This commit is contained in:
wowzaman12 2015-05-28 15:12:31 +00:00
parent 6a5cfd1073
commit 5a6ed061a4
3 changed files with 3 additions and 22 deletions

View File

@ -184,10 +184,10 @@ SET( CMAKE_CXX_FLAGS_RELEASE "-O3")
SET( CMAKE_C_FLAGS_DEBUG "-g -Wall")
SET( CMAKE_CXX_FLAGS_DEBUG "-g -Wall")
if (MINGW)
if (WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc -static -I../dependencies/include")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++ -static -I../dependencies/include")
endif (MINGW)
endif (WIN32)
add_subdirectory (fex)

View File

@ -1,19 +0,0 @@
set(CMAKE_SYSTEM_NAME Windows)
set(MSYS 1)
set(BUILD_SHARED_LIBS OFF)
set(LIBTYPE STATIC)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_FIND_ROOT_PATH /home/thecanadianbacon/mxe/usr/i686-w64-mingw32.static)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_C_COMPILER /home/thecanadianbacon/mxe/usr/bin/i686-w64-mingw32.static-gcc)
set(CMAKE_CXX_COMPILER /home/thecanadianbacon/mxe/usr/bin/i686-w64-mingw32.static-g++)
set(CMAKE_Fortran_COMPILER /home/thecanadianbacon/mxe/usr/bin/i686-w64-mingw32.static-gfortran)
set(CMAKE_RC_COMPILER /home/thecanadianbacon/mxe/usr/bin/i686-w64-mingw32.static-windres)
set(CMAKE_MODULE_PATH "/home/thecanadianbacon/mxe/src/cmake" ${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts
set(CMAKE_INSTALL_PREFIX /home/thecanadianbacon/mxe/usr/i686-w64-mingw32.static CACHE PATH "Installation Prefix")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")
set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>") # Workaround for buggy windres rules
set(PKG_CONFIG_EXECUTABLE /home/thecanadianbacon/mxe/usr/bin/i686-w64-mingw32.static-pkg-config)

View File

@ -137,7 +137,7 @@ ENDIF(ENABLE_XAUDIO2)
IF( WIN32 )
SET( SRC_WX ${SRC_WX} wxvbam.rc dsound.cpp )
SET(DIRECTX_LIBRARIES -ldxguid -ldsound)
SET(DIRECTX_LIBRARIES -ldxguid -ldsound -lws2_32)
# not strictly directx, but win32-related
IF(ENABLE_DEBUGGER)
SET(DIRECTX_LIBRARIES ${DIRECTX_LIBRARIES} -lwsock32)