Merge branch 'build-option-fixes' of https://github.com/MaartenBent/wxWidgets

Miscellaneous build options fixes.

See https://github.com/wxWidgets/wxWidgets/pull/1661
This commit is contained in:
Vadim Zeitlin
2019-12-03 02:27:52 +01:00
21 changed files with 190 additions and 131 deletions

View File

@@ -17,7 +17,7 @@ matrix:
env: wxCONFIGURE_FLAGS="--enable-utf8 --enable-utf8only --enable-monolithic" wxUSE_XVFB=1 env: wxCONFIGURE_FLAGS="--enable-utf8 --enable-utf8only --enable-monolithic" wxUSE_XVFB=1
- dist: trusty - dist: trusty
compiler: gcc compiler: gcc
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxUSE_XVFB=1 env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxUSE_XVFB=1
- dist: trusty - dist: trusty
compiler: clang compiler: clang
env: wxCONFIGURE_FLAGS="--disable-shared --disable-sys-libs --disable-webview" wxUSE_XVFB=1 env: wxCONFIGURE_FLAGS="--disable-shared --disable-sys-libs --disable-webview" wxUSE_XVFB=1

View File

@@ -405,14 +405,18 @@ endmacro()
# Forwards everything to target_include_directories() except for monolithic # Forwards everything to target_include_directories() except for monolithic
# build where it collects all include paths for linking with the mono lib # build where it collects all include paths for linking with the mono lib
macro(wx_lib_include_directories name) macro(wx_lib_include_directories name)
cmake_parse_arguments(_LIB_INCLUDE_DIRS "" "" "PUBLIC;PRIVATE" ${ARGN})
if(wxBUILD_MONOLITHIC) if(wxBUILD_MONOLITHIC)
cmake_parse_arguments(_LIB_INCLUDE_DIRS "" "" "PUBLIC;PRIVATE" ${ARGN})
list(APPEND wxMONO_INCLUDE_DIRS_PUBLIC ${_LIB_INCLUDE_DIRS_PUBLIC}) list(APPEND wxMONO_INCLUDE_DIRS_PUBLIC ${_LIB_INCLUDE_DIRS_PUBLIC})
list(APPEND wxMONO_INCLUDE_DIRS_PRIVATE ${_LIB_INCLUDE_DIRS_PRIVATE}) list(APPEND wxMONO_INCLUDE_DIRS_PRIVATE ${_LIB_INCLUDE_DIRS_PRIVATE})
set(wxMONO_INCLUDE_DIRS_PUBLIC ${wxMONO_INCLUDE_DIRS_PUBLIC} PARENT_SCOPE) set(wxMONO_INCLUDE_DIRS_PUBLIC ${wxMONO_INCLUDE_DIRS_PUBLIC} PARENT_SCOPE)
set(wxMONO_INCLUDE_DIRS_PRIVATE ${wxMONO_INCLUDE_DIRS_PRIVATE} PARENT_SCOPE) set(wxMONO_INCLUDE_DIRS_PRIVATE ${wxMONO_INCLUDE_DIRS_PRIVATE} PARENT_SCOPE)
else() else()
target_include_directories(${name};BEFORE;${ARGN}) set(INCLUDE_POS)
if (_LIB_INCLUDE_DIRS_PRIVATE)
set(INCLUDE_POS BEFORE)
endif()
target_include_directories(${name};${INCLUDE_POS};${ARGN})
endif() endif()
endmacro() endmacro()

View File

