diff --git a/CMakeLists.txt b/CMakeLists.txt index d8aa57e468..6fd09dbe8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -589,7 +589,7 @@ if(USE_X11) add_definitions(-DHAVE_XRANDR=0) endif(XRANDR_FOUND) - pkg_check_modules(XINPUT2 REQUIRED xi>=1.5.0) + pkg_check_modules(X11_INPUT REQUIRED xi>=1.5.0) endif() if(ENCODE_FRAMEDUMPS) check_libav() diff --git a/CMakeTests/CheckLib.cmake b/CMakeTests/CheckLib.cmake index ac8d17393b..c17dfb5e83 100644 --- a/CMakeTests/CheckLib.cmake +++ b/CMakeTests/CheckLib.cmake @@ -61,30 +61,66 @@ macro(check_libav) pkg_check_modules(LIBAV libavcodec>=54.35.0 libavformat>=54.20.4 libswscale>=2.1.1 libavutil>=52.3.0) else() - # Attempt to find it through static means - set(LIBAV_LDFLAGS avformat avcodec swscale avutil) - set(CMAKE_REQUIRED_LIBRARIES ${LIBAV_LDFLAGS}) - CHECK_CXX_SOURCE_COMPILES( - "extern \"C\" { - #include - #include - #include - #include - } - int main(int argc, char **argv) - { - av_register_all(); - return 0; - }" - LIBAV_FOUND) - unset(CMAKE_REQUIRED_LIBRARIES) + if(WIN32) + add_library(avcodec STATIC IMPORTED) + set_target_properties(avcodec PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/include + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/lib/avcodec.lib + ) + + add_library(avformat STATIC IMPORTED) + set_target_properties(avformat PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/include + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/lib/avformat.lib + ) + + add_library(avutil STATIC IMPORTED) + set_target_properties(avutil PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/include + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/lib/avutil.lib + ) + + add_library(swresample STATIC IMPORTED) + set_target_properties(swresample PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/include + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/lib/swresample.lib + ) + + add_library(swscale STATIC IMPORTED) + set_target_properties(swscale PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/include + IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Externals/ffmpeg/lib/swscale.lib + ) + + set(LIBAV_FOUND ON) + set(LIBAV_LIBRARIES avcodec avformat avutil swresample swscale) + else() + # Attempt to find it through static means + set(LIBAV_LDFLAGS avformat avcodec swscale avutil) + set(CMAKE_REQUIRED_LIBRARIES ${LIBAV_LDFLAGS}) + CHECK_CXX_SOURCE_COMPILES( + "extern \"C\" { + #include + #include + #include + #include + } + int main(int argc, char **argv) + { + av_register_all(); + return 0; + }" + LIBAV_FOUND) + unset(CMAKE_REQUIRED_LIBRARIES) + endif() endif() if(LIBAV_FOUND) message(STATUS "libav/ffmpeg found, enabling AVI frame dumps") add_definitions(-DHAVE_LIBAV) - include_directories(${LIBAV_INCLUDE_DIRS}) + if(LIBAV_INCLUDE_DIRS) + include_directories(${LIBAV_INCLUDE_DIRS}) + endif() else() message(STATUS "libav/ffmpeg not found, disabling AVI frame dumps") endif() endmacro() - diff --git a/Externals/libpng/CMakeLists.txt b/Externals/libpng/CMakeLists.txt index 122007c7c5..8489e6944a 100644 --- a/Externals/libpng/CMakeLists.txt +++ b/Externals/libpng/CMakeLists.txt @@ -18,5 +18,7 @@ set(SRCS pngwtran.c pngwutil.c ) -add_definitions(-Wno-self-assign) +if(NOT MSVC) + add_definitions(-Wno-self-assign) +endif() add_library(png STATIC ${SRCS}) diff --git a/Externals/wxWidgets3/CMakeLists.txt b/Externals/wxWidgets3/CMakeLists.txt index 50bc57533e..1f09e3318e 100644 --- a/Externals/wxWidgets3/CMakeLists.txt +++ b/Externals/wxWidgets3/CMakeLists.txt @@ -164,7 +164,7 @@ set(SRCS_COMMON "src/common/object.cpp" "src/common/odcombocmn.cpp" "src/common/overlaycmn.cpp" - #"src/common/ownerdrwcmn.cpp" + "src/common/ownerdrwcmn.cpp" "src/common/panelcmn.cpp" "src/common/paper.cpp" "src/common/persist.cpp" @@ -265,7 +265,7 @@ set(SRCS_GENERIC "src/generic/busyinfo.cpp" "src/generic/buttonbar.cpp" "src/generic/calctrlg.cpp" - "src/generic/caret.cpp" + #"src/generic/caret.cpp" "src/generic/choicbkg.cpp" "src/generic/choicdgg.cpp" "src/generic/collheaderctrlg.cpp" @@ -279,7 +279,7 @@ set(SRCS_GENERIC "src/generic/dirctrlg.cpp" "src/generic/dragimgg.cpp" "src/generic/editlbox.cpp" - "src/generic/fdrepdlg.cpp" + #"src/generic/fdrepdlg.cpp" "src/generic/filectrlg.cpp" "src/generic/filepickerg.cpp" "src/generic/fontdlgg.cpp" @@ -348,7 +348,8 @@ set(SRCS_GENERICGTK "src/generic/preferencesg.cpp") set(SRCS_GENERICMSW - "src/generic/activityindicator.cpp") + "src/generic/activityindicator.cpp" + "src/generic/collpaneg.cpp") set(SRCS_GENERICOSX "src/generic/animateg.cpp" @@ -504,7 +505,7 @@ set(SRCS_MSW "src/msw/dragimag.cpp" #"src/msw/enhmeta.cpp" "src/msw/evtloop.cpp" - #"src/msw/evtloopconsole.cpp" + "src/msw/evtloopconsole.cpp" "src/msw/fdrepdlg.cpp" "src/msw/filedlg.cpp" "src/msw/font.cpp" @@ -608,11 +609,11 @@ set(SRCS_MSW "src/msw/utilsgui.cpp" "src/msw/utilswin.cpp" "src/msw/uxtheme.cpp" - "src/msw/version.rc" + #"src/msw/version.rc" "src/msw/volume.cpp" #"src/msw/webview_ie.cpp" "src/msw/window.cpp" - "src/msw/winestub.c" + #"src/msw/winestub.c" #"src/msw/rt/notifmsgrt.cpp" #"src/msw/rt/utilsrt.cpp" ) @@ -872,16 +873,23 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD") ${X11_Xinerama_LIB}) else() add_definitions(-D__WXMSW__) + add_definitions(-DNOPCH) + remove_definitions(-DWIN32_LEAN_AND_MEAN) set(SRCS ${SRCS} ${SRCS_GENERICMSW} ${SRCS_MSW}) + set(LIBS + Comctl32.lib + Rpcrt4.lib + ${OPENGL_LIBRARIES} + ) endif() add_definitions(-DWXBUILDING) # wxWidgets warnings are not our problem. add_definitions(-w) -enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS) +#enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS) add_library(wx STATIC ${PNG_SRCS} ${SRCS}) target_link_libraries(wx ${LIBS}) diff --git a/Externals/wxWidgets3/build/msw/wx_base.vcxproj b/Externals/wxWidgets3/build/msw/wx_base.vcxproj index 7a2591b851..40e54908af 100644 --- a/Externals/wxWidgets3/build/msw/wx_base.vcxproj +++ b/Externals/wxWidgets3/build/msw/wx_base.vcxproj @@ -1370,6 +1370,9 @@ __WXDEBUG__;%(PreprocessorDefinitions) + + /ignore:4221 + diff --git a/Externals/wxWidgets3/wx/wxcocoa.h b/Externals/wxWidgets3/wx/wxcocoa.h index 88d9b19b2a..24e0ba0398 100644 --- a/Externals/wxWidgets3/wx/wxcocoa.h +++ b/Externals/wxWidgets3/wx/wxcocoa.h @@ -269,7 +269,7 @@ #define wxUSE_DYNAMIC_LOADER 1 -#define wxUSE_SOCKETS 1 +#define wxUSE_SOCKETS 0 #define wxUSE_IPV6 1 @@ -279,7 +279,7 @@ #define wxUSE_FS_ARCHIVE 1 -#define wxUSE_FS_INET 1 +#define wxUSE_FS_INET 0 #define wxUSE_ARCHIVE_STREAMS 1 @@ -299,13 +299,13 @@ #define wxUSE_MIMETYPE 1 -#define wxUSE_PROTOCOL 1 +#define wxUSE_PROTOCOL 0 #define wxUSE_PROTOCOL_FILE 1 #define wxUSE_PROTOCOL_FTP 1 #define wxUSE_PROTOCOL_HTTP 1 -#define wxUSE_URL 1 +#define wxUSE_URL 0 #define wxUSE_URL_NATIVE 0 @@ -1173,7 +1173,7 @@ #define HAVE_ICONV 1 /* Define as "const" if the declaration of iconv() needs const. */ -#define ICONV_CONST +#define ICONV_CONST /* Define if you have the header file. */ #define HAVE_LANGINFO_H 1 @@ -1289,4 +1289,3 @@ /* #undef wxHAS_WORKING_GTK_DC_BLIT */ #endif /* __WX_SETUP_H__ */ - diff --git a/Externals/wxWidgets3/wx/wxgtk.h b/Externals/wxWidgets3/wx/wxgtk.h index dda1f56769..8370fc49ff 100644 --- a/Externals/wxWidgets3/wx/wxgtk.h +++ b/Externals/wxWidgets3/wx/wxgtk.h @@ -259,7 +259,7 @@ #define wxUSE_DYNAMIC_LOADER 1 -#define wxUSE_SOCKETS 1 +#define wxUSE_SOCKETS 0 #define wxUSE_IPV6 1 @@ -269,7 +269,7 @@ #define wxUSE_FS_ARCHIVE 1 -#define wxUSE_FS_INET 1 +#define wxUSE_FS_INET 0 #define wxUSE_ARCHIVE_STREAMS 1 @@ -289,13 +289,13 @@ #define wxUSE_MIMETYPE 1 -#define wxUSE_PROTOCOL 1 +#define wxUSE_PROTOCOL 0 #define wxUSE_PROTOCOL_FILE 1 #define wxUSE_PROTOCOL_FTP 1 #define wxUSE_PROTOCOL_HTTP 1 -#define wxUSE_URL 1 +#define wxUSE_URL 0 #define wxUSE_URL_NATIVE 0 @@ -1283,4 +1283,3 @@ /* #undef wxHAS_WORKING_GTK_DC_BLIT */ #endif /* __WX_SETUP_H__ */ - diff --git a/Externals/wxWidgets3/wx/wxmsw.h b/Externals/wxWidgets3/wx/wxmsw.h index b53fdb6ed8..e5df859a5f 100644 --- a/Externals/wxWidgets3/wx/wxmsw.h +++ b/Externals/wxWidgets3/wx/wxmsw.h @@ -544,7 +544,7 @@ #define wxUSE_DYNAMIC_LOADER 1 // Set to 1 to use socket classes -#define wxUSE_SOCKETS 1 +#define wxUSE_SOCKETS 0 // Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) // @@ -567,7 +567,7 @@ #define wxUSE_FS_ARCHIVE 1 // Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) -#define wxUSE_FS_INET 1 +#define wxUSE_FS_INET 0 // wxArchive classes for accessing archives such as zip and tar #define wxUSE_ARCHIVE_STREAMS 1 @@ -609,7 +609,7 @@ // Default is 1. // // Recommended setting: 1 -#define wxUSE_PROTOCOL 1 +#define wxUSE_PROTOCOL 0 // The settings for the individual URL schemes #define wxUSE_PROTOCOL_FILE 1 @@ -617,7 +617,7 @@ #define wxUSE_PROTOCOL_HTTP 1 // Define this to use wxURL class. -#define wxUSE_URL 1 +#define wxUSE_URL 0 // Define this to use native platform url and protocol support. // Currently valid only for MS-Windows. diff --git a/Source/Core/InputCommon/CMakeLists.txt b/Source/Core/InputCommon/CMakeLists.txt index 648d7113b6..42907c2941 100644 --- a/Source/Core/InputCommon/CMakeLists.txt +++ b/Source/Core/InputCommon/CMakeLists.txt @@ -10,6 +10,7 @@ if(WIN32) ControllerInterface/DInput/DInput.cpp ControllerInterface/DInput/DInputJoystick.cpp ControllerInterface/DInput/DInputKeyboardMouse.cpp + ControllerInterface/DInput/XInputFilter.cpp ControllerInterface/XInput/XInput.cpp ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp) elseif(APPLE) @@ -27,7 +28,7 @@ elseif(APPLE) elseif(X11_FOUND) set(SRCS ${SRCS} ControllerInterface/Xlib/XInput2.cpp) - set(LIBS ${LIBS} ${X11_LIBRARIES} ${XINPUT2_LIBRARIES}) + set(LIBS ${LIBS} ${X11_LIBRARIES} ${X11_INPUT_LIBRARIES}) elseif(ANDROID) add_definitions(-DCIFACE_USE_ANDROID) set(SRCS ${SRCS}