MinGW build portability fixes
AKA you can build melonDS for Windows on Fedora now
This commit is contained in:
parent
a2406e3c0e
commit
d21bc64cb3
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <WS2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <WS2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -46,7 +46,12 @@ set(SOURCES
|
||||||
|
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libslirp-version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/libslirp-version.h")
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libslirp-version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/libslirp-version.h")
|
||||||
|
|
||||||
|
if (BUILD_STATIC)
|
||||||
add_library(slirp STATIC ${SOURCES})
|
add_library(slirp STATIC ${SOURCES})
|
||||||
|
else()
|
||||||
|
add_library(slirp ${SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(slirp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
|
target_include_directories(slirp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
|
||||||
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
|
||||||
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
|
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
|
@ -112,6 +112,10 @@ if (WIN32)
|
||||||
|
|
||||||
../glad/glad_wgl.c
|
../glad/glad_wgl.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (MINGW AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
|
||||||
|
set_property(TARGET melonDS PROPERTY AUTORCC_OPTIONS "--no-zstd")
|
||||||
|
endif()
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
if (NOT USE_QT6)
|
if (NOT USE_QT6)
|
||||||
find_library(COCOA_LIB Cocoa)
|
find_library(COCOA_LIB Cocoa)
|
||||||
|
|
Loading…
Reference in New Issue