@@ -203,6 +203,31 @@ if(DEFINED wxUSE_OLE AND wxUSE_OLE)
set(wxUSE_OLE_AUTOMATION ON) set(wxUSE_OLE_AUTOMATION ON)
endif() endif()
if(wxUSE_ACTIVEX AND DEFINED wxUSE_OLE AND NOT wxUSE_OLE)
message(WARNING "wxActiveXContainer requires wxUSE_OLE... disabled")
wx_option_force_value(wxUSE_ACTIVEX OFF)
endif()
if(wxUSE_DRAG_AND_DROP AND DEFINED wxUSE_OLE AND NOT wxUSE_OLE)
message(WARNING "wxUSE_DRAG_AND_DROP requires wxUSE_OLE... disabled")
wx_option_force_value(wxUSE_DRAG_AND_DROP OFF)
endif()
if(wxUSE_ACCESSIBILITY AND DEFINED wxUSE_OLE AND NOT wxUSE_OLE)
message(WARNING "wxUSE_ACCESSIBILITY requires wxUSE_OLE... disabled")
wx_option_force_value(wxUSE_ACCESSIBILITY OFF)
endif()
if(wxUSE_MEDIACTRL AND DEFINED wxUSE_ACTIVEX AND NOT wxUSE_ACTIVEX)
message(WARNING "wxMediaCtl requires wxActiveXContainer... disabled")
wx_option_force_value(wxUSE_MEDIACTRL OFF)
endif()
if(wxUSE_WEBVIEW AND DEFINED wxUSE_ACTIVEX AND NOT wxUSE_ACTIVEX)
message(WARNING "wxWebView requires wxActiveXContainer... disabled")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
if(wxUSE_OPENGL) if(wxUSE_OPENGL)
set(wxUSE_GLCANVAS ON) set(wxUSE_GLCANVAS ON)
endif() endif()
@@ -247,6 +272,11 @@ if(wxUSE_TEXTFILE AND (NOT wxUSE_FILE OR NOT wxUSE_TEXTBUFFER))
wx_option_force_value(wxUSE_TEXTFILE OFF) wx_option_force_value(wxUSE_TEXTFILE OFF)
endif() endif()
if(wxUSE_MIMETYPE AND NOT wxUSE_TEXTFILE)
message(WARNING "wxUSE_MIMETYPE requires wxTextFile... disabled")
wx_option_force_value(wxUSE_MIMETYPE OFF)
endif()
if(wxUSE_CONFIG) if(wxUSE_CONFIG)
if(NOT wxUSE_TEXTFILE) if(NOT wxUSE_TEXTFILE)
message(WARNING "wxConfig requires wxTextFile... disabled") message(WARNING "wxConfig requires wxTextFile... disabled")
@@ -390,8 +420,9 @@ if(wxUSE_GUI)
if(wxUSE_PRIVATE_FONTS AND WXGTK) if(wxUSE_PRIVATE_FONTS AND WXGTK)
find_package(Fontconfig) find_package(Fontconfig)
if(NOT FONTCONFIG_FOUND) find_package(PangoFT2)
message(WARNING "Fontconfig not found, Private fonts won't be available") if(NOT FONTCONFIG_FOUND OR NOT PANGOFT2_FOUND)
message(WARNING "Fontconfig or PangoFT2 not found, Private fonts won't be available")
wx_option_force_value(wxUSE_PRIVATE_FONTS OFF) wx_option_force_value(wxUSE_PRIVATE_FONTS OFF)
endif() endif()
endif() endif()

View File

@@ -86,7 +86,11 @@ if(wxBUILD_MONOLITHIC)
target_link_libraries(mono ${vis} ${wxMONO_LIBS_${vis}}) target_link_libraries(mono ${vis} ${wxMONO_LIBS_${vis}})
endif() endif()
if(wxMONO_INCLUDE_DIRS_${vis}) if(wxMONO_INCLUDE_DIRS_${vis})
target_include_directories(mono ${vis} ${wxMONO_INCLUDE_DIRS_${vis}}) set(INCLUDE_POS)
if (vis STREQUAL PRIVATE)
set(INCLUDE_POS BEFORE)
endif()
target_include_directories(mono ${INCLUDE_POS} ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
endif() endif()
if(wxMONO_DEFINITIONS_${vis}) if(wxMONO_DEFINITIONS_${vis})
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}}) target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}})

View File

@@ -25,6 +25,9 @@ if(WXMSW)
wx_append_sources(CORE_SRC MSW_DESKTOP_LOWLEVEL) wx_append_sources(CORE_SRC MSW_DESKTOP_LOWLEVEL)
wx_append_sources(CORE_SRC MSW) wx_append_sources(CORE_SRC MSW)
wx_append_sources(CORE_SRC MSW_DESKTOP) wx_append_sources(CORE_SRC MSW_DESKTOP)
if(NOT wxUSE_OLE)
wx_list_add_prefix(CORE_SRC "${wxSOURCE_DIR}/" "src/generic/dirdlgg.cpp")
endif()
elseif(WXGTK) elseif(WXGTK)
if(WXGTK2) if(WXGTK2)
wx_append_sources(CORE_SRC GTK2_LOWLEVEL) wx_append_sources(CORE_SRC GTK2_LOWLEVEL)
@@ -74,8 +77,8 @@ if(WXOSX_COCOA)
endif() endif()
endif() endif()
if(WXGTK AND wxUSE_PRIVATE_FONTS) if(WXGTK AND wxUSE_PRIVATE_FONTS)
wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIR}) wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_LIBRARIES}) wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
endif() endif()
if(wxUSE_LIBSDL) if(wxUSE_LIBSDL)
if(SDL2_FOUND) if(SDL2_FOUND)

