cmake: Fix building wxWidgets on Windows

And disable unused network functions.
This commit is contained in:
Florent Castelli 2017-01-21 03:24:18 +01:00
parent 59fb8042d1
commit c3e876b6be
5 changed files with 32 additions and 23 deletions

View file

@ -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})

View file

@ -1370,6 +1370,9 @@
<ClCompile>
<PreprocessorDefinitions>__WXDEBUG__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Lib>
<AdditionalOptions>/ignore:4221</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="$(ExternalsDir)libpng\png\png.vcxproj">

View file

@ -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 <langinfo.h> header file. */
#define HAVE_LANGINFO_H 1
@ -1289,4 +1289,3 @@
/* #undef wxHAS_WORKING_GTK_DC_BLIT */
#endif /* __WX_SETUP_H__ */

View file

@ -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__ */

View file

@ -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.