View File

@@ -1,69 +1,30 @@
# - Try to find the Fontconfig # - Try to find Fontconfig
# Once done this will define # Once done this will define
# #
# FONTCONFIG_FOUND - system has Fontconfig # FONTCONFIG_FOUND - system has Fontconfig
# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers # FONTCONFIG_INCLUDE_DIRS - The include directory to use for the Fontconfig headers
# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG # FONTCONFIG_LIBRARIES - Link these to use Fontconfig
# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org> find_package(PkgConfig)
# pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) find_path(FONTCONFIG_INCLUDE_DIRS
NAMES fontconfig.h
HINTS ${PC_FONTCONFIG_INCLUDEDIR}
${PC_FONTCONFIG_INCLUDE_DIRS}
PATH_SUFFIXES fontconfig
)
# in cache already find_library(FONTCONFIG_LIBRARIES
set(FONTCONFIG_FOUND TRUE) NAMES fontconfig
HINTS ${PC_FONTCONFIG_LIBDIR}
${PC_FONTCONFIG_LIBRARY_DIRS}
)
else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FONTCONFIG DEFAULT_MSG FONTCONFIG_INCLUDE_DIRS FONTCONFIG_LIBRARIES)
if (NOT WIN32) mark_as_advanced(
# use pkg-config to get the directories and then use these values FONTCONFIG_INCLUDE_DIRS
# in the FIND_PATH() and FIND_LIBRARY() calls FONTCONFIG_LIBRARIES
find_package(PkgConfig) )
pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
endif (NOT WIN32)
find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h
PATHS
${PC_FONTCONFIG_INCLUDEDIR}
${PC_FONTCONFIG_INCLUDE_DIRS}
/usr/X11/include
)
find_library(FONTCONFIG_LIBRARIES NAMES fontconfig
PATHS
${PC_FONTCONFIG_LIBDIR}
${PC_FONTCONFIG_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR )
mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR)
endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)

View File

@@ -0,0 +1,30 @@
# - Try to find PangoFT2
# Once done this will define
#
# PANGOFT2_FOUND - system has PangoFT2
# PANGOFT2_INCLUDE_DIRS - The include directory to use for the PangoFT2 headers
# PANGOFT2_LIBRARIES - Link these to use PangoFT2
find_package(PkgConfig)
pkg_check_modules(PC_PANGOFT2 QUIET pangoft2)
find_path(PANGOFT2_INCLUDE_DIRS
NAMES pango-context.h
HINTS ${PC_PANGOFT2_INCLUDEDIR}
${PC_PANGOFT2_INCLUDE_DIRS}
PATH_SUFFIXES pango
)
find_library(PANGOFT2_LIBRARIES
NAMES pangoft2-1.0
HINTS ${PC_PANGOFT2_LIBDIR}
${PC_PANGOFT2_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PANGOFT2 REQUIRED_VARS PANGOFT2_INCLUDE_DIRS PANGOFT2_LIBRARIES)
mark_as_advanced(
PANGOFT2_INCLUDE_DIRS
PANGOFT2_LIBRARIES
)

View File

@@ -1551,7 +1551,8 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
endif() endif()
endif() endif()
elseif (_compilerID MATCHES "Clang") elseif (_compilerID MATCHES "Clang")
if (UNIX) get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
# Clang options used # Clang options used
# -H print the name of each header file used # -H print the name of each header file used
# -E invoke preprocessor # -E invoke preprocessor
@@ -1564,7 +1565,7 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
# return as a flag string # return as a flag string
set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly") set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly")
endif() endif()
elseif (WIN32) else()
# Clang-cl.exe options used # Clang-cl.exe options used
# /TC treat all files named on the command line as C source files # /TC treat all files named on the command line as C source files
# /TP treat all files named on the command line as C++ source files # /TP treat all files named on the command line as C++ source files
@@ -1671,7 +1672,8 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"") set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
endif() endif()
elseif (_compilerID MATCHES "Clang") elseif (_compilerID MATCHES "Clang")
if (UNIX) get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
# Clang options used # Clang options used
# -x specify the source language # -x specify the source language
# -c compile but do not link # -c compile but do not link
@@ -1692,7 +1694,7 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
set (_flags "${_flags} -Xclang -fno-pch-timestamp") set (_flags "${_flags} -Xclang -fno-pch-timestamp")
endif() endif()
endif() endif()
elseif (WIN32) else()
# Clang-cl.exe options used # Clang-cl.exe options used
# /Yc creates a precompiled header file # /Yc creates a precompiled header file
# /Fp specifies precompiled header binary file name # /Fp specifies precompiled header binary file name
@@ -1830,7 +1832,8 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
set (_flags "-Winvalid-pch -include \"${_prefixFile}\"") set (_flags "-Winvalid-pch -include \"${_prefixFile}\"")
endif() endif()
elseif (_compilerID MATCHES "Clang") elseif (_compilerID MATCHES "Clang")
if (UNIX) get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
# Clang options used # Clang options used
# -include process include file as the first line of the primary source file # -include process include file as the first line of the primary source file
# note: ccache requires the -include flag to be used in order to process precompiled header correctly # note: ccache requires the -include flag to be used in order to process precompiled header correctly
@@ -1841,7 +1844,7 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
# return as a flag string # return as a flag string
set (_flags "-include \"${_prefixFile}\"") set (_flags "-include \"${_prefixFile}\"")
endif() endif()
elseif (WIN32) else()
# Clang-cl.exe options used # Clang-cl.exe options used
# /Yu uses a precompiled header file during build # /Yu uses a precompiled header file during build
# /Fp specifies precompiled header binary file name # /Fp specifies precompiled header binary file name
@@ -2006,15 +2009,12 @@ function (cotire_check_precompiled_header_support _language _target _msgVar)
set (${_msgVar} "" PARENT_SCOPE) set (${_msgVar} "" PARENT_SCOPE)
endif() endif()
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang") elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
if (UNIX) get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (NOT WIN32 OR NOT _compilerName MATCHES "cl$")
# all Unix Clang versions have PCH support # all Unix Clang versions have PCH support
set (${_msgVar} "" PARENT_SCOPE) set (${_msgVar} "" PARENT_SCOPE)
elseif (WIN32) else()
# only clang-cl is supported under Windows # clang-cl under Windows
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (NOT _compilerName MATCHES "cl$")
set (${_msgVar} "${_unsupportedCompiler} version ${CMAKE_${_language}_COMPILER_VERSION}. Use clang-cl instead." PARENT_SCOPE)
endif()
endif() endif()
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel") elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
# Intel PCH support requires version >= 8.0.0 # Intel PCH support requires version >= 8.0.0
@@ -2381,8 +2381,9 @@ endfunction()
function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile) function (cotire_setup_pch_file_compilation _language _target _targetScript _prefixFile _pchFile _hostFile)
set (_sourceFiles ${ARGN}) set (_sourceFiles ${ARGN})
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) (WIN32 AND _compilerName MATCHES "cl$"))
# for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file # for MSVC, Intel and Clang-cl, we attach the precompiled header compilation to the host file
# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion # the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
if (_sourceFiles) if (_sourceFiles)
@@ -2428,8 +2429,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre
endfunction() endfunction()
function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile) function (cotire_setup_pch_file_inclusion _language _target _wholeTarget _prefixFile _pchFile _hostFile)
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR if (CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" OR
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) (WIN32 AND _compilerName MATCHES "cl$"))
# for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file # for MSVC, Intel and clang-cl, we include the precompiled header in all but the host file
# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation # the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation
set (_sourceFiles ${ARGN}) set (_sourceFiles ${ARGN})
@@ -2578,8 +2580,9 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
set (_language "${_languages}") set (_language "${_languages}")
# for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level # for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level
# see cotire_setup_pch_file_inclusion # see cotire_setup_pch_file_inclusion
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) (WIN32 AND _compilerName MATCHES "cl$"))
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
if (_prefixFile) if (_prefixFile)
get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER) get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)
@@ -3071,8 +3074,9 @@ function (cotire_setup_pch_target _languages _configurations _target)
set (_dependsFiles "") set (_dependsFiles "")
foreach (_language ${_languages}) foreach (_language ${_languages})
set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE) set (_props COTIRE_${_language}_PREFIX_HEADER COTIRE_${_language}_UNITY_SOURCE)
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT if (NOT CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel" AND NOT
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang")) (WIN32 AND _compilerName MATCHES "cl$"))
# MSVC, Intel and clang-cl only create precompiled header as a side effect # MSVC, Intel and clang-cl only create precompiled header as a side effect
list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER) list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)
endif() endif()

View File

@@ -24,7 +24,8 @@ case $(uname -s) in
pgk_check="libgstreamermm-1.0-dev libgstreamermm-0.10-dev \ pgk_check="libgstreamermm-1.0-dev libgstreamermm-0.10-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev \ libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev \
libwebkitgtk-dev libglu1-mesa-dev libsecret-1-dev libnotify-dev" libwebkit2gtk-4.0-dev libwebkitgtk-3.0-dev libwebkitgtk-dev \
libglu1-mesa-dev libsecret-1-dev libnotify-dev"
for pkg in $pgk_check; do for pkg in $pgk_check; do
if $(apt-cache pkgnames | grep -q $pkg) ; then if $(apt-cache pkgnames | grep -q $pkg) ; then

View File

@@ -37,6 +37,7 @@ OutputDir={#WXW_DIR}\..
OutputBaseFilename={#SETUPFILENAME} OutputBaseFilename={#SETUPFILENAME}
PrivilegesRequired=none PrivilegesRequired=none
SetupIconFile={#WXW_DIR}\art\wxwin.ico SetupIconFile={#WXW_DIR}\art\wxwin.ico
UninstallDisplayIcon={#WXW_DIR}\art\wxwin.ico
Compression=lzma Compression=lzma
SolidCompression=yes SolidCompression=yes

View File

@@ -324,12 +324,7 @@ public:
void SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode); void SetShapeRenderingMode(wxSVGShapeRenderingMode renderingMode);
private: private:
wxSVGFileDC() wxDECLARE_ABSTRACT_CLASS(wxSVGFileDC);
: wxDC(new wxSVGFileDCImpl(this, wxString()))
{
}
wxDECLARE_DYNAMIC_CLASS(wxSVGFileDC);
}; };
#endif // wxUSE_SVG #endif // wxUSE_SVG

View File

@@ -381,6 +381,15 @@
# define wxUSE_DRAG_AND_DROP 0 # define wxUSE_DRAG_AND_DROP 0
# endif # endif
# endif # endif
# if wxUSE_ACCESSIBILITY
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_ACCESSIBILITY requires wxUSE_OLE"
# else
# undef wxUSE_ACCESSIBILITY
# define wxUSE_ACCESSIBILITY 0
# endif
# endif
#endif /* !wxUSE_OLE */ #endif /* !wxUSE_OLE */
#if !wxUSE_ACTIVEX #if !wxUSE_ACTIVEX

View File

@@ -575,7 +575,7 @@ protected:
class WXDLLIMPEXP_PROPGRID wxEditorDialogProperty : public wxPGProperty class WXDLLIMPEXP_PROPGRID wxEditorDialogProperty : public wxPGProperty
{ {
friend class wxPGDialogAdapter; friend class wxPGDialogAdapter;
wxDECLARE_ABSTRACT_CLASS(wxDialogProperty); wxDECLARE_ABSTRACT_CLASS(wxEditorDialogProperty);
public: public:
virtual ~wxEditorDialogProperty(); virtual ~wxEditorDialogProperty();

View File

@@ -1190,17 +1190,17 @@ void MyFrame::WriteInitialText()
r.Newline(); r.Newline();
wxRichTextAttr attr; wxRichTextAttr attr1;
attr.GetTextBoxAttr().GetMargins().GetLeft().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetLeft().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetMargins().GetTop().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetTop().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetMargins().GetRight().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetRight().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetMargins().GetBottom().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetBottom().SetValue(20, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetBorder().SetColour(*wxBLACK); attr1.GetTextBoxAttr().GetBorder().SetColour(*wxBLACK);
attr.GetTextBoxAttr().GetBorder().SetWidth(1, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetBorder().SetWidth(1, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetBorder().SetStyle(wxTEXT_BOX_ATTR_BORDER_SOLID); attr1.GetTextBoxAttr().GetBorder().SetStyle(wxTEXT_BOX_ATTR_BORDER_SOLID);
wxRichTextBox* textBox = r.WriteTextBox(attr); wxRichTextBox* textBox = r.WriteTextBox(attr1);
r.SetFocusObject(textBox); r.SetFocusObject(textBox);
r.WriteText("This is a text box. Just testing! Once more unto the breach, dear friends, once more..."); r.WriteText("This is a text box. Just testing! Once more unto the breach, dear friends, once more...");
@@ -1216,22 +1216,22 @@ void MyFrame::WriteInitialText()
r.Newline(); r.Newline();
wxRichTextAttr attr; wxRichTextAttr attr1;
attr.GetTextBoxAttr().GetMargins().GetLeft().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetLeft().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetMargins().GetTop().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetTop().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetMargins().GetRight().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetRight().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetMargins().GetBottom().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetMargins().GetBottom().SetValue(5, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetPadding() = attr.GetTextBoxAttr().GetMargins(); attr1.GetTextBoxAttr().GetPadding() = attr.GetTextBoxAttr().GetMargins();
attr.GetTextBoxAttr().GetBorder().SetColour(*wxBLACK); attr1.GetTextBoxAttr().GetBorder().SetColour(*wxBLACK);
attr.GetTextBoxAttr().GetBorder().SetWidth(1, wxTEXT_ATTR_UNITS_PIXELS); attr1.GetTextBoxAttr().GetBorder().SetWidth(1, wxTEXT_ATTR_UNITS_PIXELS);
attr.GetTextBoxAttr().GetBorder().SetStyle(wxTEXT_BOX_ATTR_BORDER_SOLID); attr1.GetTextBoxAttr().GetBorder().SetStyle(wxTEXT_BOX_ATTR_BORDER_SOLID);
wxRichTextAttr cellAttr = attr; wxRichTextAttr cellAttr = attr1;
cellAttr.GetTextBoxAttr().GetWidth().SetValue(200, wxTEXT_ATTR_UNITS_PIXELS); cellAttr.GetTextBoxAttr().GetWidth().SetValue(200, wxTEXT_ATTR_UNITS_PIXELS);
cellAttr.GetTextBoxAttr().GetHeight().SetValue(150, wxTEXT_ATTR_UNITS_PIXELS); cellAttr.GetTextBoxAttr().GetHeight().SetValue(150, wxTEXT_ATTR_UNITS_PIXELS);
wxRichTextTable* table = r.WriteTable(6, 4, attr, cellAttr); wxRichTextTable* table = r.WriteTable(6, 4, attr1, cellAttr);
int i, j; int i, j;
for (j = 0; j < table->GetRowCount(); j++) for (j = 0; j < table->GetRowCount(); j++)
@@ -1382,15 +1382,15 @@ void MyFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
if (dialog.ShowModal() == wxID_OK) if (dialog.ShowModal() == wxID_OK)
{ {
wxString path = dialog.GetPath(); wxString path1 = dialog.GetPath();
if (!path.empty()) if (!path1.empty())
{ {
int filterIndex = dialog.GetFilterIndex(); int filterIndex = dialog.GetFilterIndex();
int fileType = (filterIndex < (int) fileTypes.GetCount()) int fileType = (filterIndex < (int) fileTypes.GetCount())
? fileTypes[filterIndex] ? fileTypes[filterIndex]
: wxRICHTEXT_TYPE_TEXT; : wxRICHTEXT_TYPE_TEXT;
m_richTextCtrl->LoadFile(path, fileType); m_richTextCtrl->LoadFile(path1, fileType);
} }
} }
} }
@@ -1420,14 +1420,14 @@ void MyFrame::OnSaveAs(wxCommandEvent& WXUNUSED(event))
if (dialog.ShowModal() == wxID_OK) if (dialog.ShowModal() == wxID_OK)
{ {
wxString path = dialog.GetPath(); wxString path1 = dialog.GetPath();
if (!path.empty()) if (!path1.empty())
{ {
wxBusyCursor busy; wxBusyCursor busy;
wxStopWatch stopwatch; wxStopWatch stopwatch;
m_richTextCtrl->SaveFile(path); m_richTextCtrl->SaveFile(path1);
long t = stopwatch.Time(); long t = stopwatch.Time();
wxLogDebug("Saving took %ldms", t); wxLogDebug("Saving took %ldms", t);
@@ -2315,10 +2315,10 @@ wxRichTextTable* MyRichTextCtrl::FindTable() const
while (obj) while (obj)
{ {
obj = obj->GetParent(); obj = obj->GetParent();
wxRichTextTable* table = wxDynamicCast(obj, wxRichTextTable); wxRichTextTable* table1 = wxDynamicCast(obj, wxRichTextTable);
if (table) if (table1)
{ {
return table; return table1;
} }
} }

View File

@@ -677,8 +677,8 @@ wxThread::ExitCode ThreadWorker::Entry()
} else { } else {
//wxLogMessage("ThreadWorker: Connected. Sending %d bytes of data",m_outsize); //wxLogMessage("ThreadWorker: Connected. Sending %d bytes of data",m_outsize);
etype = WorkerEvent::SENDING; etype = WorkerEvent::SENDING;
WorkerEvent e(this,etype); WorkerEvent e1(this,etype);
wxGetApp().AddPendingEvent(e); wxGetApp().AddPendingEvent(e1);
int to_process = m_outsize; int to_process = m_outsize;
do { do {
m_clientSocket->Write(m_outbuf,m_outsize); m_clientSocket->Write(m_outbuf,m_outsize);
@@ -692,8 +692,8 @@ wxThread::ExitCode ThreadWorker::Entry()
if (!failed) { if (!failed) {
etype = WorkerEvent::RECEIVING; etype = WorkerEvent::RECEIVING;
WorkerEvent e(this,etype); WorkerEvent e2(this,etype);
wxGetApp().AddPendingEvent(e); wxGetApp().AddPendingEvent(e2);
to_process = m_insize; to_process = m_insize;
do { do {
m_clientSocket->Read(m_inbuf,m_insize); m_clientSocket->Read(m_inbuf,m_insize);

View File

@@ -500,6 +500,8 @@ void ListboxWidgetsPage::CreateLbox()
flags); flags);
break; break;
#endif // wxUSE_REARRANGECTRL #endif // wxUSE_REARRANGECTRL
case LboxType_ListBox:
wxFALLTHROUGH;
default: default:
m_lbox = new wxListBox(this, ListboxPage_Listbox, m_lbox = new wxListBox(this, ListboxPage_Listbox,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,

View File

@@ -465,7 +465,7 @@ wxSVGBitmapFileHandler::ProcessBitmap(const wxBitmap& bmp,
// wxSVGFileDC (specialisations) // wxSVGFileDC (specialisations)
// ---------------------------------------------------------- // ----------------------------------------------------------
wxIMPLEMENT_DYNAMIC_CLASS(wxSVGFileDC, wxDC); wxIMPLEMENT_ABSTRACT_CLASS(wxSVGFileDC, wxDC);
void wxSVGFileDC::SetBitmapHandler(wxSVGBitmapHandler* handler) void wxSVGFileDC::SetBitmapHandler(wxSVGBitmapHandler* handler)
{ {

View File

@@ -270,7 +270,11 @@ private:
wxDebugReport& m_dbgrpt; wxDebugReport& m_dbgrpt;
#if wxUSE_OWNER_DRAWN
wxCheckListBox *m_checklst; wxCheckListBox *m_checklst;
#else
wxListBox *m_checklst;
#endif
wxTextCtrl *m_notes; wxTextCtrl *m_notes;
wxArrayString m_files; wxArrayString m_files;
@@ -342,7 +346,11 @@ wxDebugReportDialog::wxDebugReportDialog(wxDebugReport& dbgrpt)
wxSizerFlags().Border(wxTOP)); wxSizerFlags().Border(wxTOP));
sizerFileBtns->AddStretchSpacer(1); sizerFileBtns->AddStretchSpacer(1);
#if wxUSE_OWNER_DRAWN
m_checklst = new wxCheckListBox(this, wxID_ANY); m_checklst = new wxCheckListBox(this, wxID_ANY);
#else
m_checklst = new wxListBox(this, wxID_ANY);
#endif
wxSizer *sizerFiles = new wxBoxSizer(wxHORIZONTAL); wxSizer *sizerFiles = new wxBoxSizer(wxHORIZONTAL);
sizerFiles->Add(m_checklst, flagsExpand); sizerFiles->Add(m_checklst, flagsExpand);
@@ -390,7 +398,9 @@ bool wxDebugReportDialog::TransferDataToWindow()
if ( m_dbgrpt.GetFile(n, &name, &desc) ) if ( m_dbgrpt.GetFile(n, &name, &desc) )
{ {
m_checklst->Append(name + wxT(" (") + desc + wxT(')')); m_checklst->Append(name + wxT(" (") + desc + wxT(')'));
#if wxUSE_OWNER_DRAWN
m_checklst->Check(n); m_checklst->Check(n);
#endif
m_files.Add(name); m_files.Add(name);
} }
@@ -401,6 +411,7 @@ bool wxDebugReportDialog::TransferDataToWindow()
bool wxDebugReportDialog::TransferDataFromWindow() bool wxDebugReportDialog::TransferDataFromWindow()
{ {
#if wxUSE_OWNER_DRAWN
// any unchecked files should be removed from the report // any unchecked files should be removed from the report
const size_t count = m_checklst->GetCount(); const size_t count = m_checklst->GetCount();
for ( size_t n = 0; n < count; n++ ) for ( size_t n = 0; n < count; n++ )
@@ -410,6 +421,7 @@ bool wxDebugReportDialog::TransferDataFromWindow()
m_dbgrpt.RemoveFile(m_files[n]); m_dbgrpt.RemoveFile(m_files[n]);
} }
} }
#endif
// if the user entered any notes, add them to the report // if the user entered any notes, add them to the report
const wxString notes = m_notes->GetValue(); const wxString notes = m_notes->GetValue();

View File

@@ -741,6 +741,8 @@ bool wxFrame::MSWDoTranslateMessage(wxFrame *frame, WXMSG *pMsg)
wxMenuBar *menuBar = GetMenuBar(); wxMenuBar *menuBar = GetMenuBar();
if ( menuBar && menuBar->GetAcceleratorTable()->Translate(frame, pMsg) ) if ( menuBar && menuBar->GetAcceleratorTable()->Translate(frame, pMsg) )
return true; return true;
#else
wxUnusedVar(frame);
#endif // wxUSE_MENUS && wxUSE_ACCEL #endif // wxUSE_MENUS && wxUSE_ACCEL
return false; return false;

View File

@@ -1233,7 +1233,7 @@ static inline bool WriteAsciiString(wxOutputStream& ostr, const wxString& s)
bool wxRegKey::Export(const wxString& filename) const bool wxRegKey::Export(const wxString& filename) const
{ {
#if wxUSE_FFILE && wxUSE_STREAMS #if wxUSE_FILE && wxUSE_FFILE && wxUSE_STREAMS
if ( wxFile::Exists(filename) ) if ( wxFile::Exists(filename) )
{ {
wxLogError(_("Exporting registry key: file \"%s\" already exists and won't be overwritten."), wxLogError(_("Exporting registry key: file \"%s\" already exists and won't be overwritten."),

View File

@@ -1746,6 +1746,8 @@ void wxWindowMSW::Update()
// drag and drop // drag and drop
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
#if wxUSE_DRAG_AND_DROP
#if wxUSE_STATBOX #if wxUSE_STATBOX
// we need to lower the sibling static boxes so controls contained within can be // we need to lower the sibling static boxes so controls contained within can be
@@ -1777,8 +1779,6 @@ static inline void AdjustStaticBoxZOrder(wxWindow * WXUNUSED(parent))
#endif // wxUSE_STATBOX/!wxUSE_STATBOX #endif // wxUSE_STATBOX/!wxUSE_STATBOX
#if wxUSE_DRAG_AND_DROP
void wxWindowMSW::SetDropTarget(wxDropTarget *pDropTarget) void wxWindowMSW::SetDropTarget(wxDropTarget *pDropTarget)
{ {
if ( m_dropTarget != 0 ) { if ( m_dropTarget != 0 ) {