Merge branch 'master' into web-request

Merge with the latest master in preparation for merging into master.

Rebake to resolve conflicts in generated files.
This commit is contained in:
Vadim Zeitlin
2020-12-12 17:44:45 +01:00
3934 changed files with 147571 additions and 96246 deletions

68
.github/workflows/code_checks.yml vendored Normal file
View File

@@ -0,0 +1,68 @@
# This workflow does some quick checks.
name: Code Checks
on:
push:
branches:
- master
paths:
- '.github/workflows/code_checks.yml'
- 'docs/**'
- 'include/**'
- 'interface/**'
- 'misc/suppressions/**'
- '**/*.md'
- '!docs/changes*txt'
pull_request:
branches:
- master
paths:
- '.github/workflows/code_checks.yml'
- 'docs/**'
- 'include/**'
- 'interface/**'
- 'misc/suppressions/**'
- '**/*.md'
- '!docs/changes*txt'
jobs:
check-unix:
runs-on: ubuntu-20.04
name: Check Spelling
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install codespell
run: |
pip3 install --no-warn-script-location codespell==1.17.1
- name: Run codespell
run: |
CODESPELL=$HOME/.local/bin/codespell ./misc/scripts/spellcheck
check-whitespace:
runs-on: ubuntu-20.04
name: Check Whitespace
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check for trailing whitespace and TABs
run: |
git fetch --depth=1 origin master
git -c core.whitespace=blank-at-eol,blank-at-eof,space-before-tab,cr-at-eol,tab-in-indent \
diff --check origin/master \
':!Makefile.in' \
':!config.guess' \
':!config.sub' \
':!configure' \
':!descrip.mms' \
':!install-sh' \
':!**/*akefile*' \
':!**/*.sln' \
':!**/*.vcproj' \
':!**/*.xpm'

14
.gitignore vendored
View File

@@ -214,13 +214,11 @@
/lib/bcc_lib
/lib/cdef*.res
/lib/dmc_lib
/lib/evc_armv4_lib
/lib/evc_emulator_lib
/lib/expat*.lib
/lib/gcc_dll
/lib/gcc*_dll
/lib/gcc_dll32
/lib/gcc_dll64
/lib/gcc_lib
/lib/gcc*_lib
/lib/gcc_lib32
/lib/gcc_lib64
/lib/jpeg*.lib
@@ -244,10 +242,6 @@
/lib/univdlld
/lib/vc*_dll
/lib/vc*_lib
/lib/vc*_x64_dll
/lib/vc*_x64_lib
/lib/vc*_arm64_dll
/lib/vc*_arm64_lib
/lib/wat_lib
/lib/winmm32_sc.lib
/lib/wsock32_sc.lib
@@ -474,4 +468,6 @@
/utils/hhp2cached/*Carbon?Release*
# /utils/wxrc/
/utils/wxrc/*.sln
/utils/wxrc/wxrc_vc[789].sln
/3rdparty/webview2

View File

@@ -11,6 +11,7 @@ Cătălin Răceanu <maildus@gmail.com>
<maildus@gmail.com> <catalinraceanu2@gmail.com>
Danny Scott <doscott@doscott.ca>
<doscott@doscott.ca> <doscott@gmail.com>
<doscott@doscott.ca> <d.o.scott@unb.ca>
Dimitri Schoolwerth <dimitri.schoolwerth@gmail.com> <dimitri@schoolwerth.com>
Hashir Ahmad <hashirahmadleo@gmail.com>
Frédéric Bron <frederic.bron@m4x.org> <ufospoke@gmail.com>
@@ -27,6 +28,8 @@ Hartwig Wiesmann <git@skywind.eu>
<git@skywind.eu> <hartwig.wiesmann@wanadoo.nl>
Kinaou Hervé <kinaouherve@gmail.com>
Kolya Kosenko <kolya.kosenko@gmail.com> <kosenko@trac.wxwidgets.org>
Konstantin S. Matveyev <kos@eligovision.ru> <konstantin.matveyev@eligovision.ru>
Konstantin S. Matveyev <kos@eligovision.ru> valid-ptr <kos@eligovision.ru>
Lauri Nurmi <lanurmi@iki.fi> <lauri@ksenos.fi>
Lynn C. Rees <lcrees@gmail.com>
Maarten Bent <MaartenBent@users.noreply.github.com>
@@ -38,7 +41,6 @@ Martin Ettl <ettl.martin78@googlemail.com> <orbitcowboy@web.de>
Mathew Maidment <mathew1800@gmail.com>
Micha Ahrweiler <mbaschnitzi@users.noreply.github.com>
ousnius <ousnius@users.noreply.github.com> <denis41@hotmail.de>
Paul Cornett <paulcor@bullseye.com> <paulcor@users.noreply.github.com>
Paul Kulchenko <paul@kulchenko.com> <paulclinger@gmail.com>
Pavel O. <pavelxdd@users.noreply.github.com>
Pavel O. <pavelxdd@users.noreply.github.com> <pavel.otchertsov@gmail.com>
@@ -49,7 +51,9 @@ Prashant Kumar Nirmal <prashantkn94@gmail.com> <ohhereim@gmail.com>
René Kijewski <rene.kijewski@fu-berlin.de> <kijewski@mi.fu-berlin.de>
Richard Fath <richard.fath@t-online.de>
Richard Powell <rmpowell77@me.com>
Rick S <rivdsl@gmail.com> <rivdsl@hotmail.com>
Roberto Boriotti <roberto.boriotti@canon-europe.com>
Steffen Olszewski <steffen.olszewski@gero-mess.de> <sodev@trac.wxwidgets.org>
Steve Browne <swbrowne@gmail.com> <sbrowne@unknown>
<swbrowne@gmail.com> <amn3sia@gmail.com>
Tim Kosse <tim.kosse@gmx.de> <tim.kosse@filezilla-project.org>

View File

@@ -3,45 +3,111 @@
# It is used automatically for the repositories on Github if it's found in the
# root directory of the project.
language: cpp
sudo: required
matrix:
# Specify the default platform.
os: linux
dist: xenial
jobs:
include:
- dist: precise
compiler: gcc
- dist: trusty
compiler: gcc
- dist: trusty
env: wxGTK_VERSION=2 wxUSE_XVFB=1
name: wxGTK 2 Ubuntu 14.04
- dist: xenial
compiler: gcc
env: wxCONFIGURE_FLAGS="--enable-utf8 --enable-utf8only --enable-monolithic"
- dist: trusty
env: wxGTK_VERSION=3
name: wxGTK 3 Ubuntu 16.04
- dist: bionic
compiler: gcc
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11"
- dist: trusty
env: wxGTK_VERSION=2 wxCONFIGURE_FLAGS="--enable-utf8 --enable-utf8only --enable-monolithic" wxUSE_XVFB=1
name: wxGTK 2 UTF-8 Ubuntu 18.04
- dist: bionic
compiler: gcc
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --disable-compat30 --enable-stl" wxMAKEFILE_CXXFLAGS=-std=c++11 wxMAKEFILE_LDFLAGS=-Wl,--no-as-needed wxUSE_XVFB=1
name: wxGTK 3 STL Ubuntu 18.04
- dist: bionic
compiler: clang
env: wxCONFIGURE_FLAGS="--disable-shared --disable-sys-libs --disable-webview"
- dist: trusty
env: wxGTK_VERSION=2 wxCONFIGURE_FLAGS="--disable-shared --disable-sys-libs --disable-webview" wxUSE_XVFB=1
name: wxGTK 2 clang Ubuntu 18.04
- dist: bionic
compiler: gcc
env: wxTOOLSET=cmake wxCMAKE_GENERATOR="Unix Makefiles"
env: wxGTK_VERSION=3 wxTOOLSET=cmake wxCMAKE_GENERATOR="Unix Makefiles"
name: wxGTK 3 CMake Ubuntu 18.04
- dist: focal
compiler: gcc
env: wxGTK_VERSION=2 wxCONFIGURE_FLAGS="--disable-compat30 --disable-unicode" wxSKIP_SAMPLES=1
name: wxGTK ANSI Ubuntu 20.04
- dist: focal
compiler: gcc
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--disable-compat30 --disable-sys-libs" wxSKIP_SAMPLES=1 wxUSE_ASAN=1
name: wxGTK Ubuntu 20.04 with ASAN
- os: osx
osx_image: xcode6.4
osx_image: xcode7.3
compiler: clang
env: wxCONFIGURE_FLAGS="--enable-cxx11" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxSKIP_SAMPLES=1
env: wxSKIP_SAMPLES=1
name: wxOSX Xcode 7.3
- os: osx
osx_image: xcode9.4
compiler: clang
env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_CXX_STANDARD=11"
- dist: trusty
name: wxOSX CMake Xcode 9.4
- os: osx
osx_image: xcode11.3
env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --with-macosx-version-min=10.12 --enable-stl"
name: wxOSX Xcode 11.3
- os: osx
osx_image: xcode11.4
env: wxCONFIGURE_FLAGS="--enable-monolithic --with-cxx=17 --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0 --with-osx_iphone --with-macosx-version-min=10.0 --with-macosx-sdk=$(xcrun --sdk iphonesimulator --show-sdk-path) --enable-stl --disable-sys-libs" wxALLOW_WARNINGS=1 wxSKIP_GUI=1 wxSKIP_TESTING=1 wxSKIP_SAMPLES=1
name: wxOSX iOS Xcode 11.4
- os: osx
osx_image: xcode11.4
env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12" wxCMAKE_SAMPLES=OFF wxCMAKE_TESTS=OFF
name: wxOSX iOS CMake Xcode 11.4
- dist: bionic
compiler: gcc
env: wxCONFIGURE_FLAGS="--with-x11 --enable-pch --disable-stc" wxSKIP_SAMPLES=1
- dist: trusty
name: wxX11 Ubuntu 18.04
- dist: bionic
compiler: gcc
env: wxCONFIGURE_FLAGS="--with-directfb --enable-pch --disable-stc" wxSKIP_SAMPLES=1
- dist: trusty
env: wxCONFIGURE_FLAGS="--with-directfb --enable-pch --disable-stc" wxSKIP_SAMPLES=1 wxALLOW_WARNINGS=1
name: wxDFB Ubuntu 18.04
- dist: bionic
compiler: gcc
env: wxCONFIGURE_FLAGS="--with-motif --enable-pch --disable-stc" wxSKIP_SAMPLES=1
- dist: trusty
name: wxMotif Ubuntu 18.04
- dist: bionic
compiler: gcc
env: wxCONFIGURE_FLAGS="--with-qt --enable-pch" wxSKIP_SAMPLES=1
env: wxCONFIGURE_FLAGS="--with-qt --enable-pch --without-opengl" wxSKIP_SAMPLES=1
name: wxQt Ubuntu 18.04
- os: linux
arch: arm64
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1
name: wxGTK ARM64
- os: linux
arch: ppc64le
env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1
name: wxBase PowerPC64
- os: linux
arch: s390x
env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1
name: wxBase S/390
# The environments running these builds are flaky and often fail for the
# reasons that have nothing to do with the build itself.
allow_failures:
- os: linux
arch: arm64
env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--disable-sys-libs" wxLXC=1
name: wxGTK ARM64
- os: linux
arch: ppc64le
env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1
name: wxBase PowerPC64
- os: linux
arch: s390x
env: wxCONFIGURE_FLAGS="--disable-sys-libs --disable-gui" wxLXC=1 wxSKIP_GUI=1
name: wxBase S/390
branches:
only:
@@ -50,6 +116,7 @@ branches:
notifications:
email:
if: repo = wxWidgets/wxWidgets
recipients:
- vadim@wxwidgets.org
on_success: change
@@ -57,4 +124,4 @@ notifications:
before_install: ./build/tools/before_install.sh
script: bash build/tools/travis-ci.sh
script: ./build/tools/travis-ci.sh

2
3rdparty/catch vendored

View File

@@ -17,14 +17,21 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
endif()
endif()
# https://blog.kitware.com/cmake-and-the-default-build-type/
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(default_build_type "Debug")
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
endif()
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
# If no deployment target has been set default to the minimum supported
# OS X version (this has to be set before the first project() call)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7 CACHE STRING "OS X Deployment Target")
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target")
endif()
project(wxWidgets)
include(build/cmake/policies.cmake NO_POLICY_SCOPE)
# Initialize variables for quick access to wx root dir in sub dirs
@@ -55,7 +62,9 @@ else()
endif()
set(wxVERSION ${wxMAJOR_VERSION}.${wxMINOR_VERSION}.${wxRELEASE_NUMBER})
set(wxCOPYRIGHT "1992-2018 wxWidgets")
set(wxCOPYRIGHT "1992-2020 wxWidgets")
project(wxWidgets VERSION ${wxVERSION})
include(build/cmake/main.cmake)

File diff suppressed because it is too large Load Diff

View File

@@ -5,13 +5,14 @@ Please use `--recurse-submodules` option with the initial `git clone`. If you
had already cloned the repository without this option, please run `git
submodule update --init` to also get all 3rd party libraries code.
Before building from Git sources under Windows, you need to copy the
file `include/wx/msw/setup0.h` to `include/wx/msw/setup.h`. This is
necessary in order to allow having local modifications to the latter
file without showing it as modified, as it is not under version
control.
If you get errors about "wxUSE_XXX must be defined" when building, it
probably means that you need to copy the new options added to the file
`include/wx/msw/setup0.h` to `include/wx/msw/setup.h`. If you had never
modified the latter, it's safe to just delete it, as it will be created
by copying `setup0.h` during the next build.
After doing this, please proceed with the build as with any official
release, i.e. follow the instructions in the port-specific files, e.g.
Otherwise, building from Git checkout is not different from building
from the sources include into the releases, so please follow the usual
instructions in the port-specific files, such as
[wxMSW](docs/msw/install.md), [wxGTK](docs/gtk/install.md),
[wxOSX](docs/osx/install.md) and so on.

View File

@@ -21,20 +21,21 @@ Platforms
[![AppVeyor](https://img.shields.io/appveyor/ci/wxWidgets/wxWidgets/master.svg?label=Windows)](https://ci.appveyor.com/project/wxWidgets/wxwidgets)
[![Travis](https://img.shields.io/travis/wxWidgets/wxWidgets/master.svg?label=Linux)](https://travis-ci.org/wxWidgets/wxWidgets)
[![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/wxwidgets.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:wxwidgets)
This version of wxWidgets supports the following primary platforms:
- Windows XP, Vista, 7, 8 and 10 (32/64 bits).
- Most Unix variants using the GTK+ toolkit (version 2.6 or newer or 3.x).
- OS X (10.7 or newer) using Cocoa (32/64 bits).
- macOS (10.10 or newer) using Cocoa under both amd64 and ARM platforms.
Most popular C++ compilers are supported including but not limited to:
- Microsoft Visual C++ 2003 or later (up to 2017).
- g++ 3.4 or later, including MinGW/MinGW-64/TDM under Windows.
- Clang under OS X and Linux.
- Microsoft Visual C++ 2003 or later (up to 2019).
- g++ 4 or later, including MinGW/MinGW-64/TDM under Windows.
- Clang under macOS and Linux.
- Intel icc compiler.
- Oracle (ex-Sun) aCC.
- Oracle (ex-Sun) CC.
Licence

View File

@@ -184,30 +184,6 @@ dnl ===========================================================================
dnl C++ features test
dnl ===========================================================================
dnl ---------------------------------------------------------------------------
dnl WX_CPP_NEW_HEADERS checks whether the compiler has "new" <iostream> header
dnl or only the old <iostream.h> one - it may be generally assumed that if
dnl <iostream> exists, the other "new" headers (without .h) exist too.
dnl
dnl call WX_CPP_NEW_HEADERS(action-if-true, action-if-false)
dnl ---------------------------------------------------------------------------
AC_DEFUN([WX_CPP_NEW_HEADERS],
[
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS([iostream],,, [ ])
if test "$ac_cv_header_iostream" = "yes" ; then
ifelse([$1], , :, [$1])
else
ifelse([$2], , :, [$2])
fi
AC_LANG_RESTORE
])
dnl ---------------------------------------------------------------------------
dnl WX_CHECK_FUNCS(FUNCTIONS...,
dnl [ACTION-IF-FOUND],

1
aclocal.m4 vendored
View File

@@ -19,6 +19,7 @@ m4_include([build/aclocal/ax_cxx_compile_stdcxx.m4])
m4_include([build/aclocal/ax_func_which_gethostbyname_r.m4])
m4_include([build/aclocal/ax_gcc_option.m4])
m4_include([build/aclocal/ax_gxx_version.m4])
m4_include([build/aclocal/ax_subdirs_configure.m4])
m4_include([build/aclocal/bakefile-lang.m4])
m4_include([build/aclocal/bakefile.m4])
m4_include([build/aclocal/gtk-2.0.m4])

View File

@@ -10,6 +10,12 @@ skip_commits:
- docs/
- interface/
- misc/
- include/wx/osx/
- src/osx/
- .github/workflows/
- .travis.yml
- build/tools/travis-ci.sh
- build/tools/before_install.sh
environment:
matrix:

View File

@@ -1,10 +1,10 @@
dnl ### begin block 00_header[../../demos/bombs/bombs.bkl,../../demos/demos.bkl,../../demos/forty/forty.bkl,../../demos/fractal/fractal.bkl,../../demos/life/life.bkl,../../demos/poem/poem.bkl,../../samples/access/access.bkl,../../samples/animate/anitest.bkl,../../samples/archive/archive.bkl,../../samples/artprov/artprov.bkl,../../samples/aui/auidemo.bkl,../../samples/calendar/calendar.bkl,../../samples/caret/caret.bkl,../../samples/clipboard/clipboard.bkl,../../samples/collpane/collpane.bkl,../../samples/combo/combo.bkl,../../samples/config/config.bkl,../../samples/console/console.bkl,../../samples/dataview/dataview.bkl,../../samples/debugrpt/debugrpt.bkl,../../samples/dialogs/dialogs.bkl,../../samples/dialup/dialup.bkl,../../samples/display/display.bkl,../../samples/dll/dll.bkl,../../samples/dnd/dnd.bkl,../../samples/docview/docview.bkl,../../samples/dragimag/dragimag.bkl,../../samples/drawing/drawing.bkl,../../samples/erase/erase.bkl,../../samples/event/event.bkl,../../samples/except/except.bkl,../../samples/exec/exec.bkl,../../samples/font/font.bkl,../../samples/fswatcher/fswatcher.bkl,../../samples/grid/grid.bkl,../../samples/help/help.bkl,../../samples/htlbox/htlbox.bkl,../../samples/html/about/about.bkl,../../samples/html/help/help.bkl,../../samples/html/helpview/helpview.bkl,../../samples/html/html_samples.bkl,../../samples/html/htmlctrl/htmlctrl.bkl,../../samples/html/printing/printing.bkl,../../samples/html/test/test.bkl,../../samples/html/virtual/virtual.bkl,../../samples/html/widget/widget.bkl,../../samples/html/zip/zip.bkl,../../samples/image/image.bkl,../../samples/internat/internat.bkl,../../samples/ipc/ipc.bkl,../../samples/joytest/joytest.bkl,../../samples/keyboard/keyboard.bkl,../../samples/layout/layout.bkl,../../samples/listctrl/listctrl.bkl,../../samples/mdi/mdi.bkl,../../samples/mediaplayer/mediaplayer.bkl,../../samples/memcheck/memcheck.bkl,../../samples/menu/menu.bkl,../../samples/minimal/minimal.bkl,../../samples/nativdlg/nativdlg.bkl,../../samples/notebook/notebook.bkl,../../samples/oleauto/oleauto.bkl,../../samples/opengl/cube/cube.bkl,../../samples/opengl/isosurf/isosurf.bkl,../../samples/opengl/opengl_samples.bkl,../../samples/opengl/penguin/penguin.bkl,../../samples/opengl/pyramid/pyramid.bkl,../../samples/ownerdrw/ownerdrw.bkl,../../samples/popup/popup.bkl,../../samples/power/power.bkl,../../samples/preferences/preferences.bkl,../../samples/printing/printing.bkl,../../samples/propgrid/propgrid.bkl,../../samples/regtest/regtest.bkl,../../samples/render/render.bkl,../../samples/ribbon/ribbon.bkl,../../samples/richtext/richtext.bkl,../../samples/sashtest/sashtest.bkl,../../samples/scroll/scroll.bkl,../../samples/secretstore/secretstore.bkl,../../samples/shaped/shaped.bkl,../../samples/sockets/sockets.bkl,../../samples/sound/sound.bkl,../../samples/splash/splash.bkl,../../samples/splitter/splitter.bkl,../../samples/statbar/statbar.bkl,../../samples/stc/stctest.bkl,../../samples/svg/svgtest.bkl,../../samples/taborder/taborder.bkl,../../samples/taskbar/taskbar.bkl,../../samples/taskbarbutton/taskbarbutton.bkl,../../samples/text/text.bkl,../../samples/thread/thread.bkl,../../samples/toolbar/toolbar.bkl,../../samples/treectrl/treectrl.bkl,../../samples/treelist/treelist.bkl,../../samples/typetest/typetest.bkl,../../samples/uiaction/uiaction.bkl,../../samples/validate/validate.bkl,../../samples/vscroll/vscroll.bkl,../../samples/webrequest/webrequest.bkl,../../samples/webview/webview.bkl,../../samples/widgets/widgets.bkl,../../samples/wizard/wizard.bkl,../../samples/wrapsizer/wrapsizer.bkl,../../samples/xrc/xrcdemo.bkl,../../samples/xti/xti.bkl,../../tests/benchmarks/bench.bkl,../../tests/test.bkl,../../utils/emulator/src/emulator.bkl,../../utils/execmon/execmon.bkl,../../utils/helpview/src/helpview.bkl,../../utils/hhp2cached/hhp2cached.bkl,../../utils/ifacecheck/src/ifacecheck.bkl,../../utils/screenshotgen/src/screenshotgen.bkl,../../utils/utils.bkl,../../utils/wxrc/wxrc.bkl,wx.bkl] ###
dnl
dnl This macro was generated by
dnl Bakefile 0.2.11 (http://www.bakefile.org)
dnl Bakefile 0.2.12 (http://www.bakefile.org)
dnl Do not modify, all changes will be overwritten!
BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.11"
BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.12"
dnl ### begin block 10_AC_BAKEFILE_PRECOMP_HEADERS[../../tests/test.bkl,wx.bkl] ###
AC_BAKEFILE_PRECOMP_HEADERS
@@ -278,7 +278,7 @@ dnl ### begin block 20_COND_MONOLITHIC_0_USE_RICHTEXT_1[wx.bkl] ###
COND_MONOLITHIC_0_USE_RICHTEXT_1=""
fi
AC_SUBST(COND_MONOLITHIC_0_USE_RICHTEXT_1)
dnl ### begin block 20_COND_MONOLITHIC_0_USE_STC_1[wx.bkl] ###
dnl ### begin block 20_COND_MONOLITHIC_0_USE_STC_1[../../demos/bombs/bombs.bkl,../../demos/forty/forty.bkl,../../demos/fractal/fractal.bkl,../../demos/life/life.bkl,../../demos/poem/poem.bkl,../../samples/access/access.bkl,../../samples/animate/anitest.bkl,../../samples/archive/archive.bkl,../../samples/artprov/artprov.bkl,../../samples/aui/auidemo.bkl,../../samples/calendar/calendar.bkl,../../samples/caret/caret.bkl,../../samples/clipboard/clipboard.bkl,../../samples/collpane/collpane.bkl,../../samples/combo/combo.bkl,../../samples/config/config.bkl,../../samples/console/console.bkl,../../samples/dataview/dataview.bkl,../../samples/debugrpt/debugrpt.bkl,../../samples/dialogs/dialogs.bkl,../../samples/dialup/dialup.bkl,../../samples/display/display.bkl,../../samples/dll/dll.bkl,../../samples/dnd/dnd.bkl,../../samples/docview/docview.bkl,../../samples/dragimag/dragimag.bkl,../../samples/drawing/drawing.bkl,../../samples/erase/erase.bkl,../../samples/event/event.bkl,../../samples/except/except.bkl,../../samples/exec/exec.bkl,../../samples/font/font.bkl,../../samples/fswatcher/fswatcher.bkl,../../samples/grid/grid.bkl,../../samples/help/help.bkl,../../samples/htlbox/htlbox.bkl,../../samples/html/about/about.bkl,../../samples/html/help/help.bkl,../../samples/html/helpview/helpview.bkl,../../samples/html/htmlctrl/htmlctrl.bkl,../../samples/html/printing/printing.bkl,../../samples/html/test/test.bkl,../../samples/html/virtual/virtual.bkl,../../samples/html/widget/widget.bkl,../../samples/html/zip/zip.bkl,../../samples/image/image.bkl,../../samples/internat/internat.bkl,../../samples/ipc/ipc.bkl,../../samples/joytest/joytest.bkl,../../samples/keyboard/keyboard.bkl,../../samples/layout/layout.bkl,../../samples/listctrl/listctrl.bkl,../../samples/mdi/mdi.bkl,../../samples/mediaplayer/mediaplayer.bkl,../../samples/memcheck/memcheck.bkl,../../samples/menu/menu.bkl,../../samples/minimal/minimal.bkl,../../samples/nativdlg/nativdlg.bkl,../../samples/notebook/notebook.bkl,../../samples/oleauto/oleauto.bkl,../../samples/opengl/cube/cube.bkl,../../samples/opengl/isosurf/isosurf.bkl,../../samples/opengl/penguin/penguin.bkl,../../samples/opengl/pyramid/pyramid.bkl,../../samples/ownerdrw/ownerdrw.bkl,../../samples/popup/popup.bkl,../../samples/power/power.bkl,../../samples/preferences/preferences.bkl,../../samples/printing/printing.bkl,../../samples/propgrid/propgrid.bkl,../../samples/regtest/regtest.bkl,../../samples/render/render.bkl,../../samples/ribbon/ribbon.bkl,../../samples/richtext/richtext.bkl,../../samples/sashtest/sashtest.bkl,../../samples/scroll/scroll.bkl,../../samples/secretstore/secretstore.bkl,../../samples/shaped/shaped.bkl,../../samples/sockets/sockets.bkl,../../samples/sound/sound.bkl,../../samples/splash/splash.bkl,../../samples/splitter/splitter.bkl,../../samples/statbar/statbar.bkl,../../samples/stc/stctest.bkl,../../samples/svg/svgtest.bkl,../../samples/taborder/taborder.bkl,../../samples/taskbar/taskbar.bkl,../../samples/taskbarbutton/taskbarbutton.bkl,../../samples/text/text.bkl,../../samples/thread/thread.bkl,../../samples/toolbar/toolbar.bkl,../../samples/treectrl/treectrl.bkl,../../samples/treelist/treelist.bkl,../../samples/typetest/typetest.bkl,../../samples/uiaction/uiaction.bkl,../../samples/validate/validate.bkl,../../samples/vscroll/vscroll.bkl,../../samples/webrequest/webrequest.bkl,../../samples/webview/webview.bkl,../../samples/widgets/widgets.bkl,../../samples/wizard/wizard.bkl,../../samples/wrapsizer/wrapsizer.bkl,../../samples/xrc/xrcdemo.bkl,../../samples/xti/xti.bkl,../../tests/benchmarks/bench.bkl,../../tests/test.bkl,../../utils/emulator/src/emulator.bkl,../../utils/execmon/execmon.bkl,../../utils/helpview/src/helpview.bkl,../../utils/hhp2cached/hhp2cached.bkl,../../utils/ifacecheck/src/ifacecheck.bkl,../../utils/screenshotgen/src/screenshotgen.bkl,../../utils/wxrc/wxrc.bkl,wx.bkl] ###
COND_MONOLITHIC_0_USE_STC_1="#"
if test "x$MONOLITHIC" = "x0" -a "x$USE_STC" = "x1" ; then
COND_MONOLITHIC_0_USE_STC_1=""
@@ -656,12 +656,6 @@ dnl ### begin block 20_COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0[wx.
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0=""
fi
AC_SUBST(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_0)
dnl ### begin block 20_COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_1[wx.bkl] ###
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_1="#"
if test "x$TOOLKIT" = "xGTK" -a "x$TOOLKIT_VERSION" = "x2" -a "x$USE_GUI" = "x1" -a "x$WXUNIV" = "x1" ; then
COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_1=""
fi
AC_SUBST(COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1_WXUNIV_1)
dnl ### begin block 20_COND_TOOLKIT_GTK_TOOLKIT_VERSION_3[wx.bkl] ###
COND_TOOLKIT_GTK_TOOLKIT_VERSION_3="#"
if test "x$TOOLKIT" = "xGTK" -a "x$TOOLKIT_VERSION" = "x3" ; then
@@ -830,12 +824,6 @@ dnl ### begin block 20_COND_TOOLKIT_X11_USE_GUI_1[wx.bkl] ###
COND_TOOLKIT_X11_USE_GUI_1=""
fi
AC_SUBST(COND_TOOLKIT_X11_USE_GUI_1)
dnl ### begin block 20_COND_TOOLKIT_X11_USE_GUI_1_WXUNIV_1[wx.bkl] ###
COND_TOOLKIT_X11_USE_GUI_1_WXUNIV_1="#"
if test "x$TOOLKIT" = "xX11" -a "x$USE_GUI" = "x1" -a "x$WXUNIV" = "x1" ; then
COND_TOOLKIT_X11_USE_GUI_1_WXUNIV_1=""
fi
AC_SUBST(COND_TOOLKIT_X11_USE_GUI_1_WXUNIV_1)
dnl ### begin block 20_COND_UNICODE_1[../../demos/bombs/bombs.bkl,../../demos/forty/forty.bkl,../../demos/fractal/fractal.bkl,../../demos/life/life.bkl,../../demos/poem/poem.bkl,../../samples/access/access.bkl,../../samples/animate/anitest.bkl,../../samples/archive/archive.bkl,../../samples/artprov/artprov.bkl,../../samples/aui/auidemo.bkl,../../samples/calendar/calendar.bkl,../../samples/caret/caret.bkl,../../samples/clipboard/clipboard.bkl,../../samples/collpane/collpane.bkl,../../samples/combo/combo.bkl,../../samples/config/config.bkl,../../samples/console/console.bkl,../../samples/dataview/dataview.bkl,../../samples/debugrpt/debugrpt.bkl,../../samples/dialogs/dialogs.bkl,../../samples/dialup/dialup.bkl,../../samples/display/display.bkl,../../samples/dll/dll.bkl,../../samples/dnd/dnd.bkl,../../samples/docview/docview.bkl,../../samples/dragimag/dragimag.bkl,../../samples/drawing/drawing.bkl,../../samples/erase/erase.bkl,../../samples/event/event.bkl,../../samples/except/except.bkl,../../samples/exec/exec.bkl,../../samples/font/font.bkl,../../samples/fswatcher/fswatcher.bkl,../../samples/grid/grid.bkl,../../samples/help/help.bkl,../../samples/htlbox/htlbox.bkl,../../samples/html/about/about.bkl,../../samples/html/help/help.bkl,../../samples/html/helpview/helpview.bkl,../../samples/html/htmlctrl/htmlctrl.bkl,../../samples/html/printing/printing.bkl,../../samples/html/test/test.bkl,../../samples/html/virtual/virtual.bkl,../../samples/html/widget/widget.bkl,../../samples/html/zip/zip.bkl,../../samples/image/image.bkl,../../samples/internat/internat.bkl,../../samples/ipc/ipc.bkl,../../samples/joytest/joytest.bkl,../../samples/keyboard/keyboard.bkl,../../samples/layout/layout.bkl,../../samples/listctrl/listctrl.bkl,../../samples/mdi/mdi.bkl,../../samples/mediaplayer/mediaplayer.bkl,../../samples/memcheck/memcheck.bkl,../../samples/menu/menu.bkl,../../samples/minimal/minimal.bkl,../../samples/nativdlg/nativdlg.bkl,../../samples/notebook/notebook.bkl,../../samples/oleauto/oleauto.bkl,../../samples/opengl/cube/cube.bkl,../../samples/opengl/isosurf/isosurf.bkl,../../samples/opengl/penguin/penguin.bkl,../../samples/opengl/pyramid/pyramid.bkl,../../samples/ownerdrw/ownerdrw.bkl,../../samples/popup/popup.bkl,../../samples/power/power.bkl,../../samples/preferences/preferences.bkl,../../samples/printing/printing.bkl,../../samples/propgrid/propgrid.bkl,../../samples/regtest/regtest.bkl,../../samples/render/render.bkl,../../samples/ribbon/ribbon.bkl,../../samples/richtext/richtext.bkl,../../samples/sashtest/sashtest.bkl,../../samples/scroll/scroll.bkl,../../samples/secretstore/secretstore.bkl,../../samples/shaped/shaped.bkl,../../samples/sockets/sockets.bkl,../../samples/sound/sound.bkl,../../samples/splash/splash.bkl,../../samples/splitter/splitter.bkl,../../samples/statbar/statbar.bkl,../../samples/stc/stctest.bkl,../../samples/svg/svgtest.bkl,../../samples/taborder/taborder.bkl,../../samples/taskbar/taskbar.bkl,../../samples/taskbarbutton/taskbarbutton.bkl,../../samples/text/text.bkl,../../samples/thread/thread.bkl,../../samples/toolbar/toolbar.bkl,../../samples/treectrl/treectrl.bkl,../../samples/treelist/treelist.bkl,../../samples/typetest/typetest.bkl,../../samples/uiaction/uiaction.bkl,../../samples/validate/validate.bkl,../../samples/vscroll/vscroll.bkl,../../samples/webrequest/webrequest.bkl,../../samples/webview/webview.bkl,../../samples/widgets/widgets.bkl,../../samples/wizard/wizard.bkl,../../samples/wrapsizer/wrapsizer.bkl,../../samples/xrc/xrcdemo.bkl,../../samples/xti/xti.bkl,../../tests/benchmarks/bench.bkl,../../tests/test.bkl,../../utils/emulator/src/emulator.bkl,../../utils/execmon/execmon.bkl,../../utils/helpview/src/helpview.bkl,../../utils/hhp2cached/hhp2cached.bkl,../../utils/ifacecheck/src/ifacecheck.bkl,../../utils/screenshotgen/src/screenshotgen.bkl,../../utils/wxrc/wxrc.bkl,wx.bkl] ###
COND_UNICODE_1="#"
if test "x$UNICODE" = "x1" ; then
@@ -992,7 +980,7 @@ dnl ### begin block 20_COND_USE_THREADS_1[../../demos/bombs/bombs.bkl,../../demo
COND_USE_THREADS_1=""
fi
AC_SUBST(COND_USE_THREADS_1)
dnl ### begin block 20_COND_USE_WEBVIEW_WEBKIT2_1[../../demos/bombs/bombs.bkl,../../demos/forty/forty.bkl,../../demos/fractal/fractal.bkl,../../demos/life/life.bkl,../../demos/poem/poem.bkl,../../samples/access/access.bkl,../../samples/animate/anitest.bkl,../../samples/archive/archive.bkl,../../samples/artprov/artprov.bkl,../../samples/aui/auidemo.bkl,../../samples/calendar/calendar.bkl,../../samples/caret/caret.bkl,../../samples/clipboard/clipboard.bkl,../../samples/collpane/collpane.bkl,../../samples/combo/combo.bkl,../../samples/config/config.bkl,../../samples/console/console.bkl,../../samples/dataview/dataview.bkl,../../samples/debugrpt/debugrpt.bkl,../../samples/dialogs/dialogs.bkl,../../samples/dialup/dialup.bkl,../../samples/display/display.bkl,../../samples/dll/dll.bkl,../../samples/dnd/dnd.bkl,../../samples/docview/docview.bkl,../../samples/dragimag/dragimag.bkl,../../samples/drawing/drawing.bkl,../../samples/erase/erase.bkl,../../samples/event/event.bkl,../../samples/except/except.bkl,../../samples/exec/exec.bkl,../../samples/font/font.bkl,../../samples/fswatcher/fswatcher.bkl,../../samples/grid/grid.bkl,../../samples/help/help.bkl,../../samples/htlbox/htlbox.bkl,../../samples/html/about/about.bkl,../../samples/html/help/help.bkl,../../samples/html/helpview/helpview.bkl,../../samples/html/htmlctrl/htmlctrl.bkl,../../samples/html/printing/printing.bkl,../../samples/html/test/test.bkl,../../samples/html/virtual/virtual.bkl,../../samples/html/widget/widget.bkl,../../samples/html/zip/zip.bkl,../../samples/image/image.bkl,../../samples/internat/internat.bkl,../../samples/ipc/ipc.bkl,../../samples/joytest/joytest.bkl,../../samples/keyboard/keyboard.bkl,../../samples/layout/layout.bkl,../../samples/listctrl/listctrl.bkl,../../samples/mdi/mdi.bkl,../../samples/mediaplayer/mediaplayer.bkl,../../samples/memcheck/memcheck.bkl,../../samples/menu/menu.bkl,../../samples/minimal/minimal.bkl,../../samples/nativdlg/nativdlg.bkl,../../samples/notebook/notebook.bkl,../../samples/oleauto/oleauto.bkl,../../samples/opengl/cube/cube.bkl,../../samples/opengl/isosurf/isosurf.bkl,../../samples/opengl/penguin/penguin.bkl,../../samples/opengl/pyramid/pyramid.bkl,../../samples/ownerdrw/ownerdrw.bkl,../../samples/popup/popup.bkl,../../samples/power/power.bkl,../../samples/preferences/preferences.bkl,../../samples/printing/printing.bkl,../../samples/propgrid/propgrid.bkl,../../samples/regtest/regtest.bkl,../../samples/render/render.bkl,../../samples/ribbon/ribbon.bkl,../../samples/richtext/richtext.bkl,../../samples/sashtest/sashtest.bkl,../../samples/scroll/scroll.bkl,../../samples/secretstore/secretstore.bkl,../../samples/shaped/shaped.bkl,../../samples/sockets/sockets.bkl,../../samples/sound/sound.bkl,../../samples/splash/splash.bkl,../../samples/splitter/splitter.bkl,../../samples/statbar/statbar.bkl,../../samples/stc/stctest.bkl,../../samples/svg/svgtest.bkl,../../samples/taborder/taborder.bkl,../../samples/taskbar/taskbar.bkl,../../samples/taskbarbutton/taskbarbutton.bkl,../../samples/text/text.bkl,../../samples/thread/thread.bkl,../../samples/toolbar/toolbar.bkl,../../samples/treectrl/treectrl.bkl,../../samples/treelist/treelist.bkl,../../samples/typetest/typetest.bkl,../../samples/uiaction/uiaction.bkl,../../samples/validate/validate.bkl,../../samples/vscroll/vscroll.bkl,../../samples/webrequest/webrequest.bkl,../../samples/webview/webview.bkl,../../samples/widgets/widgets.bkl,../../samples/wizard/wizard.bkl,../../samples/wrapsizer/wrapsizer.bkl,../../samples/xrc/xrcdemo.bkl,../../samples/xti/xti.bkl,../../tests/benchmarks/bench.bkl,../../tests/test.bkl,../../utils/emulator/src/emulator.bkl,../../utils/execmon/execmon.bkl,../../utils/helpview/src/helpview.bkl,../../utils/hhp2cached/hhp2cached.bkl,../../utils/ifacecheck/src/ifacecheck.bkl,../../utils/screenshotgen/src/screenshotgen.bkl,../../utils/wxrc/wxrc.bkl,wx.bkl] ###
dnl ### begin block 20_COND_USE_WEBVIEW_WEBKIT2_1[wx.bkl] ###
COND_USE_WEBVIEW_WEBKIT2_1="#"
if test "x$USE_WEBVIEW_WEBKIT2" = "x1" ; then
COND_USE_WEBVIEW_WEBKIT2_1=""

View File

@@ -33,19 +33,19 @@
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 7
#serial 11
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).
AX_REQUIRE_DEFINED([AC_MSG_WARN])
AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"],
[$1], [14], [ax_cxx_compile_alternatives="14 1y"],
@@ -61,14 +61,6 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
[m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
ax_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])],
[ax_cv_cxx_compile_cxx$1=yes],
[ax_cv_cxx_compile_cxx$1=no])])
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then
ac_success=yes
fi
m4_if([$2], [noext], [], [dnl
if test x$ac_success = xno; then
@@ -139,7 +131,6 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
m4_if([$1], [17], [AC_MSG_WARN([C++17 is not yet standardized, so the checks may change in incompatible ways anytime])])
])
@@ -199,11 +190,13 @@ namespace cxx11
struct Base
{
virtual ~Base() {}
virtual void f() {}
};
struct Derived : public Base
{
virtual ~Derived() override {}
virtual void f() override {}
};
@@ -587,20 +580,12 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
#error "This is not a C++ compiler"
#elif __cplusplus <= 201402L
#elif __cplusplus < 201703L
#error "This is not a C++17 compiler"
#else
#if defined(__clang__)
#define REALLY_CLANG
#else
#if defined(__GNUC__)
#define REALLY_GCC
#endif
#endif
#include <initializer_list>
#include <utility>
#include <type_traits>
@@ -608,16 +593,12 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
namespace cxx17
{
#if !defined(REALLY_CLANG)
namespace test_constexpr_lambdas
{
// TODO: test it with clang++ from git
constexpr int foo = [](){return 42;}();
}
#endif // !defined(REALLY_CLANG)
namespace test::nested_namespace::definitions
{
@@ -852,12 +833,9 @@ namespace cxx17
}
#if !defined(REALLY_CLANG)
namespace test_template_argument_deduction_for_class_templates
{
// TODO: test it with clang++ from git
template <typename T1, typename T2>
struct pair
{
@@ -876,7 +854,6 @@ namespace cxx17
}
}
#endif // !defined(REALLY_CLANG)
namespace test_non_type_auto_template_parameters
{
@@ -890,12 +867,9 @@ namespace cxx17
}
#if !defined(REALLY_CLANG)
namespace test_structured_bindings
{
// TODO: test it with clang++ from git
int arr[2] = { 1, 2 };
std::pair<int, int> pr = { 1, 2 };
@@ -927,14 +901,10 @@ namespace cxx17
const auto [ x3, y3 ] = f3();
}
#endif // !defined(REALLY_CLANG)
#if !defined(REALLY_CLANG)
namespace test_exception_spec_type_system
{
// TODO: test it with clang++ from git
struct Good {};
struct Bad {};
@@ -952,7 +922,6 @@ namespace cxx17
static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
}
#endif // !defined(REALLY_CLANG)
namespace test_inline_variables
{
@@ -977,6 +946,6 @@ namespace cxx17
} // namespace cxx17
#endif // __cplusplus <= 201402L
#endif // __cplusplus < 201703L
]])

View File

@@ -1,35 +1,74 @@
dnl @synopsis AX_FUNC_WHICH_GETHOSTBYNAME_R
dnl
dnl Determines which historical variant of the gethostbyname_r() call
dnl (taking three, five, or six arguments) is available on the system
dnl and defines one of the following macros accordingly:
dnl
dnl HAVE_FUNC_GETHOSTBYNAME_R_6
dnl HAVE_FUNC_GETHOSTBYNAME_R_5
dnl HAVE_FUNC_GETHOSTBYNAME_R_3
dnl
dnl If used in conjunction with gethostname.c, the API demonstrated in
dnl test.c can be used regardless of which gethostbyname_r() is
dnl available. These example files can be found at
dnl http://www.csn.ul.ie/~caolan/publink/gethostbyname_r
dnl
dnl based on David Arnold's autoconf suggestion in the threads faq
dnl
dnl Originally named "AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R". Rewritten
dnl for Autoconf 2.5x by Daniel Richard G.
dnl
dnl @category InstalledPackages
dnl @author Caolan McNamara <caolan@skynet.ie>
dnl @author Daniel Richard G. <skunk@iskunk.org>
dnl @version 2005-01-21
dnl @license GPLWithACException
# ==================================================================================
# https://www.gnu.org/software/autoconf-archive/ax_func_which_gethostbyname_r.html
# ==================================================================================
#
# SYNOPSIS
#
# AX_FUNC_WHICH_GETHOSTBYNAME_R
#
# DESCRIPTION
#
# Determines which historical variant of the gethostbyname_r() call
# (taking three, five, or six arguments) is available on the system and
# defines one of the following macros accordingly:
#
# HAVE_FUNC_GETHOSTBYNAME_R_6
# HAVE_FUNC_GETHOSTBYNAME_R_5
# HAVE_FUNC_GETHOSTBYNAME_R_3
#
# as well as
#
# HAVE_GETHOSTBYNAME_R
#
# If used in conjunction with gethostname.c, the API demonstrated in
# test.c can be used regardless of which gethostbyname_r() is available.
# These example files can be found at
# http://www.csn.ul.ie/~caolan/publink/gethostbyname_r
#
# based on David Arnold's autoconf suggestion in the threads faq
#
# Originally named "AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R". Rewritten for
# Autoconf 2.5x, and updated for 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Caolan McNamara <caolan@skynet.ie>
# Copyright (c) 2008 Daniel Richard G. <skunk@iskunk.org>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 8
AC_DEFUN([AX_FUNC_WHICH_GETHOSTBYNAME_R], [
AC_LANG_PUSH(C)
AC_LANG_PUSH([C])
AC_MSG_CHECKING([how many arguments gethostbyname_r() takes])
AC_CACHE_VAL(ac_cv_func_which_gethostbyname_r, [
AC_CACHE_VAL([ac_cv_func_which_gethostbyname_r], [
################################################################
@@ -44,16 +83,12 @@ ac_cv_func_which_gethostbyname_r=unknown
# netdb.h is not declaring the function, and the compiler is thereby
# assuming an implicit prototype. In which case, we're out of luck.
#
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <netdb.h>]],
[[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
[
char *name = "www.gnu.org";
(void)gethostbyname_r(name) /* ; */
]]
)],
ac_cv_func_which_gethostbyname_r=no
)
])],
[ac_cv_func_which_gethostbyname_r=no])
#
# SIX ARGUMENTS
@@ -62,20 +97,16 @@ AC_COMPILE_IFELSE(
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <netdb.h>]],
[[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
[
char *name = "www.gnu.org";
struct hostent ret, *retp;
char buf@<:@1024@:>@;
int buflen = 1024;
int my_h_errno;
(void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
]]
)],
ac_cv_func_which_gethostbyname_r=six
)
])],
[ac_cv_func_which_gethostbyname_r=six])
fi
@@ -86,20 +117,16 @@ fi
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <netdb.h>]],
[[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
[
char *name = "www.gnu.org";
struct hostent ret;
char buf@<:@1024@:>@;
int buflen = 1024;
int my_h_errno;
(void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
]]
)],
ac_cv_func_which_gethostbyname_r=five
)
])],
[ac_cv_func_which_gethostbyname_r=five])
fi
@@ -110,18 +137,14 @@ fi
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <netdb.h>]],
[[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
[
char *name = "www.gnu.org";
struct hostent ret;
struct hostent_data data;
(void)gethostbyname_r(name, &ret, &data) /* ; */
]]
)],
ac_cv_func_which_gethostbyname_r=three
)
])],
[ac_cv_func_which_gethostbyname_r=three])
fi
@@ -129,20 +152,30 @@ fi
]) dnl end AC_CACHE_VAL
case "$ac_cv_func_which_gethostbyname_r" in
three|five|six)
AC_DEFINE([HAVE_GETHOSTBYNAME_R], [1],
[Define to 1 if you have some form of gethostbyname_r().])
;;
esac
case "$ac_cv_func_which_gethostbyname_r" in
three)
AC_MSG_RESULT([three])
AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_3)
AC_DEFINE([HAVE_FUNC_GETHOSTBYNAME_R_3], [1],
[Define to 1 if you have the three-argument form of gethostbyname_r().])
;;
five)
AC_MSG_RESULT([five])
AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_5)
AC_DEFINE([HAVE_FUNC_GETHOSTBYNAME_R_5], [1],
[Define to 1 if you have the five-argument form of gethostbyname_r().])
;;
six)
AC_MSG_RESULT([six])
AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_6)
AC_DEFINE([HAVE_FUNC_GETHOSTBYNAME_R_6], [1],
[Define to 1 if you have the six-argument form of gethostbyname_r().])
;;
no)
@@ -158,6 +191,6 @@ case "$ac_cv_func_which_gethostbyname_r" in
;;
esac
AC_LANG_POP(C)
AC_LANG_POP
]) dnl end AC_DEFUN

View File

@@ -0,0 +1,337 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_subdirs_configure.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_SUBDIRS_CONFIGURE( [subdirs], [mandatory arguments], [possibly merged arguments], [replacement arguments], [forbidden arguments])
#
# DESCRIPTION
#
# AX_SUBDIRS_CONFIGURE attempts to be the equivalent of AC_CONFIG_SUBDIRS
# with customizable options for configure scripts.
#
# Run the configure script for each directory from the comma-separated m4
# list 'subdirs'. This macro can be used multiple times. All arguments of
# this macro must be comma-separated lists.
#
# All command line arguments from the parent configure script will be
# given to the subdirectory configure script after the following
# modifications (in that order):
#
# 1. The arguments from the 'mandatory arguments' list shall always be
# appended to the argument list.
#
# 2. The arguments from the 'possibly merged arguments' list shall be
# added if not present in the arguments of the parent configure script or
# merged with the existing argument otherwise.
#
# 3. The arguments from the 'replacement arguments' list shall be added if
# not present in the arguments of the parent configure script or replace
# the existing argument otherwise.
#
# 4. The arguments from the 'forbidden arguments' list shall always be
# removed from the argument list.
#
# The lists 'mandatory arguments' and 'forbidden arguments' can hold any
# kind of argument. The 'possibly merged arguments' and 'replacement
# arguments' expect their arguments to be of the form --option-name=value.
#
# This macro aims to remain as close as possible to the AC_CONFIG_SUBDIRS
# macro. It corrects the paths for '--cache-file' and '--srcdir' and adds
# '--disable-option-checking' and '--silent' if necessary.
#
# This macro also sets the output variable subdirs_extra to the list of
# directories recorded with AX_SUBDIRS_CONFIGURE. This variable can be
# used in Makefile rules or substituted in configured files.
#
# This macro shall do nothing more than managing the arguments of the
# configure script. Just like when using AC_CONFIG_SUBDIRS, it is up to
# the user to check any requirements or define and substitute any required
# variable for the remainder of the project.
#
# Configure scripts recorded with AX_SUBDIRS_CONFIGURE may be executed
# before configure scripts recorded with AC_CONFIG_SUBDIRS.
#
# Without additional arguments, the behaviour of AX_SUBDIRS_CONFIGURE
# should be identical to the behaviour of AC_CONFIG_SUBDIRS, apart from
# the contents of the variables subdirs and subdirs_extra (except that
# AX_SUBDIRS_CONFIGURE expects a comma-separated m4 list):
#
# AC_CONFIG_SUBDIRS([something])
# AX_SUBDIRS_CONFIGURE([something])
#
# This macro may be called multiple times.
#
# Usage example:
#
# Let us assume our project has 4 dependencies, namely A, B, C and D. Here
# are some characteristics of our project and its dependencies:
#
# - A does not require any special option.
#
# - we want to build B with an optional feature which can be enabled with
# its configure script's option '--enable-special-feature'.
#
# - B's configure script is strange and has an option '--with-B=build'.
# After close inspection of its documentation, we don't want B to receive
# this option.
#
# - C and D both need B.
#
# - Just like our project, C and D can build B themselves with the option
# '--with-B=build'.
#
# - We want C and D to use the B we build instead of building it
# themselves.
#
# Our top-level configure script will be called as follows:
#
# $ <path/to/configure> --with-A=build --with-B=build --with-C=build \
# --with-D=build --some-option
#
# Thus we have to make sure that:
#
# - neither B, C or D receive the option '--with-B=build'
#
# - C and D know where to find the headers and libraries of B.
#
# Under those conditions, we can use the AC_CONFIG_SUBDIRS macro for A,
# but need to use AX_SUBDIRS_CONFIGURE for B, C and D:
#
# - B must receive '--enable-special-feature' but cannot receive
# '--with-B=build'
#
# - C and D cannot receive '--with-B=build' (or else it would be built
# thrice) and need to be told where to find B (since we are building it,
# it would probably not be available in standard paths).
#
# Here is a configure.ac snippet that solves our problem:
#
# AC_CONFIG_SUBDIRS([dependencies/A])
# AX_SUBDIRS_CONFIGURE(
# [dependencies/B], [--enable-special-feature], [], [],
# [--with-B=build])
# AX_SUBDIRS_CONFIGURE(
# [[dependencies/C],[dependencies/D]],
# [],
# [[CPPFLAGS=-I${ac_top_srcdir}/dependencies/B -I${ac_top_builddir}/dependencies/B],
# [LDFLAGS=-L${ac_abs_top_builddir}/dependencies/B/.libs]],
# [--with-B=system],
# [])
#
# If using automake, the following can be added to the Makefile.am (we use
# both $(subdirs) and $(subdirs_extra) since our example above used both
# AC_CONFIG_SUBDIRS and AX_SUBDIRS_CONFIGURE):
#
# SUBDIRS = $(subdirs) $(subdirs_extra)
#
# LICENSE
#
# Copyright (c) 2017 Harenome Ranaivoarivony-Razanajato <ranaivoarivony-razanajato@hareno.me>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# Under Section 7 of GPL version 3, you are granted additional permissions
# described in the Autoconf Configure Script Exception, version 3.0, as
# published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#serial 5
AC_DEFUN([AX_SUBDIRS_CONFIGURE],
[
dnl Calls to AC_CONFIG_SUBDIRS perform preliminary steps and build a list
dnl '$subdirs' which is used later by _AC_OUTPUT_SUBDIRS (used by AC_OUTPUT)
dnl to actually run the configure scripts.
dnl This macro performs similar preliminary steps but uses
dnl AC_CONFIG_COMMANDS_PRE to delay the final tasks instead of building an
dnl intermediary list and relying on another macro.
dnl
dnl Since each configure script can get different options, a special variable
dnl named 'ax_sub_configure_args_<subdir>' is constructed for each
dnl subdirectory.
# Various preliminary checks.
AC_REQUIRE([AC_DISABLE_OPTION_CHECKING])
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])
AS_LITERAL_IF([$1], [],
[AC_DIAGNOSE([syntax], [$0: you should use literals])])
m4_foreach(subdir_path, [$1],
[
ax_dir="subdir_path"
dnl Build the argument list in a similar fashion to AC_CONFIG_SUBDIRS.
dnl A few arguments found in the final call to the configure script are not
dnl added here because they rely on variables that may not yet be available
dnl (see below the part that is similar to _AC_OUTPUT_SUBDIRS).
# Do not complain, so a configure script can configure whichever parts of a
# large source tree are present.
if test -d "$srcdir/$ax_dir"; then
_AC_SRCDIRS(["$ax_dir"])
# Remove --cache-file, --srcdir, and --disable-option-checking arguments
# so they do not pile up.
ax_args=
ax_prev=
eval "set x $ac_configure_args"
shift
for ax_arg; do
if test -n "$ax_prev"; then
ax_prev=
continue
fi
case $ax_arg in
-cache-file | --cache-file | --cache-fil | --cache-fi | --cache-f \
| --cache- | --cache | --cach | --cac | --ca | --c)
ax_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
| --c=*)
;;
--config-cache | -C)
;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ax_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ax_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* \
| --p=*)
;;
--disable-option-checking)
;;
*) case $ax_arg in
*\'*) ax_arg=$(AS_ECHO(["$ax_arg"]) | sed "s/'/'\\\\\\\\''/g");;
esac
AS_VAR_APPEND([ax_args], [" '$ax_arg'"]) ;;
esac
done
# Always prepend --disable-option-checking to silence warnings, since
# different subdirs can have different --enable and --with options.
ax_args="--disable-option-checking $ax_args"
# Options that must be added as they are provided.
m4_ifnblank([$2], [m4_foreach(opt, [$2], [AS_VAR_APPEND(ax_args, " 'opt'")
])])
# New options that may need to be merged with existing options.
m4_ifnblank([$3], [m4_foreach(opt, [$3],
[ax_candidate="opt"
ax_candidate_flag="${ax_candidate%%=*}"
ax_candidate_content="${ax_candidate#*=}"
if test "x$ax_candidate" != "x" -a "x$ax_candidate_flag" != "x"; then
if echo "$ax_args" | grep -- "${ax_candidate_flag}=" >/dev/null 2>&1; then
[ax_args=$(echo $ax_args | sed "s,\(${ax_candidate_flag}=[^']*\),\1 ${ax_candidate_content},")]
else
AS_VAR_APPEND(ax_args, " 'opt'")
fi
fi
])])
# New options that must replace existing options.
m4_ifnblank([$4], [m4_foreach(opt, [$4],
[ax_candidate="opt"
ax_candidate_flag="${ax_candidate%%=*}"
ax_candidate_content="${ax_candidate#*=}"
if test "x$ax_candidate" != "x" -a "x$ax_candidate_flag" != "x"; then
if echo "$ax_args" | grep -- "${ax_candidate_flag}=" >/dev/null 2>&1; then
[ax_args=$(echo $ax_args | sed "s,${ax_candidate_flag}=[^']*,${ax_candidate},")]
else
AS_VAR_APPEND(ax_args, " 'opt'")
fi
fi
])])
# Options that must be removed.
m4_ifnblank([$5], [m4_foreach(opt, [$5], [ax_args=$(echo $ax_args | sed "s,'opt',,")
])])
AS_VAR_APPEND([ax_args], [" '--srcdir=$ac_srcdir'"])
# Add the subdirectory to the list of target subdirectories.
ax_subconfigures="$ax_subconfigures $ax_dir"
# Save the argument list for this subdirectory.
dnl $1 is a path to some subdirectory: m4_bpatsubsts() is used to convert
dnl $1 into a valid shell variable name.
dnl For instance, "ax_sub_configure_args_path/to/subdir" becomes
dnl "ax_sub_configure_args_path_to_subdir".
ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_")
eval "ax_sub_configure_args_$ax_var=\"$ax_args\""
eval "ax_sub_configure_$ax_var=\"yes\""
else
AC_MSG_WARN([could not find source tree for $ax_dir])
fi
dnl Add some more arguments to the argument list and then actually run the
dnl configure script. This is mostly what happens in _AC_OUTPUT_SUBDIRS
dnl except it does not iterate over an intermediary list.
AC_CONFIG_COMMANDS_PRE(
dnl This very line cannot be quoted! m4_foreach has some work here.
ax_dir="subdir_path"
[
# Convert the path to the subdirectory into a shell variable name.
ax_var=$(printf "$ax_dir" | tr -c "0-9a-zA-Z_" "_")
ax_configure_ax_var=$(eval "echo \"\$ax_sub_configure_$ax_var\"")
if test "$no_recursion" != "yes" -a "x$ax_configure_ax_var" = "xyes"; then
AC_SUBST([subdirs_extra], ["$subdirs_extra $ax_dir"])
ax_msg="=== configuring in $ax_dir ($(pwd)/$ax_dir)"
_AS_ECHO_LOG([$ax_msg])
_AS_ECHO([$ax_msg])
AS_MKDIR_P(["$ax_dir"])
_AC_SRCDIRS(["$ax_dir"])
ax_popdir=$(pwd)
cd "$ax_dir"
# Check for guested configure; otherwise get Cygnus style configure.
if test -f "$ac_srcdir/configure.gnu"; then
ax_sub_configure=$ac_srcdir/configure.gnu
elif test -f "$ac_srcdir/configure"; then
ax_sub_configure=$ac_srcdir/configure
elif test -f "$ac_srcdir/configure.in"; then
# This should be Cygnus configure.
ax_sub_configure=$ac_aux_dir/configure
else
AC_MSG_WARN([no configuration information is in $ax_dir])
ax_sub_configure=
fi
if test -n "$ax_sub_configure"; then
# Get the configure arguments for the current configure.
eval "ax_sub_configure_args=\"\$ax_sub_configure_args_${ax_var}\""
# Always prepend --prefix to ensure using the same prefix
# in subdir configurations.
ax_arg="--prefix=$prefix"
case $ax_arg in
*\'*) ax_arg=$(AS_ECHO(["$ax_arg"]) | sed "s/'/'\\\\\\\\''/g");;
esac
ax_sub_configure_args="'$ax_arg' $ax_sub_configure_args"
if test "$silent" = yes; then
ax_sub_configure_args="--silent $ax_sub_configure_args"
fi
# Make the cache file name correct relative to the subdirectory.
case $cache_file in
[[\\/]]* | ?:[[\\/]]* )
ax_sub_cache_file=$cache_file ;;
*) # Relative name.
ax_sub_cache_file=$ac_top_build_prefix$cache_file ;;
esac
AC_MSG_NOTICE([running $SHELL $ax_sub_configure $ax_sub_configure_args --cache-file=$ac_sub_cache_file])
eval "\$SHELL \"$ax_sub_configure\" $ax_sub_configure_args --cache-file=\"$ax_sub_cache_file\"" \
|| AC_MSG_ERROR([$ax_sub_configure failed for $ax_dir])
fi
cd "$ax_popdir"
fi
])
])
])

View File

@@ -745,7 +745,7 @@ AC_DEFUN([AC_BAKEFILE],
AC_SUBST(OBJCXXFLAGS)
BAKEFILE_BAKEFILE_M4_VERSION="0.2.11"
BAKEFILE_BAKEFILE_M4_VERSION="0.2.12"
dnl includes autoconf_inc.m4:
$1

View File

@@ -80,8 +80,10 @@ main ()
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_gtk_version");
g_free(tmp_version);
exit(1);
}
g_free(tmp_version);
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||

View File

@@ -1,6 +1,10 @@
# Configure paths for GTK+
# Owen Taylor 1997-2001
# Version number used by aclocal, see `info automake Serials`.
# Increment on every change.
#serial 1
dnl AM_PATH_GTK_3_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
dnl pass to pkg-config
@@ -25,23 +29,15 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run
no_gtk=""
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
PKG_PROG_PKG_CONFIG([0.16])
if test x$PKG_CONFIG != xno ; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
:
else
echo "*** pkg-config too old; version 0.7 or better required."
no_gtk=yes
PKG_CONFIG=no
fi
else
if test -z "$PKG_CONFIG"; then
no_gtk=yes
fi
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
if test x$PKG_CONFIG != xno ; then
if test -n "$PKG_CONFIG"; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
@@ -152,7 +148,7 @@ main ()
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$PKG_CONFIG" = "no" ; then
if test -z "$PKG_CONFIG"; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://pkgconfig.sourceforge.net"
else
@@ -201,7 +197,8 @@ AC_DEFUN([GTK_CHECK_BACKEND],
min_gtk_version=ifelse([$2],,3.0.0,$2)
pkg_config_args="$pkg_config_args >= $min_gtk_version"
AC_PATH_PROG(PKG_CONFIG, [pkg-config], [AC_MSG_ERROR([No pkg-config found])])
PKG_PROG_PKG_CONFIG([0.16])
AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([No pkg-config found])])
if $PKG_CONFIG $pkg_config_args ; then
target_found=yes

View File

@@ -6,14 +6,14 @@ dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified i
dnl pass to pkg-config
dnl
AC_DEFUN([AM_PATH_GTK_4_0],
[m4_warn([obsolete], [AM_PATH_GTK_4_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk+-4.0]) instead])
[m4_warn([obsolete], [AM_PATH_GTK_4_0 is deprecated, use PKG_CHECK_MODULES([GTK], [gtk4]) instead])
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
, enable_gtktest=yes)
min_gtk_version=ifelse([$1], [], [3.90.0], [$1])
pkg_config_args="gtk+-4.0 >= $min_gtk_version"
pkg_config_args="gtk4 >= $min_gtk_version"
for module in . $4
do
case "$module" in
@@ -58,11 +58,11 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run
if test x"$no_gtk" = x ; then
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-4.0 | \
gtk_config_major_version=`$PKG_CONFIG --modversion gtk4 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-4.0 | \
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk4 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-4.0 | \
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk4 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_gtktest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
@@ -95,7 +95,7 @@ main ()
(gtk_get_minor_version() != $gtk_config_minor_version) ||
(gtk_get_micro_version() != $gtk_config_micro_version))
{
printf("\n*** 'pkg-config --modversion gtk+-4.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
printf("\n*** 'pkg-config --modversion gtk4' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
gtk_get_major_version(), gtk_get_minor_version(), gtk_get_micro_version());
printf ("*** was found! If pkg-config was correct, then it is best\n");
@@ -197,7 +197,7 @@ dnl Tests for BACKEND-NAME in the GTK targets list
dnl
AC_DEFUN([GTK_CHECK_BACKEND],
[m4_warn([obsolete], [GTK_CHECK_BACKEND is deprecated, use PKG_CHECK_MODULES([GTK_X11], [gtk+-x11-4.0]) or similar instead])
pkg_config_args=ifelse([$1],,gtk+-4.0, gtk+-$1-4.0)
pkg_config_args=ifelse([$1],,gtk4, gtk4-$1)
min_gtk_version=ifelse([$2],,4.0.0,$2)
pkg_config_args="$pkg_config_args >= $min_gtk_version"

View File

@@ -78,9 +78,11 @@ main ()
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_gtk_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
g_free(tmp_version);
printf("%s, bad version string\n", "$min_gtk_version");
exit(1);
}
g_free(tmp_version);
if ((gtk_major_version != $gtk_config_major_version) ||
(gtk_minor_version != $gtk_config_minor_version) ||

View File

@@ -56,7 +56,6 @@ ACLOCAL_SOURCES = \
build/aclocal/ax_func_which_gethostbyname_r.m4 \
build/aclocal/bakefile-lang.m4 \
build/aclocal/bakefile.m4 \
build/aclocal/cppunit.m4 \
build/aclocal/gst-element-check.m4 \
build/aclocal/gtk-2.0.m4 \
build/aclocal/gtk.m4 \

View File

@@ -6,7 +6,7 @@
The formats below are disabled because wxWidgets doesn't support these
compilers any longer (although bakefile still does).
-->
<disable-formats>dmars,dmars_smake,msvc6prj,watcom</disable-formats>
<disable-formats>borland,dmars,dmars_smake,msvc6prj,watcom</disable-formats>
<!-- These wildcards match all .bkl files in wxWidgets tree: -->
@@ -52,7 +52,7 @@
</del-formats>
<!-- Some samples use MSVC-specific stuff -->
<del-formats files="../../samples/flash/flash.bkl,../../samples/mfc/mfc.bkl">
<del-formats files="../../samples/mfc/mfc.bkl">
autoconf,borland,dmars_smake,dmars,mingw,watcom
</del-formats>
@@ -234,7 +234,7 @@
<add-formats files="../../samples/*/*.bkl,../../samples/*/*/*.bkl">
gnu
</add-formats>
<del-formats files="../../samples/flash/flash.bkl,../../samples/mfc/mfc.bkl">
<del-formats files="../../samples/mfc/mfc.bkl">
gnu
</del-formats>
<add-flags files="../../samples/*/*.bkl,../../samples/*/*/*.bkl"

View File

@@ -43,6 +43,8 @@
<if cond="TARGET_CPU=='IA64'">_ia64</if>
<if cond="TARGET_CPU=='x64'">_x64</if>
<if cond="TARGET_CPU=='X64'">_x64</if>
<if cond="FORMAT=='msvc' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">_x64</if>
<if cond="FORMAT=='msvc' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">_x64</if>
</set>
<!-- ================================================================== -->
@@ -180,7 +182,7 @@
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('richtext')))</if>
</set>
<set var="WXLIB_STC">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('stc')))</if>
<if cond="MONOLITHIC=='0' and USE_STC=='1'">$(mk.evalExpr(wxwin.mkLibName('stc')))</if>
</set>
<set var="WXLIB_WEBVIEW">
@@ -303,6 +305,10 @@
<if cond="FORMAT=='dmars' or FORMAT=='dmars_smake'">_WIN32_WINNT=0x0400</if>
</set>
<set var="WIN32_DPI_MANIFEST">
<if cond="PLATFORM_WIN32=='1' and IS_MSVC=='0'">wxUSE_DPI_AWARE_MANIFEST=$(USE_DPI_AWARE_MANIFEST)</if>
</set>
<set var="CAIRO_LIB">
<if cond="USE_CAIRO=='1'">cairo</if>
</set>
@@ -322,8 +328,83 @@
<if cond="TARGET_CPU=='IA64'">/MACHINE:IA64</if>
<if cond="TARGET_CPU=='x64'">/MACHINE:X64</if>
<if cond="TARGET_CPU=='X64'">/MACHINE:X64</if>
<if cond="FORMAT=='msvc' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">/MACHINE:X64</if>
<if cond="FORMAT=='msvc' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">/MACHINE:X64</if>
</set>
<set var="WIN32_DPI_LINKFLAG"></set>
<if cond="IS_MSVC_PRJ">
<set var="WIN32_DPI_LINKFLAG">
<!-- 32-bit system dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='1' and MSVS_PLATFORM=='win32'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<!-- 64-bit system dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='1' and MSVS_PLATFORM=='win64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<!-- 32-bit per-monitor dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='2' and MSVS_PLATFORM=='win32'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware_pmv2.manifest</if>
<!-- 64-bit per-monitor dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='2' and MSVS_PLATFORM=='win64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
</set>
</if>
<if cond="FORMAT=='msvc'">
<set var="WIN32_DPI_LINKFLAG">
<!-- 32-bit system dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU==''">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU==''">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU==''">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<!-- 64-bit system dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='amd64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='amd64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='amd64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='AMD64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='AMD64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='AMD64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware.manifest</if>
<!-- 32-bit per-monitor dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU==''">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU==''">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU==''">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware_pmv2.manifest</if>
<!-- 64-bit per-monitor dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='amd64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='amd64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='amd64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='AMD64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='AMD64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='AMD64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='15.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='16.0' and TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/amd64_dpi_aware_pmv2.manifest</if>
</set>
</if>
<set var="TARGET_CPU_COMPFLAG"></set>
<if cond="FORMAT=='msvc'">
<set var="TARGET_CPU_COMPFLAG">
<if cond="TARGET_CPU==''">TARGET_CPU_COMPFLAG=0</if>
<if cond="TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='x64'"></if>
<if cond="TARGET_CPU=='' and VISUALSTUDIOPLATFORM=='X64'"></if>
</set>
</if>
<template id="common_settings">
<debug-info>$(DEBUGINFO)</debug-info>
<debug-runtime-libs>$(DEBUGRUNTIME)</debug-runtime-libs>
@@ -343,11 +424,27 @@
</if>
<define>$(NO_VC_CRTDBG)</define>
<define>$(WIN32_WINNT)</define>
<cppflags cond="FORMAT=='autoconf'">$(WX_CPPFLAGS)</cppflags>
<cflags cond="FORMAT=='autoconf'">$(WX_CFLAGS)</cflags>
<cxxflags cond="FORMAT=='autoconf'">$(WX_CXXFLAGS)</cxxflags>
<!--
Surprisingly, WX_LDFLAGS doesn't go into ldflags, but into ldlibs,
because we need it to come after <lib-path> contents, which is
appended to ldflags, because we want to link with wx libraries in
the LIBDIRNAME and not any wx libraries installed system-wide.
-->
<ldlibs cond="FORMAT=='autoconf'">$(WX_LDFLAGS)</ldlibs>
<if cond="FORMAT=='msvc'">
<ldflags>$(LINK_TARGET_CPU)</ldflags>
<define>$(TARGET_CPU_COMPFLAG)</define>
</if>
</template>
<template id="wx_dpi">
<res-define>$(WIN32_DPI_MANIFEST)</res-define>
<ldflags>$(WIN32_DPI_LINKFLAG)</ldflags>
</template>
<template id="anylib">
<dirname>$(LIBDIRNAME)</dirname>
<install-to>$(LIBDIR)</install-to>
@@ -519,7 +616,6 @@ $(TAB)cl /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
<lib-path>$(LIBDIRNAME)</lib-path>
<warnings>max</warnings>
<cxxflags cond="FORMAT=='autoconf'">$(CXXWARNINGS)</cxxflags>
<cppflags-watcom>
-wcd=549 <!-- 'sizeof' operand contains compiler generated information -->
-wcd=656 <!-- define this function inside its class definition (may improve code quality) -->
@@ -689,46 +785,46 @@ $(TAB)cl /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
<win32-res>$(WXTOPDIR)src/msw/version.rc</win32-res>
</template>
<template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'">
<template id="wx_3rdparty_dependencies_base">
<depends>wxexpat</depends>
<depends>wxzlib</depends>
<depends>wxregex</depends>
</template>
<template id="wx_3rdparty_dependencies_gui" cond="USE_GUI=='1'"
template="wx_3rdparty_dependencies_base">
<depends>wxtiff</depends>
<depends>wxjpeg</depends>
<depends>wxpng</depends>
<depends>wxscintilla</depends>
</template>
<template id="wx_3rdparty_dependencies"
template="wx_3rdparty_dependencies_gui">
<depends>wxexpat</depends>
<depends>wxzlib</depends>
<depends>wxregex</depends>
<template id="wx_3rdparty_includes_base">
<include>$(INC_ZLIB)</include>
<include>$(INC_REGEX)</include>
<include>$(INC_EXPAT)</include>
</template>
<template id="wx_3rdparty_includes_gui" cond="USE_GUI=='1'">
<template id="wx_3rdparty_includes_gui" cond="USE_GUI=='1'"
template_append="wx_3rdparty_includes_base">
<include>$(INC_TIFF_BUILD)</include>
<include>$(INC_TIFF)</include>
<include>$(INC_JPEG)</include>
<include>$(INC_PNG)</include>
</template>
<template id="wx_3rdparty_includes"
template="wx_3rdparty_includes_gui">
<include>$(INC_ZLIB)</include>
<include>$(INC_REGEX)</include>
<include>$(INC_EXPAT)</include>
</template>
<template id="wx_lib"
template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h"/>
template="wx_3rdparty_includes_gui,wx_lib_b,msvc_setup_h"/>
<template id="wx_base_lib"
template="wx_lib_b,wx_3rdparty_includes,msvc_setup_h">
template="wx_3rdparty_includes_base,wx_lib_b,msvc_setup_h">
<define>wxUSE_GUI=0</define>
</template>
<template id="wx_dll"
template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
template="wx_3rdparty_includes_gui,wx_dll_b,wx_3rdparty_dependencies_gui"
template_append="msvc_setup_h,wx_append_nomono"/>
<template id="wx_base_dll"
template="wx_dll_b,wx_3rdparty_dependencies,wx_3rdparty_includes"
template="wx_3rdparty_includes_base,wx_dll_b,wx_3rdparty_dependencies_base"
template_append="msvc_setup_h,wx_append_base_nomono">
<define>wxUSE_GUI=0</define>
</template>
@@ -760,7 +856,7 @@ $(TAB)cl /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
</set>
<define-rule name="wx-base-plugin" extends="module">
<template>
<template template="common_settings">
<dllname>
$(id)$(WX_U_D_SUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
</dllname>
@@ -801,9 +897,4 @@ $(TAB)cl /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
<set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set>
<set var="webviewdll_ext_dir_define">
<if cond="FORMAT=='autoconf' and USE_WEBVIEW_WEBKIT2=='1'">WX_WEB_EXTENSIONS_DIRECTORY=\"$(PLUGINS_INST_DIR)/web-extensions\"</if>
</set>
</makefile>

View File

@@ -19,7 +19,7 @@
<define>$(DLLFLAG)</define>
</template>
<template id="wx_util" template="wx_util_b">
<template id="wx_util" template="wx_util_b,wx_dpi">
<app-type>gui</app-type>
<!-- resource files includes: -->
<include>$(SRCDIR)/$(WXTOPDIR)samples</include>

View File

@@ -132,6 +132,18 @@ Accepted values: IA64, X64, ARM64
(AMD64 accepted as synonym for X64 but should not be used any more).
</description>
</option>
<option name="VISUALSTUDIOVERSION">
<default-value>$(DOLLAR)(VISUALSTUDIOVERSION)</default-value>
<description>
Visual Studio version set by the VS command prompt.
</description>
</option>
<option name="VISUALSTUDIOPLATFORM">
<default-value>$(DOLLAR)(PLATFORM)</default-value>
<description>
Platform architecture set by the VS command prompt.
</description>
</option>
</if>
<if cond="FORMAT!='msvc'">
<set var="TARGET_CPU"/>
@@ -327,6 +339,14 @@ Default is to use debug CRT if and only if BUILD==debug.
</description>
</option>
<option name="USE_DPI_AWARE_MANIFEST">
<values>0,1,2</values>
<default-value>2</default-value>
<description>
Set DPI Awareness (win32) to none, system or per-monitor.
</description>
</option>
<option name="USE_THREADS">
<values>0,1</values>
<default-value>1</default-value>
@@ -391,8 +411,12 @@ compiled .lib files and setup.h under the lib/ toplevel directory.
<option name="EXTRALIBS_GUI"/>
<option name="EXTRALIBS_OPENGL"/>
<option name="EXTRALIBS_SDL"/>
<option name="EXTRALIBS_STC"/>
<option name="EXTRALIBS_WEBVIEW"/>
<option name="CXXWARNINGS"/>
<option name="WX_CPPFLAGS"/>
<option name="WX_CFLAGS"/>
<option name="WX_CXXFLAGS"/>
<option name="WX_LDFLAGS"/>
<option name="HOST_SUFFIX"/>
<option name="DYLIB_RPATH_INSTALL"/>
<option name="DYLIB_RPATH_POSTLINK"/>
@@ -465,10 +489,15 @@ it if SHARED=1 unless you know what you are doing.
<set var="EXTRALIBS_GUI"/>
<set var="EXTRALIBS_OPENGL">
<if cond="COMPILER=='wat' and TOOLKIT=='MSW'">opengl32.lib glu32.lib</if>
<if cond="COMPILER in ['vc','evc']">opengl32.lib glu32.lib</if>
<if cond="COMPILER=='vc'">opengl32.lib glu32.lib</if>
<if cond="COMPILER=='gcc'">-lopengl32 -lglu32</if>
</set>
<set var="EXTRALIBS_SDL"/>
<set var="EXTRALIBS_STC">
<if cond="COMPILER=='wat' and TOOLKIT=='MSW'">imm32.lib</if>
<if cond="COMPILER=='vc' and TOOLKIT=='MSW'">imm32.lib</if>
<if cond="COMPILER=='gcc' and TOOLKIT=='MSW'">-limm32</if>
</set>
<set var="EXTRALIBS_WEBVIEW"/>
<set var="WITH_PLUGIN_SDL">0</set>
@@ -480,26 +509,13 @@ it if SHARED=1 unless you know what you are doing.
</if>
<if cond="FORMAT=='mingw'">
<option name="GCC_VERSION">
<values>3,2.95</values>
<default-value>3</default-value>
<description>
Set the version of your Mingw installation here.
"3" ...... this is for Mingw 2.0 or newer (comes with gcc3)
"2.95" ... for Mingw 1.1 or any of the older versions
</description>
</option>
<option name="WINDRES">
<default-value>windres --use-temp-file</default-value>
<default-value>windres</default-value>
<description>
Windows resource compiler to use, possibly including extra options.
For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build.
</description>
</option>
<set var="GCCFLAGS">
<if cond="GCC_VERSION=='2.95'">-fvtable-thunks</if>
</set>
<set var="EXTRACFLAGS">$(GCCFLAGS) -DHAVE_W32API_H</set>
</if>
@@ -525,6 +541,7 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build.
<set var="USE_GUI">1</set>
<set var="USE_EXCEPTIONS">1</set>
<set var="USE_RTTI">1</set>
<set var="USE_DPI_AWARE_MANIFEST">0</set>
<set var="USE_THREADS">1</set>
<set var="USE_CAIRO">0</set>
<set var="DEBUG_INFO">$(DEBUG_INFO_DEFAULT)</set>

View File

@@ -4,6 +4,7 @@
<if cond="FORMAT=='autoconf'">
<option name="wxUSE_EXPAT"/>
<option name="wxCFLAGS_C99"/>
<set var="LIB_EXPAT">
<if cond="wxUSE_EXPAT=='builtin'">
wxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
@@ -31,6 +32,7 @@
HAVE_EXPAT_CONFIG_H
</define>
<cflags-borland>-w-8004 -w-8008 -w-8012 -w-8057 -w-8066</cflags-borland>
<cflags cond="FORMAT=='autoconf'">$(wxCFLAGS_C99)</cflags>
<sources>
src/expat/expat/lib/xmlparse.c
src/expat/expat/lib/xmlrole.c

View File

@@ -185,7 +185,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/core/cfstring.cpp
src/osx/core/evtloop_cf.cpp
src/osx/core/strconv_cf.cpp
src/osx/core/utilsexc_base.cpp
src/osx/cocoa/utils_base.mm
src/osx/core/secretstore.cpp
</set>
@@ -202,6 +201,9 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/osx/core/cfdictionary.h
wx/osx/core/cfarray.h
wx/osx/core/cftype.h
wx/osx/core/joystick.h
wx/osx/core/mimetype.h
wx/osx/core/dataview.h
</set>
<!-- Base files used by OS X ports (not Carbon) -->
@@ -224,10 +226,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/cocoa/utils.mm
</set>
<set var="BASE_AND_GUI_OSX_IPHONE_SRC" hints="files">
src/osx/iphone/utils.mm
</set>
<!-- Base files used by non-wxMac OS X builds -->
<set var="BASE_OSX_NOTWXMAC_SRC" hints="files">
$(BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC)
@@ -252,6 +250,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/msw/ole/safearray.cpp
src/msw/sound.cpp
src/msw/ole/automtn.cpp
src/qt/graphics.cpp
</set>
<set var="QT_WIN32_HDR" hints="files">
@@ -346,7 +345,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/qt/toolbar.h
wx/qt/tooltip.h
wx/qt/toplevel.h
<!-- wx/qt/treectrl.h -->
wx/qt/window.h
wx/generic/fdrepdlg.h
wx/generic/filepickerg.h
@@ -354,13 +352,13 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/generic/fontpickerg.h
wx/generic/caret.h
wx/qt/calctrl.h
wx/generic/animate.h
wx/qt/dvrenderer.h
wx/qt/taskbar.h
wx/generic/activityindicator.h
wx/qt/dataview.h
wx/qt/dvrenderers.h
$(QT_PLATFORM_HDR)
wx/qt/treectrl.h
</set>
<set var="QT_SRC" hints="files">
@@ -375,7 +373,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/imaglist.cpp
src/generic/prntdlgg.cpp
src/generic/textmeasure.cpp
src/generic/animateg.cpp
src/generic/activityindicator.cpp
src/qt/accel.cpp
src/qt/app.cpp
@@ -459,6 +456,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/qt/utils.cpp
src/qt/window.cpp
$(QT_PLATFORM_SRC)
src/qt/treectrl.cpp
</set>
<set var="MEDIA_QT_SRC" hints="files">
@@ -940,6 +938,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/common/windowid.cpp
src/common/wrapsizer.cpp
src/common/xpmdecod.cpp
src/generic/animateg.cpp
src/generic/busyinfo.cpp
src/generic/buttonbar.cpp
src/generic/choicdgg.cpp
@@ -1013,6 +1012,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/laywin.cpp
src/generic/calctrlg.cpp
src/generic/creddlgg.cpp
src/generic/rowheightcache.cpp
</set>
<set var="GUI_CMN_HDR" hints="files">
wx/affinematrix2dbase.h
@@ -1051,6 +1051,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/gbsizer.h
wx/gdicmn.h
wx/generic/accel.h
wx/generic/animate.h
wx/generic/buttonbar.h
wx/generic/choicdgg.h
wx/generic/combo.h
@@ -1406,6 +1407,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/gtk/filectrl.cpp
src/gtk/filehistory.cpp
src/gtk/font.cpp
src/gtk/image_gtk.cpp
src/gtk/sockgtk.cpp
src/gtk/minifram.cpp
src/gtk/nonownedwnd.cpp
@@ -1524,6 +1526,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/gtk/dataview.cpp
src/gtk/bmpcbox.cpp
src/gtk/animate.cpp
src/gtk/srchctrl.cpp
</set>
<set var="GTK2_SRC" hints="files">
$(GTK_SRC)
@@ -1593,6 +1596,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/gtk/bmpcbox.h
wx/gtk/dataview.h
wx/gtk/dvrenderer.h
wx/gtk/srchctrl.h
</set>
<set var="GTK2_HDR" hints="files">
$(GTK_HDR)
@@ -1718,7 +1722,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/gtk1/taskbar.cpp
src/generic/activityindicator.cpp
src/gtk1/eggtrayicon.c
src/generic/animateg.cpp
</set>
<set var="GTK1_HDR" hints="files">
wx/generic/clrpickerg.h
@@ -1766,7 +1769,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/gtk1/textctrl.h
wx/gtk1/tglbtn.h
wx/gtk1/treectrl.h
wx/generic/animate.h
wx/generic/activityindicator.h
</set>
@@ -1863,7 +1865,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/statline.cpp
src/generic/statusbr.cpp
src/generic/tabg.cpp
src/generic/animateg.cpp
src/generic/activityindicator.cpp
</set>
<set var="MOTIF_HDR" hints="files">
@@ -1935,8 +1936,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/motif/toolbar.h
wx/motif/toplevel.h
wx/motif/window.h
wx/generic/animate.h
wx/generic/animateanimate.h
</set>
@@ -2085,6 +2084,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/msw/rt/notifmsgrt.cpp
src/msw/ole/uuid.cpp
src/msw/evtloop.cpp
src/msw/ole/access.cpp
</set>
<set var="MSW_LOWLEVEL_HDR" hints="files">
wx/msw/nonownedwnd.h
@@ -2137,7 +2137,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/msw/nativdlg.cpp
src/msw/nativewin.cpp
src/msw/notebook.cpp
src/msw/ole/access.cpp
src/msw/ownerdrw.cpp
src/msw/progdlg.cpp
src/msw/radiobox.cpp
@@ -2160,7 +2159,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/msw/treectrl.cpp
src/msw/systhemectrl.cpp
src/msw/customdraw.cpp
src/generic/animateg.cpp
src/msw/commandlinkbutton.cpp
src/msw/bmpcbox.cpp
src/msw/hyperlink.cpp
@@ -2270,7 +2268,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/msw/rt/utils.h
wx/msw/hyperlink.h
wx/msw/bmpcbox.h
wx/generic/animate.h
wx/msw/commandlinkbutton.h
wx/msw/datetimectrl.h
wx/msw/timectrl.h
@@ -2334,7 +2331,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<set var="DFB_LOWLEVEL_SRC" hints="files">
src/common/fontmgrcmn.cpp
src/generic/animateg.cpp
src/generic/caret.cpp
src/generic/colour.cpp
src/generic/icon.cpp
@@ -2365,7 +2361,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/dfb/wrapdfb.cpp
</set>
<set var="DFB_LOWLEVEL_HDR" hints="files">
wx/generic/animate.h
wx/generic/caret.h
wx/generic/colour.h
wx/generic/icon.h
@@ -2549,7 +2544,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/osx/frame.h
wx/osx/gauge.h
wx/osx/listbox.h
wx/osx/listctrl.h
wx/osx/mdi.h
wx/osx/menu.h
wx/osx/menuitem.h
@@ -2649,7 +2643,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/cocoa/settings.mm
src/osx/cocoa/overlay.mm
src/osx/cocoa/aboutdlg.mm
src/generic/animateg.cpp
src/osx/dataview_osx.cpp
src/osx/cocoa/notifmsg.mm
src/osx/cocoa/taskbar.mm
@@ -2674,7 +2667,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/generic/region.h
wx/osx/cocoa/stdpaths.h
wx/osx/sound.h
wx/generic/animate.h
wx/osx/dvrenderer.h
wx/osx/cocoa/dataview.h
wx/osx/dvrenderers.h
@@ -2685,7 +2677,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/osx/datectrl.h
wx/osx/timectrl.h
wx/osx/datetimectrl.h
wx/osx/core/joystick.h
</set>
<!-- ====================================================================== -->
@@ -2714,16 +2705,15 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/osx/iphone/settings.mm
src/osx/sound_osx.cpp
src/osx/core/sound.cpp
src/generic/animateg.cpp
src/osx/iphone/statbmp.mm
src/osx/iphone/menuitem.mm
src/osx/iphone/menu.mm
</set>
<set var="OSX_IPHONE_HDR" hints="files">
wx/osx/iphone/chkconf.h
wx/osx/iphone/evtloop.h
wx/osx/iphone/private.h
wx/generic/region.h
wx/generic/animate.h
wx/osx/sound.h
</set>
@@ -2739,35 +2729,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/univ/themes/win32.cpp
</set>
<set var="UNIV_PLATFORM_SRC" hints="files">
<!--
Including src/generic/animateg.cpp hre unconditionally results in bakefile
errors when not fixing the value of TOOLKIT to MSW in msvc format, see #15327.
-->
<if cond="TOOLKIT=='GTK' and TOOLKIT_VERSION=='2'">
src/generic/animateg.cpp
</if>
<if cond="TOOLKIT=='MSW'">
src/generic/animateg.cpp
</if>
<if cond="TOOLKIT=='X11'">
src/generic/animateg.cpp
</if>
</set>
<set var="UNIV_PLATFORM_HDR" hints="files">
<if cond="TOOLKIT=='GTK' and TOOLKIT_VERSION=='2'">
wx/generic/animate.h
</if>
<if cond="TOOLKIT=='MSW'">
wx/generic/animate.h
</if>
<if cond="TOOLKIT=='X11'">
wx/generic/animate.h
</if>
</set>
<set var="UNIV_SRC" hints="files">
$(UNIV_PLATFORM_SRC)
src/generic/accel.cpp
src/generic/clrpickerg.cpp
src/generic/collpaneg.cpp
@@ -2821,9 +2783,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/generic/activityindicator.cpp
</set>
<set var="UNIV_HDR" hints="files">
$(UNIV_PLATFORM_HDR)
wx/generic/accel.h
wx/generic/animate.h
wx/generic/clrpickerg.h
wx/generic/collpaneg.h
wx/generic/ctrlsub.h
@@ -3022,7 +2982,10 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<!-- ====================================================================== -->
<set var="WEBVIEW_SRC_PLATFORM">
<if cond="TOOLKIT=='MSW'">src/msw/webview_ie.cpp</if>
<if cond="TOOLKIT=='MSW'">
src/msw/webview_ie.cpp
src/msw/webview_edge.cpp
</if>
<if cond="TOOLKIT=='GTK'">
src/gtk/webview_webkit.cpp
src/gtk/webview_webkit2.cpp
@@ -3043,7 +3006,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<if cond="TOOLKIT=='MSW'">
wx/msw/webviewhistoryitem_ie.h
wx/msw/webview_ie.h
wx/msw/webview_missing.h
wx/msw/webview_edge.h
</if>
<if cond="TOOLKIT=='GTK'">
wx/gtk/webviewhistoryitem_webkit.h
@@ -3090,6 +3053,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/xrc/xh_collpane.cpp
src/xrc/xh_combo.cpp
src/xrc/xh_comboctrl.cpp
src/xrc/xh_dataview.cpp
src/xrc/xh_datectrl.cpp
src/xrc/xh_dirpicker.cpp
src/xrc/xh_dlg.cpp
@@ -3103,6 +3067,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/xrc/xh_grid.cpp
src/xrc/xh_html.cpp
src/xrc/xh_hyperlink.cpp
src/xrc/xh_infobar.cpp
src/xrc/xh_listb.cpp
src/xrc/xh_listbk.cpp
src/xrc/xh_listc.cpp
@@ -3138,7 +3103,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
src/xrc/xh_unkwn.cpp
src/xrc/xh_wizrd.cpp
src/xrc/xmlres.cpp
src/xrc/xmladv.cpp
src/xrc/xmlrsall.cpp
</set>
<set var="XRC_HDR" hints="files">
@@ -3160,6 +3124,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/xrc/xh_collpane.h
wx/xrc/xh_combo.h
wx/xrc/xh_comboctrl.h
wx/xrc/xh_dataview.h
wx/xrc/xh_datectrl.h
wx/xrc/xh_dirpicker.h
wx/xrc/xh_dlg.h
@@ -3174,6 +3139,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
wx/xrc/xh_grid.h
wx/xrc/xh_html.h
wx/xrc/xh_hyperlink.h
wx/xrc/xh_infobar.h
wx/xrc/xh_listb.h
wx/xrc/xh_listbk.h
wx/xrc/xh_listc.h
@@ -3236,10 +3202,12 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<if cond="TOOLKIT=='OSX_IPHONE'">src/osx/iphone/glcanvas.mm src/osx/glcanvas_osx.cpp</if>
<if cond="TOOLKIT=='COCOA'">src/cocoa/glcanvas.mm</if>
<if cond="TOOLKIT=='GTK' and TOOLKIT_VERSION=='4' and PLATFORM_WIN32=='0'">
src/unix/glegl.cpp
src/unix/glx11.cpp
src/gtk/glcanvas.cpp
</if>
<if cond="TOOLKIT=='GTK' and TOOLKIT_VERSION=='3' and PLATFORM_WIN32=='0'">
src/unix/glegl.cpp
src/unix/glx11.cpp
src/gtk/glcanvas.cpp
</if>
@@ -3267,10 +3235,12 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<if cond="TOOLKIT=='COCOA'">wx/cocoa/glcanvas.h</if>
<if cond="TOOLKIT=='GTK' and TOOLKIT_VERSION=='4'">
wx/gtk/glcanvas.h
wx/unix/glegl.h
wx/unix/glx11.h
</if>
<if cond="TOOLKIT=='GTK' and TOOLKIT_VERSION=='3'">
wx/gtk/glcanvas.h
wx/unix/glegl.h
wx/unix/glx11.h
</if>
<if cond="TOOLKIT=='GTK' and TOOLKIT_VERSION=='2'">
@@ -3467,16 +3437,23 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<!-- wxSTC -->
<!-- ====================================================================== -->
<set var="STC_SRC" hints="files">
<set var="STC_CMN_SRC" hints="files">
src/stc/stc.cpp
src/stc/PlatWX.cpp
src/stc/ScintillaWX.cpp
</set>
<set var="STC_HDR" hints="files">
<set var="STC_CMN_HDR" hints="files">
wx/stc/stc.h
</set>
<set var="STC_OSX_COCOA_SRC" hints="files">
src/stc/PlatWXcocoa.mm
</set>
<set var="STC_OSX_COCOA_HDR" hints="files">
</set>
<!-- ====================================================================== -->
<!-- Define sources for specific libraries: -->
<!-- ====================================================================== -->
@@ -3658,6 +3635,16 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
<set var="MEDIA_SRC">$(MEDIA_CMN_SRC) $(MEDIA_PLATFORM_SRC)</set>
<set var="MEDIA_HDR">$(MEDIA_CMN_HDR) $(MEDIA_PLATFORM_HDR)</set>
<!-- wxSTC files: -->
<set var="STC_PLATFORM_SRC" hints="files">
<if cond="TOOLKIT=='OSX_COCOA'">$(STC_OSX_COCOA_SRC)</if>
</set>
<set var="STC_PLATFORM_HDR" hints="files">
<if cond="TOOLKIT=='OSX_COCOA'">$(STC_OSX_COCOA_HDR)</if>
</set>
<set var="STC_SRC">$(STC_CMN_SRC) $(STC_PLATFORM_SRC)</set>
<set var="STC_HDR">$(STC_CMN_HDR) $(STC_PLATFORM_HDR)</set>
<set var="GUI_CORE_HEADERS" hints="files">
<if cond="USE_GUI=='1' and WXUNIV=='0'">$(GUI_HDR)</if>

View File

@@ -28,10 +28,10 @@
<dll id="monodll" template="wx_dll,wx_monolib_or_dll"
cond="SHARED=='1' and MONOLITHIC=='1'">
<define>WXMAKINGDLL</define>
<define>$(webviewdll_ext_dir_define)</define>
<ldlibs>$(EXTRALIBS_XML)</ldlibs>
<ldlibs>$(EXTRALIBS_HTML)</ldlibs>
<ldlibs>$(EXTRALIBS_MEDIA)</ldlibs>
<ldlibs>$(EXTRALIBS_STC)</ldlibs>
<ldlibs>$(PLUGIN_MONOLIB_EXTRALIBS)</ldlibs>
<ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
<library>$(wxscintilla_library_link)</library>
@@ -39,7 +39,6 @@
<lib id="monolib" template="wx_lib,wx_monolib_or_dll"
cond="SHARED=='0' and MONOLITHIC=='1'">
<define>$(webviewdll_ext_dir_define)</define>
<if cond="FORMAT=='watcom'">
<set var="LIB_PAGESIZE" overwrite="1">8192</set>
</if>

View File

@@ -176,22 +176,27 @@
<!-- wxWEBVIEW -->
<!-- ================================================================ -->
<set var="webview_additional_include">
<if cond="TOOLKIT=='MSW'">$(TOP_SRCDIR)3rdparty/webview2/build/native/include</if>
</set>
<dll id="webviewdll" template="wx_dll"
cond="SHARED=='1' and USE_GUI=='1' and USE_WEBVIEW=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_WEBVIEW</define>
<define>$(webviewdll_ext_dir_define)</define>
<sources>$(WEBVIEW_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
<msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
<include>$(webview_additional_include)</include>
</dll>
<lib id="webviewlib" template="wx_lib"
cond="SHARED=='0' and USE_GUI=='1' and USE_WEBVIEW=='1' and MONOLITHIC=='0'">
<sources>$(WEBVIEW_SRC)</sources>
<msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
<include>$(webview_additional_include)</include>
</lib>
<wxshortcut id="wxwebview" cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'"/>
@@ -395,6 +400,7 @@
<sources>$(STC_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<ldlibs>$(EXTRALIBS_STC)</ldlibs>
<msvc-headers>$(STC_HDR)</msvc-headers>
</dll>

View File

@@ -25,6 +25,7 @@
cond="wxUSE_LIBPNG=='builtin' and USE_GUI=='1' and BUILDING_LIB=='1'">
<dirname>$(LIBDIRNAME)</dirname>
<include>$(INC_ZLIB)</include>
<define>PNG_INTEL_SSE</define>
<cflags-borland>-w-8004</cflags-borland>
<cflags-watcom>-wcd=124</cflags-watcom>
<sources>
@@ -43,7 +44,20 @@
src/png/pngwrite.c
src/png/pngwtran.c
src/png/pngwutil.c
src/png/arm/arm_init.c
src/png/arm/filter_neon_intrinsics.c
src/png/arm/palette_neon_intrinsics.c
src/png/intel/intel_init.c
src/png/intel/filter_sse2_intrinsics.c
</sources>
<if cond="IS_MSVC=='0'">
<sources>
src/png/mips/filter_msa_intrinsics.c
src/png/mips/mips_init.c
src/png/powerpc/filter_vsx_intrinsics.c
src/png/powerpc/powerpc_init.c
</sources>
</if>
</lib>
</makefile>

View File

@@ -22,7 +22,7 @@
3. Else, i.e. if there were no changes at all to API but only internal
changes, change C:R:A to C:R+1:A
-->
<set var="WX_CURRENT">3</set>
<set var="WX_CURRENT">5</set>
<set var="WX_REVISION">0</set>
<set var="WX_AGE">0</set>

View File

@@ -95,7 +95,7 @@
<command>
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/wx/config
$(INSTALL_PROGRAM) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(LIBDIR)/wx/config
$(INSTALL_SCRIPT) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(LIBDIR)/wx/config
(cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx-config &amp;&amp; $(LN_S) $(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
</command>
</action>
@@ -205,7 +205,7 @@
<depends-on-file>$(SRCDIR)/include/wx/msw/genrcdefs.h</depends-on-file>
<command>
$(DOLLAR)(CPP) "$(nativePaths(SRCDIR))\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
$(DOLLAR)(CPP) $(DOLLAR)(CPPFLAGS) "$(nativePaths(SRCDIR))\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
</command>
</action>

View File

@@ -19,9 +19,6 @@
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers)

View File

@@ -241,7 +241,6 @@
<template id="wx-lib">
<!-- MISCELLANEOUS -->
<if cond="FORMAT=='mingw'">
<define>HAVE_W32API_H</define>
<ldflags>-mthreads</ldflags>
</if>

View File

@@ -19,9 +19,6 @@
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)

View File

@@ -51,6 +51,7 @@ EXTRALIBS = {
'html' : '$(EXTRALIBS_HTML)',
'adv' : '$(PLUGIN_ADV_EXTRALIBS)',
'media' : '$(EXTRALIBS_MEDIA)',
'stc' : '$(EXTRALIBS_STC)',
'webview' : '$(EXTRALIBS_WEBVIEW)',
}

View File

@@ -29,11 +29,21 @@ endmacro()
macro(wx_get_dependencies var lib)
set(${var})
if(TARGET ${lib})
get_target_property(deps ${lib} LINK_LIBRARIES)
if(TARGET wx${lib})
get_target_property(deps wx${lib} LINK_LIBRARIES)
foreach(dep IN LISTS deps)
get_filename_component(name ${dep} NAME)
wx_string_append(${var} "${name} ")
if(TARGET ${dep})
get_target_property(dep_type ${dep} TYPE)
if (dep_type STREQUAL "INTERFACE_LIBRARY")
get_target_property(dep_name ${dep} INTERFACE_OUTPUT_NAME)
else()
get_target_property(dep_name ${dep} OUTPUT_NAME)
endif()
set(dep_name "-l${dep_name}")
else()
get_filename_component(dep_name ${dep} NAME)
endif()
wx_string_append(${var} "${dep_name} ")
endforeach()
string(STRIP ${${var}} ${var})
endif()
@@ -80,7 +90,7 @@ function(wx_write_config)
set(WX_CHARTYPE ansi)
set(lib_unicode_suffix)
endif()
if(CMAKE_CROSSCOMPILING)
if(CMAKE_CROSSCOMPILING AND NOT IPHONE)
set(cross_compiling yes)
set(host_alias ${CMAKE_SYSTEM_NAME})
else()
@@ -93,7 +103,8 @@ function(wx_write_config)
set(STD_BASE_LIBS_ALL xml net base)
set(STD_GUI_LIBS_ALL xrc html qa adv core)
foreach(lib IN ITEMS xrc webview stc richtext ribbon propgrid aui gl media html qa adv core xml net base)
if(TARGET ${lib})
list(FIND wxLIB_TARGETS wx${lib} hasLib)
if (hasLib GREATER -1)
wx_string_append(BUILT_WX_LIBS "${lib} ")
list(FIND STD_BASE_LIBS_ALL ${lib} index)
if (index GREATER -1)
@@ -105,9 +116,9 @@ function(wx_write_config)
endif()
endif()
endforeach()
string(STRIP ${BUILT_WX_LIBS} BUILT_WX_LIBS)
string(STRIP ${STD_BASE_LIBS} STD_BASE_LIBS)
string(STRIP ${STD_GUI_LIBS} STD_GUI_LIBS)
string(STRIP "${BUILT_WX_LIBS}" BUILT_WX_LIBS)
string(STRIP "${STD_BASE_LIBS}" STD_BASE_LIBS)
string(STRIP "${STD_GUI_LIBS}" STD_GUI_LIBS)
set(WX_RELEASE ${wxMAJOR_VERSION}.${wxMINOR_VERSION})
set(WX_VERSION ${wxVERSION})
@@ -130,6 +141,9 @@ function(wx_write_config)
wx_get_dependencies(EXTRALIBS_MEDIA media)
wx_get_dependencies(OPENGL_LIBS gl)
set(DMALLOC_LIBS)
if(wxBUILD_MONOLITHIC)
wx_get_dependencies(WXCONFIG_LIBS mono)
endif()
set(CC ${CMAKE_C_COMPILER})
set(CXX ${CMAKE_CXX_COMPILER})

View File

@@ -18,7 +18,28 @@ function(wx_add_demo name)
if(WIN32)
list(APPEND src_files ${wxSOURCE_DIR}/demos/${name}/${DEMO_NAME}.rc)
endif()
if (WXMSW AND DEFINED wxUSE_DPI_AWARE_MANIFEST)
set(wxDPI_MANIFEST_PRFIX "wx")
if (wxARCH_SUFFIX)
set(wxDPI_MANIFEST_PRFIX "amd64")
endif()
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 0)
if (${wxUSE_DPI_AWARE_MANIFEST} MATCHES "system")
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 1)
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware.manifest")
elseif(${wxUSE_DPI_AWARE_MANIFEST} MATCHES "per-monitor")
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 2)
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware_pmv2.manifest")
endif()
endif()
add_executable(${DEMO_NAME} WIN32 MACOSX_BUNDLE ${src_files})
if (DEFINED wxUSE_DPI_AWARE_MANIFEST_VALUE)
target_compile_definitions(${DEMO_NAME} PRIVATE wxUSE_DPI_AWARE_MANIFEST=${wxUSE_DPI_AWARE_MANIFEST_VALUE})
endif()
if(DEMO_DATA)
# TODO: unify with data handling for samples
# TODO: handle data files differently for OS X bundles
@@ -35,7 +56,7 @@ function(wx_add_demo name)
if(wxBUILD_SHARED)
target_compile_definitions(${DEMO_NAME} PRIVATE WXUSINGDLL)
endif()
wx_exe_link_libraries(${DEMO_NAME} core ${DEMO_LIBRARIES})
wx_exe_link_libraries(${DEMO_NAME} wxcore ${DEMO_LIBRARIES})
wx_set_common_target_properties(${DEMO_NAME})
set_target_properties(${DEMO_NAME} PROPERTIES FOLDER "Demos")
set_target_properties(${DEMO_NAME} PROPERTIES
@@ -71,7 +92,7 @@ wx_add_demo(forty
DATA
about.htm
LIBRARIES
html xml
wxhtml wxxml
)
wx_add_demo(fractal
@@ -97,7 +118,7 @@ wx_add_demo(poem
DATA
wxpoem.txt wxpoem.dat wxpoem.idx
LIBRARIES
html
wxhtml
NAME
wxpoem
)

View File

@@ -113,7 +113,6 @@ set(BASE_COREFOUNDATION_SRC
src/osx/core/evtloop_cf.cpp
src/osx/core/secretstore.cpp
src/osx/core/strconv_cf.cpp
src/osx/core/utilsexc_base.cpp
src/osx/cocoa/utils_base.mm
)
@@ -130,6 +129,9 @@ set(BASE_COREFOUNDATION_HDR
wx/osx/core/cfdictionary.h
wx/osx/core/cfarray.h
wx/osx/core/cftype.h
wx/osx/core/joystick.h
wx/osx/core/mimetype.h
wx/osx/core/dataview.h
)
set(BASE_OSX_SHARED_SRC
@@ -151,10 +153,6 @@ set(BASE_AND_GUI_OSX_COCOA_SRC
src/osx/cocoa/power.mm
)
set(BASE_AND_GUI_OSX_IPHONE_SRC
src/osx/iphone/utils.mm
)
set(BASE_OSX_NOTWXMAC_SRC
${BASE_UNIX_AND_DARWIN_NOTWXMAC_SRC}
${BASE_COREFOUNDATION_SRC}
@@ -175,6 +173,7 @@ set(QT_WIN32_SRC
src/msw/dialup.cpp
src/msw/dib.cpp
src/msw/joystick.cpp
src/qt/graphics.cpp
)
set(QT_WIN32_HDR
@@ -269,12 +268,12 @@ set(QT_HDR
wx/qt/window.h
wx/qt/dvrenderer.h
wx/qt/dvrenderers.h
wx/generic/animate.h
wx/qt/calctrl.h
wx/qt/taskbar.h
wx/qt/dataview.h
wx/generic/activityindicator.h
${QT_PLATFORM_HDR}
wx/qt/treectrl.h
)
set(QT_SRC
@@ -368,11 +367,11 @@ set(QT_SRC
src/qt/dvrenderer.cpp
src/generic/activityindicator.cpp
src/common/taskbarcmn.cpp
src/generic/animateg.cpp
src/qt/calctrl.cpp
src/qt/dataview.cpp
src/qt/taskbar.cpp
${QT_PLATFORM_SRC}
src/qt/treectrl.cpp
)
set(MEDIA_QT_SRC
@@ -920,6 +919,8 @@ set(GUI_CMN_SRC
src/generic/editlbox.cpp
src/generic/datavgen.cpp
src/generic/creddlgg.cpp
src/generic/rowheightcache.cpp
src/generic/animateg.cpp
)
set(GUI_CMN_HDR
@@ -1210,6 +1211,7 @@ set(GUI_CMN_HDR
wx/generic/sashwin.h
wx/creddlg.h
wx/generic/creddlgg.h
wx/generic/animate.h
)
set(UNIX_SRC
@@ -1293,6 +1295,7 @@ set(GTK_LOWLEVEL_SRC
src/gtk/filectrl.cpp
src/gtk/filehistory.cpp
src/gtk/font.cpp
src/gtk/image_gtk.cpp
src/gtk/sockgtk.cpp
src/gtk/mimetype.cpp
src/gtk/minifram.cpp
@@ -1414,6 +1417,7 @@ set(GTK_SRC
src/gtk/animate.cpp
src/gtk/bmpcbox.cpp
src/gtk/hyperlink.cpp
src/gtk/srchctrl.cpp
)
set(GTK2_SRC
@@ -1485,6 +1489,7 @@ set(GTK_HDR
wx/gtk/taskbar.h
wx/gtk/activityindicator.h
wx/gtk/hyperlink.h
wx/gtk/srchctrl.h
)
set(GTK2_HDR
@@ -1605,7 +1610,6 @@ set(GTK1_SRC
src/gtk1/toolbar.cpp
src/gtk1/textctrl.cpp
src/gtk1/tglbtn.cpp
src/generic/animateg.cpp
src/gtk1/eggtrayicon.c
src/generic/activityindicator.cpp
src/gtk1/taskbar.cpp
@@ -1658,7 +1662,6 @@ set(GTK1_HDR
wx/gtk1/tglbtn.h
wx/gtk1/treectrl.h
wx/generic/activityindicator.h
wx/generic/animate.h
)
set(MOTIF_LOWLEVEL_SRC
@@ -1751,7 +1754,6 @@ set(MOTIF_SRC
src/generic/statline.cpp
src/generic/statusbr.cpp
src/generic/tabg.cpp
src/generic/animateg.cpp
src/generic/activityindicator.cpp
)
@@ -1824,8 +1826,6 @@ set(MOTIF_HDR
wx/motif/toolbar.h
wx/motif/toplevel.h
wx/motif/window.h
wx/generic/animateanimate.h
wx/generic/animate.h
)
set(X11_LOWLEVEL_SRC
@@ -1963,6 +1963,7 @@ set(MSW_LOWLEVEL_SRC
src/msw/taskbar.cpp
src/msw/richtooltip.cpp
src/msw/evtloop.cpp
src/msw/ole/access.cpp
)
set(MSW_LOWLEVEL_HDR
@@ -2029,7 +2030,6 @@ set(MSW_SRC
src/msw/nativdlg.cpp
src/msw/nativewin.cpp
src/msw/notebook.cpp
src/msw/ole/access.cpp
src/msw/ownerdrw.cpp
src/msw/progdlg.cpp
src/msw/radiobox.cpp
@@ -2053,7 +2053,6 @@ set(MSW_SRC
src/msw/treectrl.cpp
src/msw/bmpcbox.cpp
src/msw/datectrl.cpp
src/generic/animateg.cpp
src/msw/calctrl.cpp
src/msw/datecontrols.cpp
src/msw/timectrl.cpp
@@ -2167,7 +2166,6 @@ set(MSW_HDR
wx/msw/hyperlink.h
wx/msw/datetimectrl.h
wx/msw/timectrl.h
wx/generic/animate.h
wx/generic/activityindicator.h
)
@@ -2249,7 +2247,6 @@ set(DFB_LOWLEVEL_SRC
src/dfb/utils.cpp
src/dfb/window.cpp
src/dfb/wrapdfb.cpp
src/generic/animateg.cpp
)
set(DFB_LOWLEVEL_HDR
@@ -2278,7 +2275,6 @@ set(DFB_LOWLEVEL_HDR
wx/dfb/toplevel.h
wx/dfb/window.h
wx/dfb/wrapdfb.h
wx/generic/animate.h
)
set(OSX_LOWLEVEL_SRC
@@ -2429,7 +2425,6 @@ set(OSX_SHARED_HDR
wx/osx/frame.h
wx/osx/gauge.h
wx/osx/listbox.h
wx/osx/listctrl.h
wx/osx/mdi.h
wx/osx/menu.h
wx/osx/menuitem.h
@@ -2534,7 +2529,6 @@ set(OSX_COCOA_SRC
src/osx/cocoa/dataview.mm
src/osx/carbon/sound.cpp
src/osx/cocoa/taskbar.mm
src/generic/animateg.cpp
src/common/taskbarcmn.cpp
src/osx/dataview_osx.cpp
src/osx/cocoa/notifmsg.mm
@@ -2561,8 +2555,6 @@ set(OSX_COCOA_HDR
wx/osx/datetimectrl.h
wx/osx/taskbarosx.h
wx/osx/dvrenderers.h
wx/generic/animate.h
wx/osx/core/joystick.h
)
set(OSX_IPHONE_SRC
@@ -2586,17 +2578,16 @@ set(OSX_IPHONE_SRC
src/osx/iphone/utils.mm
src/osx/iphone/window.mm
src/osx/sound_osx.cpp
src/generic/animateg.cpp
src/osx/core/sound.cpp
src/osx/iphone/statbmp.mm
src/osx/iphone/menuitem.mm
src/osx/iphone/menu.mm
)
set(OSX_IPHONE_HDR
wx/osx/iphone/chkconf.h
wx/osx/iphone/evtloop.h
wx/osx/iphone/private.h
wx/generic/region.h
wx/generic/animate.h
wx/osx/sound.h
)
@@ -2608,7 +2599,6 @@ set(UNIV_THEMES_SRC
)
set(UNIV_SRC
${UNIV_PLATFORM_SRC}
src/generic/accel.cpp
src/generic/clrpickerg.cpp
src/generic/collpaneg.cpp
@@ -2663,9 +2653,7 @@ set(UNIV_SRC
)
set(UNIV_HDR
${UNIV_PLATFORM_HDR}
wx/generic/accel.h
wx/generic/animate.h
wx/generic/clrpickerg.h
wx/generic/collpaneg.h
wx/generic/ctrlsub.h
@@ -2845,6 +2833,7 @@ set(HTML_CMN_HDR
set(WEBVIEW_MSW_SRC
src/msw/webview_ie.cpp
src/msw/webview_edge.cpp
)
set(WEBVIEW_CMN_SRC
@@ -2856,7 +2845,7 @@ set(WEBVIEW_CMN_SRC
set(WEBVIEW_MSW_HDR
wx/msw/webviewhistoryitem_ie.h
wx/msw/webview_ie.h
wx/msw/webview_missing.h
wx/msw/webview_edge.h
)
set(WEBVIEW_CMN_HDR
@@ -2922,6 +2911,7 @@ set(XRC_SRC
src/xrc/xh_grid.cpp
src/xrc/xh_html.cpp
src/xrc/xh_hyperlink.cpp
src/xrc/xh_infobar.cpp
src/xrc/xh_listb.cpp
src/xrc/xh_listbk.cpp
src/xrc/xh_listc.cpp
@@ -2957,8 +2947,8 @@ set(XRC_SRC
src/xrc/xh_unkwn.cpp
src/xrc/xh_wizrd.cpp
src/xrc/xmlres.cpp
src/xrc/xmladv.cpp
src/xrc/xmlrsall.cpp
src/xrc/xh_dataview.cpp
)
set(XRC_HDR
@@ -2994,6 +2984,7 @@ set(XRC_HDR
wx/xrc/xh_grid.h
wx/xrc/xh_html.h
wx/xrc/xh_hyperlink.h
wx/xrc/xh_infobar.h
wx/xrc/xh_listb.h
wx/xrc/xh_listbk.h
wx/xrc/xh_listc.h
@@ -3028,6 +3019,7 @@ set(XRC_HDR
wx/xrc/xh_unkwn.h
wx/xrc/xh_wizrd.h
wx/xrc/xmlres.h
wx/xrc/xh_dataview.h
)
set(XML_SRC
@@ -3059,18 +3051,25 @@ set(OPENGL_MSW_HDR
set(OPENGL_GTK_SRC
src/gtk/glcanvas.cpp
src/unix/glx11.cpp
src/unix/glegl.cpp
)
set(OPENGL_GTK_HDR
wx/gtk/glcanvas.h
wx/unix/glx11.h
wx/unix/glegl.h
)
set(OPENGL_OSX_SHARED_SRC
set(OPENGL_OSX_COCOA_SRC
src/osx/cocoa/glcanvas.mm
src/osx/glcanvas_osx.cpp
)
set(OPENGL_OSX_IPHONE_SRC
src/osx/iphone/glcanvas.mm
src/osx/glcanvas_osx.cpp
)
set(UNIX_SOUND_SDL_SRC
src/unix/sound_sdl.cpp
)
@@ -3208,13 +3207,20 @@ set(RICHTEXT_HDR
wx/xrc/xh_richtext.h
)
set(STC_SRC
set(STC_CMN_SRC
src/stc/stc.cpp
src/stc/PlatWX.cpp
src/stc/ScintillaWX.cpp
)
set(STC_HDR
set(STC_CMN_HDR
wx/stc/stc.h
)
set(STC_OSX_COCOA_SRC
src/stc/PlatWXcocoa.mm
)
set(STC_OSX_COCOA_HDR
)

View File

@@ -77,50 +77,59 @@ endmacro()
function(wx_set_common_target_properties target_name)
cmake_parse_arguments(wxCOMMON_TARGET_PROPS "DEFAULT_WARNINGS" "" "" ${ARGN})
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
# TODO: implement for older CMake versions ?
set_target_properties(${target_name} PROPERTIES CXX_STANDARD ${wxBUILD_CXX_STANDARD})
if(
APPLE AND
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND
(wxBUILD_CXX_STANDARD EQUAL 11 OR wxBUILD_CXX_STANDARD EQUAL 14)
)
if(CMAKE_GENERATOR STREQUAL "Xcode")
set_target_properties(${target_name} PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY libc++)
else()
target_compile_options(${target_name} PUBLIC "-stdlib=libc++")
target_link_libraries(${target_name} PRIVATE "-stdlib=libc++")
endif()
endif()
endif()
set_target_properties(${target_name} PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
ARCHIVE_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
RUNTIME_OUTPUT_DIRECTORY "${wxOUTPUT_DIR}${wxPLATFORM_LIB_DIR}"
)
if(NOT wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
# Enable higher warnings for most compilers/IDEs
if(wxBUILD_PIC)
set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
endif()
if(MSVC)
target_compile_options(${target_name} PRIVATE /W4)
if(wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
set(MSVC_WARNING_LEVEL "/W3")
else()
set(MSVC_WARNING_LEVEL "/W4")
endif()
# TODO: add warning flags for other compilers
target_compile_options(${target_name} PRIVATE ${MSVC_WARNING_LEVEL})
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
target_compile_options(${target_name} PRIVATE
-Wall
)
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT wxCOMMON_TARGET_PROPS_DEFAULT_WARNINGS)
target_compile_options(${target_name} PRIVATE
-Wall
-Wno-ignored-attributes
)
endif()
if(CMAKE_USE_PTHREADS_INIT)
target_compile_options(${target_name} PRIVATE "-pthread")
# clang++.exe: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
if(NOT (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))
set_target_properties(${target_name} PROPERTIES LINK_FLAGS "-pthread")
endif()
endif()
endfunction()
# Set common properties on wx library target
function(wx_set_target_properties target_name is_base)
if(${target_name} MATCHES "wx.*")
string(SUBSTRING ${target_name} 2 -1 target_name_short)
else()
set(target_name_short ${target_name})
endif()
# Set library name according to:
# docs/contrib/about-platform-toolkit-and-library-names.md
# docs/contributing/about-platform-toolkit-and-library-names.md
if(is_base)
set(lib_toolkit base)
else()
set(lib_toolkit ${wxBUILD_TOOLKIT}${wxBUILD_WIDGETSET})
endif()
if(WIN32)
if(MSVC)
set(lib_version ${wxMAJOR_VERSION}${wxMINOR_VERSION})
else()
set(lib_version ${wxMAJOR_VERSION}.${wxMINOR_VERSION})
@@ -130,51 +139,64 @@ function(wx_set_target_properties target_name is_base)
else()
set(lib_unicode)
endif()
if(NOT target_name STREQUAL "base" AND NOT target_name STREQUAL "mono")
if(NOT target_name_short STREQUAL "base" AND NOT target_name_short STREQUAL "mono")
# Do not append library name for base library
set(lib_suffix _${target_name})
set(lib_suffix _${target_name_short})
else()
set(lib_suffix)
endif()
set(lib_flavour "")
if(wxBUILD_FLAVOUR)
set(lib_flavour "_${wxBUILD_FLAVOUR}")
string(REPLACE "-" "_" lib_flavour ${lib_flavour})
endif()
if(WIN32)
if(MSVC)
# match visual studio name
set_target_properties(${target_name}
PROPERTIES
OUTPUT_NAME "wx${lib_toolkit}${lib_version}${lib_unicode}${lib_flavour}${lib_suffix}"
OUTPUT_NAME_DEBUG "wx${lib_toolkit}${lib_version}${lib_unicode}d${lib_flavour}${lib_suffix}"
PREFIX ""
)
else()
# match configure name (mingw, cygwin)
set_target_properties(${target_name}
PROPERTIES
OUTPUT_NAME "wx_${lib_toolkit}${lib_unicode}${lib_flavour}${lib_suffix}-${lib_version}"
OUTPUT_NAME_DEBUG "wx_${lib_toolkit}${lib_unicode}d${lib_flavour}${lib_suffix}-${lib_version}"
PREFIX "lib"
)
endif()
if(wxBUILD_SHARED)
# Add compiler type and or vendor
set(dll_suffix "_${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}")
set(dll_suffix "${lib_flavour}${lib_suffix}_${wxCOMPILER_PREFIX}")
if(wxBUILD_VENDOR)
wx_string_append(dll_suffix "_${wxBUILD_VENDOR}")
endif()
set(dll_version ${lib_version})
set(dll_version ${wxMAJOR_VERSION}${wxMINOR_VERSION})
if(wxVERSION_IS_DEV)
wx_string_append(dll_version ${wxRELEASE_NUMBER})
endif()
set_target_properties(${target_name}
PROPERTIES
RUNTIME_OUTPUT_NAME wx${lib_toolkit}${dll_version}${lib_unicode}${lib_suffix}${dll_suffix}
RUNTIME_OUTPUT_NAME_DEBUG wx${lib_toolkit}${dll_version}${lib_unicode}d${lib_suffix}${dll_suffix})
if(MINGW)
# Modify MinGW output to match other build systems
set_target_properties(${target_name}
PROPERTIES
RUNTIME_OUTPUT_NAME "wx${lib_toolkit}${dll_version}${lib_unicode}${dll_suffix}"
RUNTIME_OUTPUT_NAME_DEBUG "wx${lib_toolkit}${dll_version}${lib_unicode}d${dll_suffix}"
PREFIX ""
IMPORT_SUFFIX .a
)
endif()
target_compile_definitions(${target_name} PRIVATE
"-DWXDLLNAME=wx${lib_toolkit}${dll_version}${lib_unicode}$<$<CONFIG:Debug>:d>${lib_suffix}${dll_suffix}")
"-DWXDLLNAME=wx${lib_toolkit}${dll_version}${lib_unicode}$<$<CONFIG:Debug>:d>${dll_suffix}")
endif()
set_target_properties(${target_name}
PROPERTIES
OUTPUT_NAME wx${lib_toolkit}${lib_version}${lib_unicode}${lib_suffix}
OUTPUT_NAME_DEBUG wx${lib_toolkit}${lib_version}${lib_unicode}d${lib_suffix}
PREFIX ""
)
else()
set_target_properties(${target_name}
PROPERTIES
OUTPUT_NAME wx_${lib_toolkit}${lib_unicode}${lib_suffix}-${lib_version}
OUTPUT_NAME_DEBUG wx_${lib_toolkit}${lib_unicode}d${lib_suffix}-${lib_version}
OUTPUT_NAME wx_${lib_toolkit}${lib_unicode}${lib_flavour}${lib_suffix}-${lib_version}
# NOTE: wx-config can not be used to connect the libraries with the debug suffix.
#OUTPUT_NAME_DEBUG wx_${lib_toolkit}${lib_unicode}d${lib_flavour}${lib_suffix}-${lib_version}
OUTPUT_NAME_DEBUG wx_${lib_toolkit}${lib_unicode}${lib_flavour}${lib_suffix}-${lib_version}
)
endif()
if(CYGWIN)
@@ -183,7 +205,7 @@ function(wx_set_target_properties target_name is_base)
# Set common compile definitions
target_compile_definitions(${target_name} PRIVATE WXBUILDING _LIB)
if(target_name STREQUAL "mono" AND wxUSE_GUI)
if(target_name_short STREQUAL "mono" AND wxUSE_GUI)
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=1 wxUSE_BASE=1)
elseif(is_base OR NOT wxUSE_GUI)
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
@@ -254,26 +276,26 @@ function(wx_set_target_properties target_name is_base)
PUBLIC ${wxTOOLKIT_DEFINITIONS})
if(wxBUILD_SHARED)
string(TOUPPER ${target_name} target_name_upper)
if(target_name STREQUAL "mono")
string(TOUPPER ${target_name_short} target_name_upper)
if(target_name_short STREQUAL "mono")
target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL)
else()
target_compile_definitions(${target_name} PRIVATE DLL_EXPORTS WXMAKINGDLL_${target_name_upper})
endif()
if(NOT target_name STREQUAL "base")
if(NOT target_name_short STREQUAL "base")
target_compile_definitions(${target_name} PRIVATE WXUSINGDLL)
endif()
endif()
# Link common libraries
if(NOT target_name STREQUAL "mono")
if(NOT target_name STREQUAL "base")
if(NOT target_name_short STREQUAL "mono")
if(NOT target_name_short STREQUAL "base")
# All libraries except base need the base library
target_link_libraries(${target_name} PUBLIC base)
target_link_libraries(${target_name} PUBLIC wxbase)
endif()
if(NOT is_base AND NOT target_name STREQUAL "core")
if(NOT is_base AND NOT target_name_short STREQUAL "core")
# All non base libraries except core need core
target_link_libraries(${target_name} PUBLIC core)
target_link_libraries(${target_name} PUBLIC wxcore)
endif()
endif()
@@ -282,6 +304,9 @@ function(wx_set_target_properties target_name is_base)
wx_set_common_target_properties(${target_name})
endfunction()
# List of libraries added via wx_add_library() to use for wx-config
set(wxLIB_TARGETS)
# Add a wxWidgets library
# wx_add_library(<target_name> [IS_BASE] <src_files>...)
# first parameter is the name of the library
@@ -291,7 +316,10 @@ macro(wx_add_library name)
cmake_parse_arguments(wxADD_LIBRARY "IS_BASE" "" "" ${ARGN})
set(src_files ${wxADD_LIBRARY_UNPARSED_ARGUMENTS})
if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "mono")
list(APPEND wxLIB_TARGETS ${name})
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
if(wxBUILD_MONOLITHIC AND NOT ${name} STREQUAL "wxmono")
# collect all source files for mono library
set(wxMONO_SRC_FILES ${wxMONO_SRC_FILES} ${src_files} PARENT_SCOPE)
else()
@@ -307,8 +335,16 @@ macro(wx_add_library name)
set(wxBUILD_LIB_TYPE STATIC)
endif()
if(${name} MATCHES "wx.*")
string(SUBSTRING ${name} 2 -1 name_short)
else()
set(name_short ${name})
endif()
add_library(${name} ${wxBUILD_LIB_TYPE} ${src_files})
add_library(wx::${name_short} ALIAS ${name})
wx_set_target_properties(${name} ${wxADD_LIBRARY_IS_BASE})
set_target_properties(${name} PROPERTIES PROJECT_LABEL ${name_short})
# Setup install
wx_install(TARGETS ${name}
@@ -379,7 +415,7 @@ endmacro()
# Link wx libraries to executable
macro(wx_exe_link_libraries name)
if(wxBUILD_MONOLITHIC)
target_link_libraries(${name} PUBLIC mono)
target_link_libraries(${name} PUBLIC wxmono)
else()
target_link_libraries(${name};PRIVATE;${ARGN})
endif()
@@ -389,14 +425,18 @@ endmacro()
# Forwards everything to target_include_directories() except for monolithic
# build where it collects all include paths for linking with the mono lib
macro(wx_lib_include_directories name)
if(wxBUILD_MONOLITHIC)
cmake_parse_arguments(_LIB_INCLUDE_DIRS "" "" "PUBLIC;PRIVATE" ${ARGN})
if(wxBUILD_MONOLITHIC)
list(APPEND wxMONO_INCLUDE_DIRS_PUBLIC ${_LIB_INCLUDE_DIRS_PUBLIC})
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_PRIVATE ${wxMONO_INCLUDE_DIRS_PRIVATE} PARENT_SCOPE)
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()
endmacro()
@@ -454,8 +494,18 @@ function(wx_set_builtin_target_properties target_name)
)
endif()
target_include_directories(${target_name}
BEFORE
PUBLIC
${wxSETUP_HEADER_PATH}
)
set_target_properties(${target_name} PROPERTIES FOLDER "Third Party Libraries")
if(wxBUILD_SHARED OR wxBUILD_PIC)
set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
endif()
wx_set_common_target_properties(${target_name} DEFAULT_WARNINGS)
if(NOT wxBUILD_SHARED)
wx_install(TARGETS ${name} ARCHIVE DESTINATION "lib${wxPLATFORM_LIB_DIR}")
@@ -465,11 +515,17 @@ endfunction()
# Add a third party builtin library
function(wx_add_builtin_library name)
wx_list_add_prefix(src_list "${wxSOURCE_DIR}/" ${ARGN})
add_library(${name} STATIC ${src_list})
wx_set_builtin_target_properties(${name})
if(wxBUILD_SHARED)
set_target_properties(${name} PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
if(${name} MATCHES "wx.*")
string(SUBSTRING ${name} 2 -1 name_short)
else()
set(name_short ${name})
endif()
add_library(${name} STATIC ${src_list})
add_library(wx::${name_short} ALIAS ${name})
wx_set_builtin_target_properties(${name})
set_target_properties(${name} PROPERTIES PROJECT_LABEL ${name_short})
endfunction()
# List of third party libraries added via wx_add_thirdparty_library()
@@ -520,16 +576,36 @@ function(wx_add_thirdparty_library var_name lib_name help_str)
endfunction()
function(wx_print_thirdparty_library_summary)
set(nameLength 0)
set(nameValLength 0)
set(var_name)
set(message "Which libraries should wxWidgets use?\n")
foreach(entry IN
LISTS wxTHIRD_PARTY_LIBRARIES
ITEMS wxUSE_STL "Use C++ STL classes")
foreach(entry IN LISTS wxTHIRD_PARTY_LIBRARIES)
if(NOT var_name)
set(var_name ${entry})
else()
wx_string_append(message " ${var_name}: ${${var_name}} (${entry})\n")
string(LENGTH ${var_name} len)
if(len GREATER nameLength)
set(nameLength ${len})
endif()
string(LENGTH ${${var_name}} len)
if(len GREATER nameValLength)
set(nameValLength ${len})
endif()
set(var_name)
endif()
endforeach()
math(EXPR nameLength "${nameLength}+1") # account for :
set(message "Which libraries should wxWidgets use?\n")
foreach(entry IN LISTS wxTHIRD_PARTY_LIBRARIES)
if(NOT var_name)
set(var_name ${entry})
else()
set(namestr "${var_name}: ")
set(nameval "${${var_name}} ")
string(SUBSTRING ${namestr} 0 ${nameLength} namestr)
string(SUBSTRING ${nameval} 0 ${nameValLength} nameval)
wx_string_append(message " ${namestr} ${nameval} (${entry})\n")
set(var_name)
endif()
endforeach()
@@ -543,7 +619,7 @@ endfunction()
# all following parameters a src files for the executable
# source files are relative to samples/${name}/
# Optionally:
# DATA followed by required data files
# DATA followed by required data files. Use a colon to separate different source and dest paths
# DEFINITIONS list of definitions for the target
# FOLDER subfolder in IDE
# LIBRARIES followed by required libraries
@@ -616,14 +692,34 @@ function(wx_add_sample name)
else()
set(exe_type WIN32 MACOSX_BUNDLE)
endif()
if (WXMSW AND DEFINED wxUSE_DPI_AWARE_MANIFEST)
set(wxDPI_MANIFEST_PRFIX "wx")
if (wxARCH_SUFFIX)
set(wxDPI_MANIFEST_PRFIX "amd64")
endif()
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 0)
if (${wxUSE_DPI_AWARE_MANIFEST} MATCHES "system")
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 1)
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware.manifest")
elseif(${wxUSE_DPI_AWARE_MANIFEST} MATCHES "per-monitor")
set(wxUSE_DPI_AWARE_MANIFEST_VALUE 2)
list(APPEND src_files "${wxSOURCE_DIR}/include/wx/msw/${wxDPI_MANIFEST_PRFIX}_dpi_aware_pmv2.manifest")
endif()
endif()
add_executable(${target_name} ${exe_type} ${src_files})
if (DEFINED wxUSE_DPI_AWARE_MANIFEST_VALUE)
target_compile_definitions(${target_name} PRIVATE wxUSE_DPI_AWARE_MANIFEST=${wxUSE_DPI_AWARE_MANIFEST_VALUE})
endif()
endif()
# All samples use at least the base library other libraries
# will have to be added with wx_link_sample_libraries()
wx_exe_link_libraries(${target_name} base)
wx_exe_link_libraries(${target_name} wxbase)
if(NOT SAMPLE_CONSOLE)
# UI samples always require core
wx_exe_link_libraries(${target_name} core)
wx_exe_link_libraries(${target_name} wxcore)
else()
target_compile_definitions(${target_name} PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
endif()
@@ -639,10 +735,19 @@ function(wx_add_sample name)
if(SAMPLE_DATA)
# TODO: handle data files differently for OS X bundles
# Copy data files to output directory
foreach(data_file ${SAMPLE_DATA})
foreach(data_src ${SAMPLE_DATA})
string(FIND ${data_src} ":" HAS_COLON)
if(${HAS_COLON} GREATER -1)
MATH(EXPR DEST_INDEX "${HAS_COLON}+1")
string(SUBSTRING ${data_src} ${DEST_INDEX} -1 data_dst)
string(SUBSTRING ${data_src} 0 ${HAS_COLON} data_src)
else()
set(data_dst ${data_src})
endif()
list(APPEND cmds COMMAND ${CMAKE_COMMAND}
-E copy ${wxSOURCE_DIR}/samples/${wxSAMPLE_SUBDIR}${name}/${data_file}
${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${data_file})
-E copy ${wxSOURCE_DIR}/samples/${wxSAMPLE_SUBDIR}${name}/${data_src}
${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${data_dst})
endforeach()
add_custom_command(
TARGET ${target_name} ${cmds}
@@ -683,7 +788,9 @@ endfunction()
# Link libraries to a sample
function(wx_link_sample_libraries name)
target_link_libraries(${name} ${ARGN})
if(TARGET ${name})
target_link_libraries(${name} PUBLIC ${ARGN})
endif()
endfunction()
# Add a option and mark is as advanced if it starts with wxUSE_
@@ -772,7 +879,7 @@ function(wx_add_test name)
endif()
add_executable(${name} ${test_src})
target_include_directories(${name} PRIVATE "${wxSOURCE_DIR}/tests" "${wxSOURCE_DIR}/3rdparty/catch/include")
wx_exe_link_libraries(${name} base)
wx_exe_link_libraries(${name} wxbase)
if(wxBUILD_SHARED)
target_compile_definitions(${name} PRIVATE WXUSINGDLL)
endif()

View File

@@ -8,25 +8,92 @@
# Licence: wxWindows licence
#############################################################################
if(DEFINED wxBUILD_USE_STATIC_RUNTIME AND wxBUILD_USE_STATIC_RUNTIME)
if(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD})
endif()
if(MSVC)
# Determine MSVC runtime library flag
set(MSVC_LIB_USE "/MD")
set(MSVC_LIB_REPLACE "/MT")
if(wxBUILD_USE_STATIC_RUNTIME)
set(MSVC_LIB_USE "/MT")
set(MSVC_LIB_REPLACE "/MD")
endif()
# Set MSVC runtime flags for all configurations
foreach(cfg "" ${CMAKE_CONFIGURATION_TYPES})
set(flag_var CMAKE_CXX_FLAGS)
set(c_flag_var CMAKE_C_FLAGS)
set(cxx_flag_var CMAKE_CXX_FLAGS)
if(cfg)
string(TOUPPER ${cfg} cfg_upper)
wx_string_append(flag_var "_${cfg_upper}")
wx_string_append(c_flag_var "_${cfg_upper}")
wx_string_append(cxx_flag_var "_${cfg_upper}")
endif()
if(${flag_var} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
if(${c_flag_var} MATCHES ${MSVC_LIB_REPLACE})
string(REPLACE ${MSVC_LIB_REPLACE} ${MSVC_LIB_USE} ${c_flag_var} "${${c_flag_var}}")
set(${c_flag_var} ${${c_flag_var}} CACHE STRING
"Flags used by the C compiler during ${cfg_upper} builds." FORCE)
endif()
if(${cxx_flag_var} MATCHES ${MSVC_LIB_REPLACE})
string(REPLACE ${MSVC_LIB_REPLACE} ${MSVC_LIB_USE} ${cxx_flag_var} "${${cxx_flag_var}}")
set(${cxx_flag_var} ${${cxx_flag_var}} CACHE STRING
"Flags used by the CXX compiler during ${cfg_upper} builds." FORCE)
endif()
endforeach()
if(wxBUILD_OPTIMISE)
set(MSVC_LINKER_RELEASE_FLAGS " /LTCG /OPT:REF /OPT:ICF")
wx_string_append(CMAKE_EXE_LINKER_FLAGS_RELEASE "${MSVC_LINKER_RELEASE_FLAGS}")
wx_string_append(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${MSVC_LINKER_RELEASE_FLAGS}")
wx_string_append(CMAKE_STATIC_LINKER_FLAGS_RELEASE " /LTCG")
set(MSVC_COMPILER_RELEASE_FLAGS " /Ox /Oi /Ot /Oy /GS- /Gy /GL /Gw")
wx_string_append(CMAKE_CXX_FLAGS_RELEASE "${MSVC_COMPILER_RELEASE_FLAGS}")
wx_string_append(CMAKE_C_FLAGS_RELEASE "${MSVC_COMPILER_RELEASE_FLAGS}")
endif()
if(NOT wxBUILD_STRIPPED_RELEASE)
set(MSVC_PDB_FLAG " /DEBUG")
endif()
wx_string_append(CMAKE_EXE_LINKER_FLAGS_RELEASE "${MSVC_PDB_FLAG}")
wx_string_append(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${MSVC_PDB_FLAG}")
if(wxBUILD_MSVC_MULTIPROC)
wx_string_append(CMAKE_C_FLAGS " /MP")
wx_string_append(CMAKE_CXX_FLAGS " /MP")
endif()
if(NOT POLICY CMP0092)
string(REGEX REPLACE "/W[0-4]" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
if(wxBUILD_OPTIMISE)
set(GCC_PREFERRED_RELEASE_FLAGS " -O2 -fomit-frame-pointer")
wx_string_append(CMAKE_CXX_FLAGS_RELEASE "${GCC_PREFERRED_RELEASE_FLAGS}")
wx_string_append(CMAKE_C_FLAGS_RELEASE "${GCC_PREFERRED_RELEASE_FLAGS}")
endif()
if(wxBUILD_STRIPPED_RELEASE)
set(LD_STRIPPING_FLAG " -s")
wx_string_append(CMAKE_EXE_LINKER_FLAGS_RELEASE "${LD_STRIPPING_FLAG}")
wx_string_append(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${LD_STRIPPING_FLAG}")
else()
set(COMPILER_DBGSYM_FLAG " -g")
wx_string_append(CMAKE_CXX_FLAGS_RELEASE "${COMPILER_DBGSYM_FLAG}")
wx_string_append(CMAKE_C_FLAGS_RELEASE "${COMPILER_DBGSYM_FLAG}")
endif()
if(wxBUILD_USE_STATIC_RUNTIME)
if(MINGW)
set(STATIC_LINKER_FLAGS " -static")
else()
set(STATIC_LINKER_FLAGS " -static-libgcc -static-libstdc++")
endif()
wx_string_append(CMAKE_EXE_LINKER_FLAGS "${STATIC_LINKER_FLAGS}")
wx_string_append(CMAKE_SHARED_LINKER_FLAGS "${STATIC_LINKER_FLAGS}")
endif()
endif()
if(wxBUILD_COMPATIBILITY VERSION_LESS 3.0)
set(WXWIN_COMPATIBILITY_2_8 ON)
endif()
@@ -34,6 +101,15 @@ if(wxBUILD_COMPATIBILITY VERSION_LESS 3.1)
set(WXWIN_COMPATIBILITY_3_0 ON)
endif()
if(wxUSE_NO_RTTI)
if(MSVC)
add_compile_options("/GR-")
elseif(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
wx_string_append(CMAKE_CXX_FLAGS " -fno-rtti")
endif()
add_definitions("-DwxNO_RTTI")
endif()
# Build wxBUILD_FILE_ID used for config and setup path
#TODO: build different id for WIN32
set(wxBUILD_FILE_ID "${wxBUILD_TOOLKIT}${wxBUILD_WIDGETSET}-")
@@ -46,6 +122,11 @@ if(NOT wxBUILD_SHARED)
wx_string_append(wxBUILD_FILE_ID "-static")
endif()
wx_string_append(wxBUILD_FILE_ID "-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
if(wxBUILD_FLAVOUR)
set(lib_flavour ${wxBUILD_FLAVOUR})
string(REPLACE "-" "_" lib_flavour ${lib_flavour})
wx_string_append(wxBUILD_FILE_ID "-${lib_flavour}")
endif()
set(wxARCH_SUFFIX)
@@ -68,19 +149,15 @@ else()
set(wxCOMPILER_PREFIX)
endif()
if(MSVC OR MINGW)
if(MSVC)
if(wxBUILD_SHARED)
set(lib_suffix "dll")
else()
set(lib_suffix "lib")
endif()
if(MSVC)
# Include generator expression to suppress default Debug/Release pair
set(wxPLATFORM_LIB_DIR "$<1:/>${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}")
else()
set(wxPLATFORM_LIB_DIR "/${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}")
endif()
else()
set(wxPLATFORM_LIB_DIR)
endif()
@@ -92,7 +169,7 @@ if(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
set(wxSETUP_HEADER_PATH ${wxBUILD_CUSTOM_SETUP_HEADER_PATH})
else()
# Set path where setup.h will be created
if(MSVC OR MINGW)
if(MSVC)
if(wxUSE_UNICODE)
set(lib_unicode u)
else()
@@ -116,54 +193,141 @@ if(DEFINED wxSETUP_HEADER_FILE_DEBUG)
wx_string_append(wxSETUP_HEADER_PATH "$<$<CONFIG:Debug>:d>")
endif()
if(wxUSE_ON_FATAL_EXCEPTION AND MSVC AND (MSVC_VERSION GREATER 1800) )
# see include/wx/msw/seh.h for more details
add_compile_options("/EHa")
endif()
if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default")
add_compile_options("-DwxDEBUG_LEVEL=${wxBUILD_DEBUG_LEVEL}")
endif()
# Constants for setup.h creation
set(wxUSE_STD_DEFAULT ON)
if(wxUSE_UNICODE)
set(wxUSE_WCHAR_T ON)
endif()
if(NOT wxUSE_EXPAT)
set(wxUSE_XRC OFF)
endif()
set(wxUSE_XML ${wxUSE_XRC})
if(wxUSE_CONFIG)
set(wxUSE_CONFIG_NATIVE ON)
endif()
if(DEFINED wxUSE_OLE AND wxUSE_OLE)
set(wxUSE_OLE_AUTOMATION ON)
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)
set(wxUSE_GLCANVAS ON)
endif()
if(wxUSE_ARCHIVE_STREAMS AND NOT wxUSE_STREAMS)
message(WARNING "wxArchive requires wxStreams... disabled")
wx_option_force_value(wxUSE_ARCHIVE_STREAMS OFF)
endif()
if(wxUSE_ZIPSTREAM AND (NOT wxUSE_ARCHIVE_STREAMS OR NOT wxUSE_ZLIB))
message(WARNING "wxZip requires wxArchive or wxZlib... disabled")
wx_option_force_value(wxUSE_ZIPSTREAM OFF)
endif()
if(wxUSE_TARSTREAM AND NOT wxUSE_ARCHIVE_STREAMS)
message(WARNING "wxTar requires wxArchive... disabled")
wx_option_force_value(wxUSE_TARSTREAM OFF)
endif()
if(wxUSE_FILESYSTEM AND (NOT wxUSE_STREAMS OR (NOT wxUSE_FILE AND NOT wxUSE_FFILE)))
message(WARNING "wxFileSystem requires wxStreams and wxFile or wxFFile... disabled")
wx_option_force_value(wxUSE_FILESYSTEM OFF)
endif()
if(wxUSE_FS_ARCHIVE AND (NOT wxUSE_FILESYSTEM OR NOT wxUSE_ARCHIVE_STREAMS))
message(WARNING "wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled")
wx_option_force_value(wxUSE_FS_ARCHIVE OFF)
endif()
if(wxUSE_FS_ARCHIVE AND (NOT wxUSE_FILESYSTEM OR NOT wxUSE_ARCHIVE_STREAMS))
message(WARNING "wxArchiveFSHandler requires wxArchive and wxFileSystem... disabled")
wx_option_force_value(wxUSE_FS_ARCHIVE OFF)
endif()
if(wxUSE_FS_ZIP AND NOT wxUSE_FS_ARCHIVE)
message(WARNING "wxZipFSHandler requires wxArchiveFSHandler... disabled")
wx_option_force_value(wxUSE_FS_ZIP OFF)
endif()
if(wxUSE_TEXTFILE AND (NOT wxUSE_FILE OR NOT wxUSE_TEXTBUFFER))
message(WARNING "wxTextFile requires wxFile and wxTextBuffer... disabled")
wx_option_force_value(wxUSE_TEXTFILE OFF)
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(NOT wxUSE_TEXTFILE)
message(WARNING "wxConfig requires wxTextFile... disabled")
wx_option_force_value(wxUSE_CONFIG OFF)
else()
set(wxUSE_CONFIG_NATIVE ON)
endif()
endif()
if(wxUSE_INTL AND NOT wxUSE_FILE)
message(WARNING "I18n code requires wxFile... disabled")
wx_option_force_value(wxUSE_INTL OFF)
endif()
if(wxUSE_THREADS)
find_package(Threads REQUIRED)
endif()
if(wxUSE_LIBLZMA)
find_package(LibLZMA REQUIRED)
find_package(LibLZMA)
if(NOT LIBLZMA_FOUND)
message(WARNING "libLZMA not found, LZMA compression won't be available")
wx_option_force_value(wxUSE_LIBLZMA OFF)
endif()
endif()
if(UNIX AND wxUSE_SECRETSTORE)
if(UNIX)
if(wxUSE_SECRETSTORE AND NOT APPLE)
# The required APIs are always available under MSW and OS X but we must
# have GNOME libsecret under Unix to be able to compile this class.
find_package(Libsecret REQUIRED)
find_package(LIBSECRET)
if(NOT LIBSECRET_FOUND)
message(WARNING "libsecret not found, wxSecretStore won't be available")
wx_option_force_value(wxUSE_SECRETSTORE OFF)
endif()
endif()
if(wxUSE_LIBICONV)
find_package(ICONV)
if(NOT ICONV_FOUND)
message(WARNING "iconv not found")
wx_option_force_value(wxUSE_LIBICONV OFF)
endif()
endif()
endif(UNIX)
if(wxUSE_GUI)
if(WXMSW AND wxUSE_METAFILE)
# this one should probably be made separately configurable
@@ -216,23 +380,38 @@ if(wxUSE_GUI)
# extra dependencies
if(wxUSE_OPENGL)
if(WXOSX_IPHONE)
set(OPENGL_FOUND TRUE)
set(OPENGL_LIBRARIES "-framework OpenGLES" "-framework QuartzCore")
else()
find_package(OpenGL)
if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL)
set(OPENGL_LIBRARIES OpenGL::OpenGL OpenGL::EGL)
find_package(WAYLANDEGL)
if(WAYLANDEGL_FOUND AND wxHAVE_GDK_WAYLAND)
list(APPEND OPENGL_LIBRARIES ${WAYLANDEGL_LIBRARIES})
endif()
endif()
endif()
if(NOT OPENGL_FOUND)
message(WARNING "opengl not found, wxGLCanvas won't be available")
wx_option_force_value(wxUSE_OPENGL OFF)
endif()
if(UNIX AND (NOT WXGTK3 OR NOT OpenGL_EGL_FOUND))
wx_option_force_value(wxUSE_GLCANVAS_EGL OFF)
endif()
endif()
if(wxUSE_WEBVIEW)
if(WXGTK)
if(wxUSE_WEBVIEW_WEBKIT)
find_package(LibSoup)
find_package(LIBSOUP)
if(WXGTK2)
find_package(Webkit 1.0)
find_package(WEBKIT 1.0)
elseif(WXGTK3)
find_package(Webkit2)
find_package(WEBKIT2)
if(NOT WEBKIT2_FOUND)
find_package(Webkit 3.0)
find_package(WEBKIT 3.0)
endif()
endif()
endif()
@@ -247,8 +426,8 @@ if(wxUSE_GUI)
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
elseif(WXMSW)
if(NOT wxUSE_WEBVIEW_IE)
message(WARNING "WebviewIE not found or enabled, wxWebview won't be available")
if(NOT wxUSE_WEBVIEW_IE AND NOT wxUSE_WEBVIEW_EDGE)
message(WARNING "WebviewIE and WebviewEdge not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
elseif(APPLE)
@@ -260,17 +439,18 @@ if(wxUSE_GUI)
endif()
if(wxUSE_PRIVATE_FONTS AND WXGTK)
find_package(Fontconfig)
if(NOT FONTCONFIG_FOUND)
message(WARNING "Fontconfig not found, Private fonts won't be available")
find_package(FONTCONFIG)
find_package(PANGOFT2)
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)
endif()
endif()
if(wxUSE_MEDIACTRL AND UNIX AND NOT APPLE AND NOT WIN32)
find_package(GStreamer 1.0 COMPONENTS video)
if(wxUSE_MEDIACTRL AND WXGTK AND NOT APPLE AND NOT WIN32)
find_package(GSTREAMER 1.0 COMPONENTS video)
if(NOT GSTREAMER_FOUND)
find_package(GStreamer 0.10 COMPONENTS interfaces)
find_package(GSTREAMER 0.10 COMPONENTS interfaces)
endif()
set(wxUSE_GSTREAMER ${GSTREAMER_FOUND})
@@ -283,9 +463,12 @@ if(wxUSE_GUI)
message(WARNING "GStreamer not found, wxMediaCtrl won't be available")
wx_option_force_value(wxUSE_MEDIACTRL OFF)
endif()
else()
set(wxUSE_GSTREAMER OFF)
set(wxUSE_GSTREAMER_PLAYER OFF)
endif()
if(UNIX AND wxUSE_LIBSDL)
if(wxUSE_SOUND AND wxUSE_LIBSDL AND UNIX AND NOT APPLE)
find_package(SDL2)
if(NOT SDL2_FOUND)
find_package(SDL)
@@ -294,5 +477,106 @@ if(wxUSE_GUI)
message(WARNING "SDL not found, SDL Audio back-end won't be available")
wx_option_force_value(wxUSE_LIBSDL OFF)
endif()
else()
set(wxUSE_LIBSDL OFF)
endif()
if(wxUSE_NOTIFICATION_MESSAGE AND UNIX AND WXGTK2 AND wxUSE_LIBNOTIFY)
find_package(LIBNOTIFY)
if(NOT LIBNOTIFY_FOUND)
message(WARNING "Libnotify not found, it won't be used for notifications")
wx_option_force_value(wxUSE_LIBNOTIFY OFF)
elseif((LIBNOTIFY_VERSION GREATER 0.7) OR (LIBNOTIFY_VERSION EQUAL 0.7))
set(wxUSE_LIBNOTIFY_0_7 ON)
endif()
else()
set(wxUSE_LIBNOTIFY OFF)
endif()
if(wxUSE_UIACTIONSIMULATOR AND UNIX AND WXGTK)
if(wxUSE_XTEST)
find_package(XTEST)
if(XTEST_FOUND)
list(APPEND wxTOOLKIT_INCLUDE_DIRS ${XTEST_INCLUDE_DIRS})
list(APPEND wxTOOLKIT_LIBRARIES ${XTEST_LIBRARIES})
else()
if(WXGTK3)
# This class can't work without XTest with GTK+ 3
# which uses XInput2 and so ignores XSendEvent().
message(STATUS "XTest not found, wxUIActionSimulator won't be available")
wx_option_force_value(wxUSE_UIACTIONSIMULATOR OFF)
endif()
# The other ports can use XSendEvent(), so don't warn
wx_option_force_value(wxUSE_XTEST OFF)
endif()
else(WXGTK3)
# As per above, wxUIActionSimulator can't be used in this case,
# but there is no need to warn, presumably the user knows what
# he's doing if wxUSE_XTEST was explicitly disabled.
wx_option_force_value(wxUSE_UIACTIONSIMULATOR OFF)
endif()
endif()
if(wxUSE_HTML AND UNIX AND wxUSE_LIBMSPACK)
find_package(MSPACK)
if(NOT MSPACK_FOUND)
message(STATUS "libmspack not found")
wx_option_force_value(wxUSE_LIBMSPACK OFF)
endif()
else()
set(wxUSE_LIBMSPACK OFF)
endif()
if(WXGTK2 AND wxUSE_MIMETYPE AND wxUSE_LIBGNOMEVFS)
find_package(GNOMEVFS2)
if(GNOMEVFS2_FOUND)
list(APPEND wxTOOLKIT_INCLUDE_DIRS ${GNOMEVFS2_INCLUDE_DIRS})
list(APPEND wxTOOLKIT_LIBRARIES ${GNOMEVFS2_LIBRARIES})
else()
message(STATUS "libgnomevfs not found, library won't be used to associate MIME type")
wx_option_force_value(wxUSE_LIBGNOMEVFS OFF)
endif()
else()
set(wxUSE_LIBGNOMEVFS OFF)
endif()
endif()
# test if precompiled headers are supported using the cotire test project
if(DEFINED wxBUILD_PRECOMP_PREV AND NOT wxBUILD_PRECOMP STREQUAL wxBUILD_PRECOMP_PREV)
set(CLEAN_PRECOMP_TEST TRUE)
endif()
set(wxBUILD_PRECOMP_PREV ${wxBUILD_PRECOMP} CACHE INTERNAL "")
if(wxBUILD_PRECOMP)
if(DEFINED CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED)
set(try_flags "-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=${CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED}")
endif()
if (CLEAN_PRECOMP_TEST)
try_compile(RESULT_VAR_CLEAN
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
CotireExample clean_cotire
CMAKE_FLAGS ${try_flags}
)
endif()
try_compile(RESULT_VAR
"${wxBINARY_DIR}/CMakeFiles/cotire_test"
"${wxSOURCE_DIR}/build/cmake/modules/cotire_test"
CotireExample
CMAKE_FLAGS ${try_flags}
OUTPUT_VARIABLE OUTPUT_VAR
)
# check if output has precompiled header warnings. The build can still succeed, so check the output
# likely caused by gcc hardening: https://bugzilla.redhat.com/show_bug.cgi?id=1721553
# cc1plus: warning /path/to/project/cotire/name_CXX_prefix.hxx.gch: had text segment at different address
string(FIND "${OUTPUT_VAR}" "had text segment at different address" HAS_MESSAGE)
if(${HAS_MESSAGE} GREATER -1)
set(RESULT_VAR FALSE)
endif()
if(NOT RESULT_VAR)
message(WARNING "precompiled header (PCH) test failed, it will be turned off")
wx_option_force_value(wxBUILD_PRECOMP OFF)
endif()
endif(wxBUILD_PRECOMP)

View File

@@ -12,27 +12,25 @@ if(NOT wxBUILD_INSTALL)
endif()
install(CODE "message(STATUS \"Installing: Headers...\")")
if(UNIX)
wx_install(
DIRECTORY "${wxSOURCE_DIR}/include/wx"
DESTINATION "include/wx-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
else()
if(MSVC)
wx_install(
DIRECTORY "${wxSOURCE_DIR}/include/wx"
DESTINATION "include")
if(MSVC)
wx_install(
DIRECTORY "${wxSOURCE_DIR}/include/msvc"
DESTINATION "include")
endif()
else()
wx_install(
DIRECTORY "${wxSOURCE_DIR}/include/wx"
DESTINATION "include/wx-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
endif()
# setup header and wx-config
if(MSVC OR MINGW)
if(MSVC)
wx_install(
DIRECTORY "${wxSETUP_HEADER_PATH}"
DESTINATION "lib${wxPLATFORM_LIB_DIR}")
elseif(UNIX)
else()
wx_install(
DIRECTORY "${wxSETUP_HEADER_PATH}"
DESTINATION "lib/wx/include")

View File

@@ -75,25 +75,32 @@ endforeach()
if(wxBUILD_MONOLITHIC)
# Create monolithic library target
list(LENGTH wxMONO_SRC_FILES src_file_count)
wx_add_library(mono ${wxMONO_SRC_FILES})
wx_add_library(wxmono ${wxMONO_SRC_FILES})
foreach(vis PRIVATE PUBLIC)
if(wxMONO_LIBS_${vis})
# Remove libs included in mono from list
foreach(lib IN LISTS LIBS)
list(REMOVE_ITEM wxMONO_LIBS_${vis} ${lib})
list(REMOVE_ITEM wxMONO_LIBS_${vis} wx${lib})
endforeach()
target_link_libraries(mono ${vis} ${wxMONO_LIBS_${vis}})
target_link_libraries(wxmono ${vis} ${wxMONO_LIBS_${vis}})
endif()
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(wxmono ${INCLUDE_POS} ${vis} ${wxMONO_INCLUDE_DIRS_${vis}})
endif()
if(wxMONO_DEFINITIONS_${vis})
target_compile_definitions(mono ${vis} ${wxMONO_DEFINITIONS_${vis}})
target_compile_definitions(wxmono ${vis} ${wxMONO_DEFINITIONS_${vis}})
endif()
endforeach()
foreach(file ${wxMONO_NONCOMPILED_CPP_FILES})
set_source_files_properties(${file} PROPERTIES HEADER_FILE_ONLY TRUE)
endforeach()
wx_finalize_lib(mono)
wx_finalize_lib(wxmono)
endif()
# Propagate variable(s) to parent scope
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)

View File

@@ -9,6 +9,6 @@
include(../../source_groups.cmake)
wx_add_library(adv "${wxSOURCE_DIR}/src/common/dummy.cpp")
wx_add_library(wxadv "${wxSOURCE_DIR}/src/common/dummy.cpp")
wx_finalize_lib(adv)
wx_finalize_lib(wxadv)

View File

@@ -17,6 +17,6 @@ elseif(WXGTK2)
wx_append_sources(AUI_FILES AUI_GTK)
endif()
wx_add_library(aui ${AUI_FILES})
wx_add_library(wxaui ${AUI_FILES})
wx_finalize_lib(aui)
wx_finalize_lib(wxaui)

View File

@@ -17,57 +17,60 @@ if(WIN32)
wx_append_sources(BASE_FILES BASE_AND_GUI_WIN32)
elseif(APPLE)
wx_append_sources(BASE_FILES BASE_OSX_SHARED)
if(wxBUILD_TOOLKIT MATCHES "osx_iphone")
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_IPHONE)
else()
if(WXOSX_COCOA)
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_COCOA)
endif()
elseif(UNIX)
wx_append_sources(BASE_FILES BASE_UNIX)
endif()
wx_add_library(base IS_BASE ${BASE_FILES})
wx_add_library(wxbase IS_BASE ${BASE_FILES})
if(NOT wxBUILD_MONOLITHIC)
wx_lib_compile_definitions(base PRIVATE wxUSE_BASE=1)
wx_lib_compile_definitions(wxbase PRIVATE wxUSE_BASE=1)
endif()
if(wxUSE_ZLIB)
wx_lib_include_directories(base PRIVATE ${ZLIB_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${ZLIB_LIBRARIES})
wx_lib_include_directories(wxbase PRIVATE ${ZLIB_INCLUDE_DIRS})
wx_lib_link_libraries(wxbase PRIVATE ${ZLIB_LIBRARIES})
endif()
if(wxUSE_REGEX)
wx_lib_include_directories(base PRIVATE ${REGEX_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${REGEX_LIBRARIES})
wx_lib_include_directories(wxbase PRIVATE ${REGEX_INCLUDE_DIRS})
wx_lib_link_libraries(wxbase PRIVATE ${REGEX_LIBRARIES})
endif()
if(wxUSE_LIBLZMA)
wx_lib_include_directories(base PRIVATE ${LIBLZMA_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${LIBLZMA_LIBRARIES})
wx_lib_include_directories(wxbase PRIVATE ${LIBLZMA_INCLUDE_DIRS})
wx_lib_link_libraries(wxbase PRIVATE ${LIBLZMA_LIBRARIES})
endif()
if(UNIX AND wxUSE_SECRETSTORE)
wx_lib_include_directories(base PRIVATE ${LIBSECRET_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${LIBSECRET_LIBRARIES})
wx_lib_include_directories(wxbase PRIVATE ${LIBSECRET_INCLUDE_DIRS})
wx_lib_link_libraries(wxbase PRIVATE ${LIBSECRET_LIBRARIES})
endif()
if(wxUSE_LIBICONV AND ICONV_FOUND)
wx_lib_include_directories(base PRIVATE ${ICONV_INCLUDE_DIRS})
wx_lib_link_libraries(base PRIVATE ${ICONV_LIBRARIES})
if(wxUSE_LIBICONV)
wx_lib_include_directories(wxbase PRIVATE ${ICONV_INCLUDE_DIR})
wx_lib_link_libraries(wxbase PRIVATE ${ICONV_LIBRARIES})
endif()
if(wxUSE_THREADS AND CMAKE_THREAD_LIBS_INIT)
wx_lib_link_libraries(base PRIVATE ${CMAKE_THREAD_LIBS_INIT})
wx_lib_link_libraries(wxbase PRIVATE ${CMAKE_THREAD_LIBS_INIT})
endif()
if(APPLE)
wx_lib_link_libraries(base
wx_lib_link_libraries(wxbase
PUBLIC
"-framework CoreFoundation"
)
if(WXOSX_COCOA)
wx_lib_link_libraries(wxbase
PRIVATE
"-framework Security"
PUBLIC
"-framework Carbon"
"-framework Cocoa"
"-framework CoreFoundation"
"-framework IOKit"
)
endif()
elseif(UNIX)
wx_lib_link_libraries(base PRIVATE dl)
wx_lib_link_libraries(wxbase PRIVATE dl)
endif()
wx_finalize_lib(base)
wx_finalize_lib(wxbase)

View File

@@ -25,6 +25,9 @@ if(WXMSW)
wx_append_sources(CORE_SRC MSW_DESKTOP_LOWLEVEL)
wx_append_sources(CORE_SRC MSW)
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)
if(WXGTK2)
wx_append_sources(CORE_SRC GTK2_LOWLEVEL)
@@ -44,6 +47,9 @@ elseif(WXOSX_COCOA)
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
wx_append_sources(CORE_SRC OSX_SHARED)
wx_append_sources(CORE_SRC OSX_COCOA)
elseif(WXOSX_IPHONE)
wx_append_sources(CORE_SRC OSX_LOWLEVEL)
wx_append_sources(CORE_SRC OSX_IPHONE)
elseif(WXQT)
wx_append_sources(CORE_SRC QT)
if(WIN32)
@@ -51,40 +57,53 @@ elseif(WXQT)
endif()
endif()
wx_add_library(core ${CORE_SRC})
wx_add_library(wxcore ${CORE_SRC})
foreach(lib JPEG PNG TIFF)
if(${lib}_LIBRARIES)
if(lib STREQUAL JPEG)
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIR})
wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIR})
else()
wx_lib_include_directories(core PRIVATE ${${lib}_INCLUDE_DIRS})
wx_lib_include_directories(wxcore PRIVATE ${${lib}_INCLUDE_DIRS})
endif()
wx_lib_link_libraries(core PRIVATE ${${lib}_LIBRARIES})
wx_lib_link_libraries(wxcore PRIVATE ${${lib}_LIBRARIES})
endif()
endforeach()
if(WIN32)
wx_lib_link_libraries(core PRIVATE winmm)
wx_lib_link_libraries(wxcore PRIVATE winmm)
endif()
if(WXOSX_COCOA)
wx_lib_link_libraries(core PUBLIC "-framework AudioToolbox")
wx_lib_link_libraries(wxcore PUBLIC "-framework AudioToolbox")
if(wxUSE_WEBKIT)
wx_lib_link_libraries(core PUBLIC "-framework WebKit")
wx_lib_link_libraries(wxcore PUBLIC "-framework WebKit")
endif()
endif()
if(WXOSX_IPHONE)
wx_lib_link_libraries(wxcore
PUBLIC
"-framework AudioToolbox"
"-framework CoreGraphics"
"-framework CoreText"
"-framework UIKit"
)
endif()
if(WXGTK AND wxUSE_PRIVATE_FONTS)
wx_lib_include_directories(core PUBLIC ${FONTCONFIG_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${FONTCONFIG_LIBRARIES})
wx_lib_include_directories(wxcore PUBLIC ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
wx_lib_link_libraries(wxcore PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
endif()
if(UNIX AND wxUSE_LIBSDL)
if(wxUSE_LIBSDL)
if(SDL2_FOUND)
wx_lib_include_directories(core PUBLIC ${SDL2_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${SDL2_LIBRARY})
wx_lib_include_directories(wxcore PUBLIC ${SDL2_INCLUDE_DIR})
wx_lib_link_libraries(wxcore PUBLIC ${SDL2_LIBRARY})
elseif(SDL_FOUND)
wx_lib_include_directories(core PUBLIC ${SDL_INCLUDE_DIR})
wx_lib_link_libraries(core PUBLIC ${SDL_LIBRARY})
wx_lib_include_directories(wxcore PUBLIC ${SDL_INCLUDE_DIR})
wx_lib_link_libraries(wxcore PUBLIC ${SDL_LIBRARY})
endif()
endif()
if(wxUSE_LIBNOTIFY)
wx_lib_include_directories(wxcore PUBLIC ${LIBNOTIFY_INCLUDE_DIRS})
wx_lib_link_libraries(wxcore PUBLIC ${LIBNOTIFY_LIBRARIES})
endif()
wx_finalize_lib(core)
wx_finalize_lib(wxcore)

View File

@@ -8,6 +8,8 @@
#############################################################################
if(wxUSE_EXPAT STREQUAL "builtin")
# TODO: implement building expat via its CMake file, using
# add_subdirectory or ExternalProject_Add
wx_add_builtin_library(wxexpat
src/expat/expat/lib/xmlparse.c
src/expat/expat/lib/xmlrole.c

View File

@@ -15,14 +15,16 @@ if(WXMSW)
wx_append_sources(GL_FILES OPENGL_MSW)
elseif(WXGTK)
wx_append_sources(GL_FILES OPENGL_GTK)
elseif(APPLE)
wx_append_sources(GL_FILES OPENGL_OSX_SHARED)
elseif(WXOSX_COCOA)
wx_append_sources(GL_FILES OPENGL_OSX_COCOA)
elseif(WXOSX_IPHONE)
wx_append_sources(GL_FILES OPENGL_OSX_IPHONE)
elseif(WXQT)
wx_append_sources(GL_FILES OPENGL_QT)
endif()
wx_add_library(gl ${GL_FILES})
wx_lib_include_directories(gl PUBLIC ${OPENGL_INCLUDE_DIR})
wx_lib_link_libraries(gl PUBLIC ${OPENGL_LIBRARIES})
wx_add_library(wxgl ${GL_FILES})
wx_lib_include_directories(wxgl PUBLIC ${OPENGL_INCLUDE_DIR})
wx_lib_link_libraries(wxgl PUBLIC ${OPENGL_LIBRARIES})
wx_finalize_lib(gl)
wx_finalize_lib(wxgl)

View File

@@ -11,10 +11,15 @@ include(../../source_groups.cmake)
wx_append_sources(HTML_FILES HTML_CMN)
if(WIN32)
if(WIN32 OR wxUSE_LIBMSPACK)
wx_append_sources(HTML_FILES HTML_MSW)
endif()
wx_add_library(html ${HTML_FILES})
wx_add_library(wxhtml ${HTML_FILES})
wx_finalize_lib(html)
if(wxUSE_LIBMSPACK)
wx_lib_include_directories(wxhtml PRIVATE ${MSPACK_INCLUDE_DIRS})
wx_lib_link_libraries(wxhtml PRIVATE ${MSPACK_LIBRARIES})
endif()
wx_finalize_lib(wxhtml)

View File

@@ -15,43 +15,43 @@ if(WXMSW)
wx_append_sources(MEDIA_FILES MEDIA_MSW)
elseif(WXOSX_COCOA)
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
elseif(UNIX)
elseif(WXOSX_IPHONE)
wx_append_sources(MEDIA_FILES MEDIA_OSX_IPHONE)
elseif(WXGTK)
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
elseif(WXQT)
wx_append_sources(MEDIA_FILES MEDIA_QT)
endif()
wx_add_library(media ${MEDIA_FILES})
if(WXOSX_COCOA)
# TODO: add version detection of some kind and/or wx_option
wx_lib_compile_definitions(media PRIVATE -DwxOSX_USE_QTKIT=0)
wx_lib_link_libraries(media PUBLIC
wx_add_library(wxmedia ${MEDIA_FILES})
if(WXOSX)
wx_lib_link_libraries(wxmedia PUBLIC
"-framework AVFoundation"
"-framework AVKit"
"-framework CoreMedia"
"-weak_framework AVKit"
)
elseif(UNIX)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INCLUDE_DIRS})
elseif(WXGTK)
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INCLUDE_DIRS})
if(GSTREAMER_INTERFACES_INCLUDE_DIRS)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_INTERFACES_INCLUDE_DIRS})
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_INTERFACES_INCLUDE_DIRS})
endif()
if(GSTREAMER_VIDEO_INCLUDE_DIRS)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_VIDEO_INCLUDE_DIRS})
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_VIDEO_INCLUDE_DIRS})
endif()
if(GSTREAMER_PLAYER_INCLUDE_DIRS)
wx_lib_include_directories(media PUBLIC ${GSTREAMER_PLAYER_INCLUDE_DIRS})
wx_lib_include_directories(wxmedia PUBLIC ${GSTREAMER_PLAYER_INCLUDE_DIRS})
endif()
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_LIBRARIES})
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_LIBRARIES})
if(GSTREAMER_INTERFACES_LIBRARIES)
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES})
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES})
endif()
if(GSTREAMER_VIDEO_LIBRARIES)
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_VIDEO_LIBRARIES})
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_VIDEO_LIBRARIES})
endif()
if(GSTREAMER_PLAYER_LIBRARIES)
wx_lib_link_libraries(media PUBLIC ${GSTREAMER_PLAYER_LIBRARIES})
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_PLAYER_LIBRARIES})
endif()
endif()
wx_finalize_lib(media)
wx_finalize_lib(wxmedia)

View File

@@ -21,21 +21,21 @@ if(UNIX AND NOT WIN32)
wx_append_sources(NET_FILES NET_UNIX)
endif()
wx_add_library(net IS_BASE ${NET_FILES})
wx_add_library(wxnet IS_BASE ${NET_FILES})
if(WIN32)
wx_lib_link_libraries(net PRIVATE ws2_32)
wx_lib_link_libraries(wxnet PRIVATE ws2_32)
if(wxUSE_WEBREQUEST_WINHTTP)
wx_lib_link_libraries(net PRIVATE Winhttp)
wx_lib_link_libraries(wxnet PRIVATE Winhttp)
endif()
endif()
if (wxUSE_WEBREQUEST_CURL)
find_package(CURL REQUIRED)
target_include_directories(net PRIVATE ${CURL_INCLUDE_DIRS})
wx_lib_link_libraries(net PRIVATE ${CURL_LIBRARIES})
target_include_directories(wxnet PRIVATE ${CURL_INCLUDE_DIRS})
wx_lib_link_libraries(wxnet PRIVATE ${CURL_LIBRARIES})
endif()
wx_finalize_lib(net)
wx_finalize_lib(wxnet)

View File

@@ -8,6 +8,16 @@
#############################################################################
if(wxUSE_LIBPNG STREQUAL "builtin")
# TODO: implement building libpng via its CMake file, using
# add_subdirectory or ExternalProject_Add
if(NOT MSVC)
set(PNG_EXTRA_SOURCES
src/png/mips/filter_msa_intrinsics.c
src/png/mips/mips_init.c
src/png/powerpc/filter_vsx_intrinsics.c
src/png/powerpc/powerpc_init.c
)
endif()
wx_add_builtin_library(wxpng
src/png/png.c
src/png/pngerror.c
@@ -24,6 +34,12 @@ if(wxUSE_LIBPNG STREQUAL "builtin")
src/png/pngwrite.c
src/png/pngwtran.c
src/png/pngwutil.c
src/png/arm/arm_init.c
src/png/arm/filter_neon_intrinsics.c
src/png/arm/palette_neon_intrinsics.c
src/png/intel/intel_init.c
src/png/intel/filter_sse2_intrinsics.c
${PNG_EXTRA_SOURCES}
)
if(WIN32)
# define this to get rid of a warning about using POSIX lfind():
@@ -32,6 +48,7 @@ if(wxUSE_LIBPNG STREQUAL "builtin")
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101278
target_compile_definitions(wxpng PRIVATE _CRT_NONSTDC_NO_WARNINGS)
endif()
target_compile_definitions(wxpng PRIVATE PNG_INTEL_SSE)
target_include_directories(wxpng PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(wxpng PRIVATE ${ZLIB_LIBRARIES})
set(PNG_LIBRARIES wxpng)

View File

@@ -11,6 +11,6 @@ include(../../source_groups.cmake)
wx_append_sources(PROPGRID_FILES PROPGRID)
wx_add_library(propgrid ${PROPGRID_FILES})
wx_add_library(wxpropgrid ${PROPGRID_FILES})
wx_finalize_lib(propgrid)
wx_finalize_lib(wxpropgrid)

View File

@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
wx_append_sources(QA_FILES QA)
wx_add_library(qa ${QA_FILES})
wx_lib_link_libraries(qa PUBLIC xml)
wx_add_library(wxqa ${QA_FILES})
wx_lib_link_libraries(wxqa PUBLIC wxxml)
wx_finalize_lib(qa)
wx_finalize_lib(wxqa)

View File

@@ -8,7 +8,6 @@
#############################################################################
if(wxUSE_REGEX)
# TODO: Forcing builtin until sys is implemented
set(wxUSE_REGEX builtin)
wx_add_builtin_library(wxregex
src/regex/regcomp.c
@@ -20,5 +19,3 @@ if(wxUSE_REGEX)
set(REGEX_LIBRARIES wxregex)
set(REGEX_INCLUDE_DIRS ${wxSOURCE_DIR}/src/regex)
endif()
#TODO: find external lib and include dir

View File

@@ -11,6 +11,6 @@ include(../../source_groups.cmake)
wx_append_sources(RIBBON_FILES RIBBON)
wx_add_library(ribbon ${RIBBON_FILES})
wx_add_library(wxribbon ${RIBBON_FILES})
wx_finalize_lib(ribbon)
wx_finalize_lib(wxribbon)

View File

@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
wx_append_sources(RICHTEXT_FILES RICHTEXT)
wx_add_library(richtext ${RICHTEXT_FILES})
wx_lib_link_libraries(richtext PRIVATE html xml)
wx_add_library(wxrichtext ${RICHTEXT_FILES})
wx_lib_link_libraries(wxrichtext PRIVATE wxhtml wxxml)
wx_finalize_lib(richtext)
wx_finalize_lib(wxrichtext)

View File

@@ -9,7 +9,11 @@
include(../../source_groups.cmake)
wx_append_sources(STC_FILES STC)
wx_append_sources(STC_FILES STC_CMN)
if(WXOSX_COCOA)
wx_append_sources(STC_FILES STC_OSX_COCOA)
endif()
wx_add_builtin_library(wxscintilla
src/stc/scintilla/lexers/LexA68k.cxx
@@ -163,6 +167,8 @@ target_include_directories(wxscintilla PRIVATE
target_compile_definitions(wxscintilla PUBLIC
NO_CXX11_REGEX
__WX__
SCI_LEXER
LINK_LEXERS
)
if(wxBUILD_PRECOMP)
@@ -170,22 +176,27 @@ if(wxBUILD_PRECOMP)
# standard c++ headers when using clang.
# Do not disable precompiled headers entirely but use the main Scintilla
# header as prefix header so there is at least a small speedup.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(wxSCINTILLA_PREC_HEADER "${wxSOURCE_DIR}/src/stc/scintilla/include/Scintilla.h")
endif()
wx_target_enable_precomp(wxscintilla ${wxSCINTILLA_PREC_HEADER})
endif()
wx_add_library(stc ${STC_FILES})
wx_lib_include_directories(stc PRIVATE
wx_add_library(wxstc ${STC_FILES})
wx_lib_include_directories(wxstc PRIVATE
${wxSOURCE_DIR}/src/stc/scintilla/include
${wxSOURCE_DIR}/src/stc/scintilla/lexlib
${wxSOURCE_DIR}/src/stc/scintilla/src
)
wx_lib_compile_definitions(stc PRIVATE
wx_lib_compile_definitions(wxstc PRIVATE
NO_CXX11_REGEX
__WX__
SCI_LEXER
LINK_LEXERS
)
wx_lib_link_libraries(stc PRIVATE wxscintilla)
wx_lib_link_libraries(wxstc PRIVATE wxscintilla)
if(WXMSW)
wx_lib_link_libraries(wxstc PRIVATE imm32)
endif()
wx_finalize_lib(stc)
wx_finalize_lib(wxstc)

View File

@@ -8,13 +8,8 @@
#############################################################################
if(wxUSE_LIBTIFF STREQUAL "builtin")
# TODO: implement building libtiff via ExternalProject_Add()
if(UNIX AND NOT APPLE)
message(WARNING "Builtin libtiff on unix is currently not supported")
wx_option_force_value(wxUSE_LIBTIFF OFF)
return()
endif()
# TODO: implement building libtiff via its CMake file, using
# add_subdirectory or ExternalProject_Add
if(WIN32)
set(TIFF_PLATFORM_SRC src/tiff/libtiff/tif_win32.c)
elseif(UNIX)

View File

@@ -23,61 +23,77 @@ elseif(APPLE)
wx_append_sources(WEBVIEW_FILES WEBVIEW_OSX_SHARED)
endif()
wx_add_library(webview ${WEBVIEW_FILES})
wx_add_library(wxwebview ${WEBVIEW_FILES})
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
if(wxVERSION_IS_DEV)
set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}.${wxRELEASE_NUMBER}/web-extensions")
else()
set(WX_WEB_EXTENSIONS_DIRECTORY "lib/wx/${wxMAJOR_VERSION}.${wxMINOR_VERSION}/web-extensions")
wx_lib_compile_definitions(webview PRIVATE
-DWX_WEB_EXTENSIONS_DIRECTORY="${CMAKE_INSTALL_PREFIX}/${WX_WEB_EXTENSIONS_DIRECTORY}"
)
endif()
endif()
if(APPLE)
wx_lib_link_libraries(webview PUBLIC "-framework WebKit")
wx_lib_link_libraries(wxwebview PUBLIC "-framework WebKit")
elseif(WXMSW)
if(wxUSE_WEBVIEW_EDGE)
wx_lib_include_directories(wxwebview PRIVATE "${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/include")
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
set(WEBVIEW2_ARCH x86)
else()
set(WEBVIEW2_ARCH x64)
endif()
add_custom_command(TARGET wxwebview POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${PROJECT_SOURCE_DIR}/3rdparty/webview2/build/native/${WEBVIEW2_ARCH}/WebView2Loader.dll"
"$<TARGET_FILE_DIR:wxwebview>/WebView2Loader.dll")
endif()
elseif(WXGTK)
if(LIBSOUP_FOUND)
wx_lib_include_directories(webview PUBLIC ${LIBSOUP_INCLUDE_DIRS})
wx_lib_link_libraries(webview PUBLIC ${LIBSOUP_LIBRARIES})
wx_lib_include_directories(wxwebview PUBLIC ${LIBSOUP_INCLUDE_DIRS})
wx_lib_link_libraries(wxwebview PUBLIC ${LIBSOUP_LIBRARIES})
endif()
if(wxUSE_WEBVIEW_WEBKIT2)
wx_lib_include_directories(webview PUBLIC ${WEBKIT2_INCLUDE_DIR})
wx_lib_link_libraries(webview PUBLIC ${WEBKIT2_LIBRARIES})
wx_lib_include_directories(wxwebview PUBLIC ${WEBKIT2_INCLUDE_DIR})
wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT2_LIBRARIES})
elseif(wxUSE_WEBVIEW_WEBKIT)
wx_lib_include_directories(webview PUBLIC ${WEBKIT_INCLUDE_DIR})
wx_lib_link_libraries(webview PUBLIC ${WEBKIT_LIBRARIES})
wx_lib_include_directories(wxwebview PUBLIC ${WEBKIT_INCLUDE_DIR})
wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT_LIBRARIES})
endif()
endif()
wx_finalize_lib(webview)
wx_finalize_lib(wxwebview)
# webkit extension plugin
# we can't use (all of the) macros and functions because this library should
# always be build as a shared libary, and not included in the monolithic build.
if(WXGTK AND wxUSE_WEBVIEW_WEBKIT2)
wx_append_sources(WEBKIT2_EXT_FILES WEBVIEW_WEBKIT2_EXTENSION)
add_library(webkit2_ext SHARED ${WEBKIT2_EXT_FILES})
wx_set_target_properties(webkit2_ext false)
add_library(wxwebkit2_ext SHARED ${WEBKIT2_EXT_FILES})
wx_set_target_properties(wxwebkit2_ext false)
# Change output name to match expected name in webview_webkit2.cpp: webkit2_ext*
if(wxUSE_UNICODE)
set(lib_unicode u)
endif()
set_target_properties(webkit2_ext PROPERTIES PREFIX "")
set_target_properties(webkit2_ext PROPERTIES
set_target_properties(wxwebkit2_ext PROPERTIES PREFIX "")
set_target_properties(wxwebkit2_ext PROPERTIES
OUTPUT_NAME "webkit2_ext${lib_unicode}-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
OUTPUT_NAME_DEBUG "webkit2_ext${lib_unicode}d-${wxMAJOR_VERSION}.${wxMINOR_VERSION}"
)
target_include_directories(webkit2_ext PUBLIC
target_include_directories(wxwebkit2_ext PUBLIC
${LIBSOUP_INCLUDE_DIRS}
${WEBKIT2_INCLUDE_DIR}
)
target_link_libraries(webkit2_ext PUBLIC
target_link_libraries(wxwebkit2_ext PUBLIC
${LIBSOUP_LIBRARIES}
${WEBKIT2_LIBRARIES}
)
wx_install(TARGETS webkit2_ext LIBRARY DESTINATION ${WX_WEB_EXTENSIONS_DIRECTORY})
wx_install(TARGETS wxwebkit2_ext LIBRARY DESTINATION ${WX_WEB_EXTENSIONS_DIRECTORY})
add_dependencies(webview webkit2_ext)
add_dependencies(wxwebview wxwebkit2_ext)
endif()

View File

@@ -10,8 +10,8 @@
include(../../source_groups.cmake)
wx_append_sources(XML_FILES XML)
wx_add_library(xml IS_BASE ${XML_FILES})
wx_lib_link_libraries(xml PRIVATE ${EXPAT_LIBRARIES})
wx_lib_include_directories(xml PRIVATE ${EXPAT_INCLUDE_DIRS})
wx_add_library(wxxml IS_BASE ${XML_FILES})
wx_lib_link_libraries(wxxml PRIVATE ${EXPAT_LIBRARIES})
wx_lib_include_directories(wxxml PRIVATE ${EXPAT_INCLUDE_DIRS})
wx_finalize_lib(xml)
wx_finalize_lib(wxxml)

View File

@@ -11,7 +11,7 @@ include(../../source_groups.cmake)
wx_append_sources(XRC_FILES XRC)
wx_add_library(xrc ${XRC_FILES})
wx_lib_link_libraries(xrc PRIVATE html xml)
wx_add_library(wxxrc ${XRC_FILES})
wx_lib_link_libraries(wxxrc PRIVATE wxhtml wxxml)
wx_finalize_lib(xrc)
wx_finalize_lib(wxxrc)

View File

@@ -8,6 +8,8 @@
#############################################################################
if(wxUSE_ZLIB STREQUAL "builtin")
# TODO: implement building zlib via its CMake file, using
# add_subdirectory or ExternalProject_Add
wx_add_builtin_library(wxzlib
src/zlib/adler32.c
src/zlib/compress.c

View File

@@ -37,7 +37,7 @@ if(NOT wxBUILD_CUSTOM_SETUP_HEADER_PATH)
include(build/cmake/setup.cmake)
endif()
if(UNIX)
if(NOT MSVC)
# Write wx-config
include(build/cmake/config.cmake)
endif()

View File

@@ -0,0 +1,30 @@
# - Try to find Fontconfig
# Once done this will define
#
# FONTCONFIG_FOUND - system has Fontconfig
# FONTCONFIG_INCLUDE_DIRS - The include directory to use for the Fontconfig headers
# FONTCONFIG_LIBRARIES - Link these to use Fontconfig
find_package(PkgConfig)
pkg_check_modules(PC_FONTCONFIG QUIET fontconfig)
find_path(FONTCONFIG_INCLUDE_DIRS
NAMES fontconfig.h
HINTS ${PC_FONTCONFIG_INCLUDEDIR}
${PC_FONTCONFIG_INCLUDE_DIRS}
PATH_SUFFIXES fontconfig
)
find_library(FONTCONFIG_LIBRARIES
NAMES fontconfig
HINTS ${PC_FONTCONFIG_LIBDIR}
${PC_FONTCONFIG_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FONTCONFIG DEFAULT_MSG FONTCONFIG_INCLUDE_DIRS FONTCONFIG_LIBRARIES)
mark_as_advanced(
FONTCONFIG_INCLUDE_DIRS
FONTCONFIG_LIBRARIES
)

View File

@@ -1,69 +0,0 @@
# - Try to find the Fontconfig
# Once done this will define
#
# FONTCONFIG_FOUND - system has Fontconfig
# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers
# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG
# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG
# Copyright (c) 2006,2007 Laurent Montel, <montel@kde.org>
#
# 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)
# in cache already
set(FONTCONFIG_FOUND TRUE)
else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
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,90 @@
# - Try to find GnomeVFS2
# Once done this will define
#
# GNOMEVFS2_FOUND - system has GnomeVFS2
# GNOMEVFS2_INCLUDE_DIRS - the GnomeVFS2 include directory
# GNOMEVFS2_LIBRARIES - Link these to use GnomeVFS2
# GNOMEVFS2_DEFINITIONS - Compiler switches required for using GnomeVFS2
#
# Copyright (c) 2008 Joshua L. Blocher <verbalshadow@gmail.com>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
# in cache already
set(GNOMEVFS2_FOUND TRUE)
else (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
include(UsePkgConfig)
pkgconfig(gnome-vfs-2.0 _GNOMEVFS2_INCLUDEDIR _GNOMEVFS2_LIBDIR _GNOMEVFS2_LDFLAGS _GNOMEVFS2_CFLAGS)
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(_GNOMEVFS2 gnome-vfs-2.0)
endif (PKG_CONFIG_FOUND)
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
find_path(GNOMEVFS2_INCLUDE_DIR
NAMES
libgnomevfs/gnome-vfs.h
PATHS
${_GNOMEVFS2_INCLUDEDIR}
/usr/include
/usr/local/include
/opt/local/include
/sw/include
$ENV{DEVLIBS_PATH}//include//
PATH_SUFFIXES
gnome-vfs-2.0
)
find_library(GNOMEVFS-2_LIBRARY
NAMES
gnomevfs-2
PATHS
${_GNOMEVFS2_LIBDIR}
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
if (GNOMEVFS-2_LIBRARY)
set(GNOMEVFS-2_FOUND TRUE)
endif (GNOMEVFS-2_LIBRARY)
set(GNOMEVFS2_INCLUDE_DIRS
${GNOMEVFS2_INCLUDE_DIR}
)
if (GNOMEVFS-2_FOUND)
set(GNOMEVFS2_LIBRARIES
${GNOMEVFS2_LIBRARIES}
${GNOMEVFS-2_LIBRARY}
)
endif (GNOMEVFS-2_FOUND)
if (GNOMEVFS2_INCLUDE_DIRS AND GNOMEVFS2_LIBRARIES)
set(GNOMEVFS2_FOUND TRUE)
endif (GNOMEVFS2_INCLUDE_DIRS AND GNOMEVFS2_LIBRARIES)
if (GNOMEVFS2_FOUND)
if (NOT GNOMEVFS2_FIND_QUIETLY)
message(STATUS "Found GnomeVFS2: ${GNOMEVFS2_LIBRARIES}")
endif (NOT GNOMEVFS2_FIND_QUIETLY)
else (GNOMEVFS2_FOUND)
if (GnomeVFS2_FIND_REQUIRED)
message(FATAL_ERROR "Could not find GnomeVFS2")
endif (GNOMEVFS2_FIND_REQUIRED)
endif (GNOMEVFS2_FOUND)
# show the GNOMEVFS2_INCLUDE_DIRS and GNOMEVFS2_LIBRARIES variables only in the advanced view
mark_as_advanced(GNOMEVFS2_INCLUDE_DIRS GNOMEVFS2_LIBRARIES)
endif (GNOMEVFS2_LIBRARIES AND GNOMEVFS2_INCLUDE_DIRS)

View File

@@ -51,7 +51,7 @@ find_package(PkgConfig)
# Determine the version in the library name, default is 1.0
set(GST_LIB_VERSION 1.0)
if(DEFINED GStreamer_FIND_VERSION AND GStreamer_FIND_VERSION VERSION_LESS 1.0)
if(DEFINED GSTREAMER_FIND_VERSION AND GSTREAMER_FIND_VERSION VERSION_LESS 1.0)
set(GST_LIB_VERSION 0.10)
endif()
@@ -120,7 +120,7 @@ FIND_GSTREAMER_COMPONENT(GSTREAMER_PLAYER gstreamer-player gst/player/player.h g
# ------------------------------------------------
set(_GSTREAMER_REQUIRED_VARS GSTREAMER_VERSION GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)
foreach (_component ${GStreamer_FIND_COMPONENTS})
foreach (_component ${GSTREAMER_FIND_COMPONENTS})
set(_gst_component "GSTREAMER_${_component}")
string(TOUPPER ${_gst_component} _UPPER_NAME)
@@ -128,4 +128,4 @@ foreach (_component ${GStreamer_FIND_COMPONENTS})
endforeach ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG ${_GSTREAMER_REQUIRED_VARS})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSTREAMER DEFAULT_MSG ${_GSTREAMER_REQUIRED_VARS})

View File

@@ -42,5 +42,9 @@ set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
# Check for GDK Wayland support
include(CheckSymbolExists)
set(CMAKE_REQUIRED_INCLUDES ${GTK3_INCLUDE_DIRS})
check_symbol_exists(GDK_WINDOWING_WAYLAND "gdk/gdk.h" wxHAVE_GDK_WAYLAND)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK3 DEFAULT_MSG GTK3_INCLUDE_DIRS GTK3_LIBRARIES VERSION_OK)

View File

@@ -0,0 +1,46 @@
# - Try to find GTK+ 4
# Once done, this will define
#
# GTK4_FOUND - system has GTK+ 4.
# GTK4_INCLUDE_DIRS - the GTK+ 4. include directories
# GTK4_LIBRARIES - link these to use GTK+ 4.
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
# Copyright (C) 2013 Igalia S.L.
#
# 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 above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``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 COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS 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.
find_package(PkgConfig)
pkg_check_modules(GTK4 QUIET gtk4)
set(VERSION_OK TRUE)
if (GTK4_VERSION)
if (GTK4_FIND_VERSION_EXACT)
if (NOT("${GTK4_FIND_VERSION}" VERSION_EQUAL "${GTK4_VERSION}"))
set(VERSION_OK FALSE)
endif ()
else ()
if ("${GTK4_VERSION}" VERSION_LESS "${GTK4_FIND_VERSION}")
set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK4 DEFAULT_MSG GTK4_INCLUDE_DIRS GTK4_LIBRARIES VERSION_OK)

View File

@@ -25,6 +25,7 @@ ENDIF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
set(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES})
set(CMAKE_REQUIRED_QUIET ON)
IF(ICONV_FOUND)
check_cxx_source_compiles("
#include <iconv.h>
@@ -41,15 +42,16 @@ IF(ICONV_FOUND)
ENDIF(ICONV_FOUND)
set(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_REQUIRED_LIBRARIES)
set(CMAKE_REQUIRED_QUIET)
IF(ICONV_FOUND)
IF(NOT ICONV_FIND_QUIETLY)
MESSAGE(STATUS "Found Iconv: ${ICONV_LIBRARIES}")
ENDIF(NOT ICONV_FIND_QUIETLY)
ELSE(ICONV_FOUND)
IF(Iconv_FIND_REQUIRED)
IF(ICONV_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Iconv")
ENDIF(Iconv_FIND_REQUIRED)
ENDIF(ICONV_FIND_REQUIRED)
ENDIF(ICONV_FOUND)
MARK_AS_ADVANCED(

View File

@@ -0,0 +1,55 @@
# - Try to find LibNotify
# This module defines the following variables:
#
# LIBNOTIFY_FOUND - LibNotify was found
# LIBNOTIFY_INCLUDE_DIRS - the LibNotify include directories
# LIBNOTIFY_LIBRARIES - link these to use LibNotify
#
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
# Copyright (C) 2014 Collabora Ltd.
#
# 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 above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``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 COPYRIGHT HOLDER OR ITS
# CONTRIBUTORS 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.
find_package(PkgConfig)
pkg_check_modules(LIBNOTIFY QUIET libnotify)
find_path(LIBNOTIFY_INCLUDE_DIRS
NAMES notify.h
HINTS ${LIBNOTIFY_INCLUDEDIR}
${LIBNOTIFY_INCLUDE_DIRS}
PATH_SUFFIXES libnotify
)
find_library(LIBNOTIFY_LIBRARIES
NAMES notify
HINTS ${LIBNOTIFY_LIBDIR}
${LIBNOTIFY_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBNOTIFY REQUIRED_VARS LIBNOTIFY_INCLUDE_DIRS LIBNOTIFY_LIBRARIES
VERSION_VAR LIBNOTIFY_VERSION)
mark_as_advanced(
LIBNOTIFY_INCLUDE_DIRS
LIBNOTIFY_LIBRARIES
)

View File

@@ -50,7 +50,7 @@ if(PC_LIBSOUP_FOUND)
endif()
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibSoup REQUIRED_VARS LIBSOUP_INCLUDE_DIRS LIBSOUP_LIBRARIES
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSOUP REQUIRED_VARS LIBSOUP_INCLUDE_DIRS LIBSOUP_LIBRARIES
VERSION_VAR PC_LIBSOUP_VERSION)
mark_as_advanced(LIBSOUP_LIBRARIES LIBSOUP_INCLUDE_DIRS)

View File

@@ -0,0 +1,40 @@
## FindMSPACK.cmake
##
## Copyright (C) 2016 Christian Schenk
##
## This file is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published
## by the Free Software Foundation; either version 2, or (at your
## option) any later version.
##
## This file is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this file; if not, write to the Free Software
## Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
## USA.
find_path(MSPACK_INCLUDE_DIR
NAMES
mspack.h
)
find_library(MSPACK_LIBRARY
NAMES
mspack
)
find_package_handle_standard_args(MSPACK DEFAULT_MSG MSPACK_LIBRARY MSPACK_INCLUDE_DIR)
if(MSPACK_FOUND)
set(MSPACK_INCLUDE_DIRS ${MSPACK_INCLUDE_DIR})
set(MSPACK_LIBRARIES ${MSPACK_LIBRARY})
else()
set(MSPACK_INCLUDE_DIRS)
set(MSPACK_LIBRARIES)
endif()
mark_as_advanced(MSPACK_LIBRARY MSPACK_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

@@ -0,0 +1,18 @@
find_package(PkgConfig)
pkg_check_modules(WAYLANDEGL QUIET wayland-egl)
set(VERSION_OK TRUE)
if (WAYLANDEGL_VERSION)
if (WAYLANDEGL_FIND_VERSION_EXACT)
if (NOT("${WAYLANDEGL_FIND_VERSION}" VERSION_EQUAL "${WAYLANDEGL_VERSION}"))
set(VERSION_OK FALSE)
endif ()
else ()
if ("${WAYLANDEGL_VERSION}" VERSION_LESS "${WAYLANDEGL_FIND_VERSION}")
set(VERSION_OK FALSE)
endif ()
endif ()
endif ()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLANDEGL DEFAULT_MSG WAYLANDEGL_LIBRARIES VERSION_OK)

View File

@@ -6,8 +6,8 @@
# WEBKIT_FOUND - True if Webkit found.
SET(WEBKIT_VERSION 1.0)
if(DEFINED Webkit_FIND_VERSION)
SET(WEBKIT_VERSION ${Webkit_FIND_VERSION})
if(DEFINED WEBKIT_FIND_VERSION)
SET(WEBKIT_VERSION ${WEBKIT_FIND_VERSION})
endif()
SET(WEBKIT_INCLUDE_DIR WEBKIT_INCLUDE_DIR-NOTFOUND)

View File

@@ -9,6 +9,7 @@ SET( WEBKIT2_VERSION 4.0)
set(WEBKIT2_INCLUDE_DIR WEBKIT2_INCLUDE_DIR-NOTFOUND)
set(WEBKIT2_LIBRARY WEBKIT2_LIBRARY-NOTFOUND)
set(WEBKIT2_JS_LIBRARY WEBKIT2_JS_LIBRARY-NOTFOUND)
set(WEBKIT2_LIBRARIES WEBKIT2_LIBRARIES-NOTFOUND)
FIND_PATH(WEBKIT2_INCLUDE_DIR webkit2/webkit2.h
@@ -20,6 +21,11 @@ FIND_LIBRARY(WEBKIT2_LIBRARY
NAMES ${WEBKIT2_NAMES}
)
SET(WEBKIT2_JS_NAMES "javascriptcoregtk-${WEBKIT2_VERSION}")
FIND_LIBRARY(WEBKIT2_JS_LIBRARY
NAMES ${WEBKIT2_JS_NAMES}
)
# Handle the QUIETLY and REQUIRED arguments and set WEBKIT2_FOUND to
# TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
@@ -29,7 +35,7 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
)
IF(WEBKIT2_FOUND)
SET( WEBKIT2_LIBRARIES ${WEBKIT2_LIBRARY} )
SET( WEBKIT2_LIBRARIES ${WEBKIT2_LIBRARY} ${WEBKIT2_JS_LIBRARY} )
ELSE(WEBKIT2_FOUND)
SET( WEBKIT2_LIBRARIES )
ENDIF(WEBKIT2_FOUND)

View File

@@ -0,0 +1,51 @@
# - Find XTEST
# Find the XTEST libraries
#
# This module defines the following variables:
# XTEST_FOUND - true if XTEST_INCLUDE_DIR & XTEST_LIBRARY are found
# XTEST_LIBRARIES - Set when XTEST_LIBRARY is found
# XTEST_INCLUDE_DIRS - Set when XTEST_INCLUDE_DIR is found
#
# XTEST_INCLUDE_DIR - where to find XTest.h, etc.
# XTEST_LIBRARY - the XTEST library
#
#=============================================================================
# Copyright 2011 O.S. Systems Software Ltda.
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================
find_path(XTEST_INCLUDE_DIR NAMES X11/extensions/XTest.h
PATH_SUFFIXES X11/extensions
PATHS /opt/X11/include
DOC "The XTest include directory"
)
find_library(XTEST_LIBRARY NAMES Xtst
PATHS /opt/X11/lib
DOC "The XTest library"
)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XTEST DEFAULT_MSG XTEST_LIBRARY XTEST_INCLUDE_DIR)
if(XTEST_FOUND)
set( XTEST_LIBRARIES ${XTEST_LIBRARY} )
set( XTEST_INCLUDE_DIRS ${XTEST_INCLUDE_DIR} )
endif()
mark_as_advanced(XTEST_INCLUDE_DIR XTEST_LIBRARY)

View File

@@ -1551,7 +1551,8 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
endif()
endif()
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
# -H print the name of each header file used
# -E invoke preprocessor
@@ -1564,7 +1565,7 @@ function (cotire_add_makedep_flags _language _compilerID _compilerVersion _flags
# return as a flag string
set (_flags "-H -E -fno-color-diagnostics -Xclang -Eonly")
endif()
elseif (WIN32)
else()
# Clang-cl.exe options used
# /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
@@ -1671,7 +1672,8 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
set (_flags "-x ${_xLanguage_${_language}} -c \"${_prefixFile}\" -o \"${_pchFile}\"")
endif()
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
# -x specify the source language
# -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")
endif()
endif()
elseif (WIN32)
else()
# Clang-cl.exe options used
# /Yc creates a precompiled header file
# /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}\"")
endif()
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
# -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
@@ -1841,7 +1844,7 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
# return as a flag string
set (_flags "-include \"${_prefixFile}\"")
endif()
elseif (WIN32)
else()
# Clang-cl.exe options used
# /Yu uses a precompiled header file during build
# /Fp specifies precompiled header binary file name
@@ -2006,15 +2009,12 @@ function (cotire_check_precompiled_header_support _language _target _msgVar)
set (${_msgVar} "" PARENT_SCOPE)
endif()
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
set (${_msgVar} "" PARENT_SCOPE)
elseif (WIN32)
# only clang-cl is supported 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()
else()
# clang-cl under Windows
endif()
elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Intel")
# 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)
set (_sourceFiles ${ARGN})
get_filename_component(_compilerName "${CMAKE_${_language}_COMPILER}" NAME_WE)
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
# the remaining files include the precompiled header, see cotire_setup_pch_file_inclusion
if (_sourceFiles)
@@ -2428,8 +2429,9 @@ function (cotire_setup_pch_file_compilation _language _target _targetScript _pre
endfunction()
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
(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
# the host file does the precompiled header compilation, see cotire_setup_pch_file_compilation
set (_sourceFiles ${ARGN})
@@ -2578,8 +2580,9 @@ function (cotire_setup_target_pch_usage _languages _target _wholeTarget)
set (_language "${_languages}")
# for MSVC, Intel and clang-cl, precompiled header inclusion is always done on the source file level
# 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
(WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "Clang"))
(WIN32 AND _compilerName MATCHES "cl$"))
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER)
if (_prefixFile)
get_property(_pchFile TARGET ${_target} PROPERTY COTIRE_${_language}_PRECOMPILED_HEADER)
@@ -3071,8 +3074,9 @@ function (cotire_setup_pch_target _languages _configurations _target)
set (_dependsFiles "")
foreach (_language ${_languages})
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
(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
list (INSERT _props 0 COTIRE_${_language}_PRECOMPILED_HEADER)
endif()

View File

@@ -0,0 +1,21 @@
# cotire example project
cmake_minimum_required(VERSION 2.8.12)
if (POLICY CMP0058)
# Ninja requires custom command byproducts to be explicit
cmake_policy(SET CMP0058 NEW)
endif()
project (CotireExample)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/..")
if (NOT CMAKE_VERSION VERSION_LESS "3.1.0")
set (CMAKE_CXX_STANDARD "98")
set (CMAKE_CXX_EXTENSIONS OFF)
endif()
include(cotire)
add_subdirectory(src)

View File

@@ -0,0 +1,22 @@
Copyright (c) 2012-2018 Sascha Kratky
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,31 @@
# cotire example project
add_executable(example main.cpp example.cpp log.cpp log.h example.h)
# enable warnings
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set_target_properties(example PROPERTIES COMPILE_FLAGS "-Weverything")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set_target_properties(example PROPERTIES COMPILE_FLAGS "-Wall -Wextra")
endif()
cotire(example)
# cotire sets the following properties
get_target_property(_unitySource example COTIRE_CXX_UNITY_SOURCE)
get_target_property(_prefixHeader example COTIRE_CXX_PREFIX_HEADER)
get_target_property(_precompiledHeader example COTIRE_CXX_PRECOMPILED_HEADER)
get_target_property(_unityTargetName example COTIRE_UNITY_TARGET_NAME)
if (_unitySource)
message(STATUS "example unity source: ${_unitySource}")
endif()
if (_prefixHeader)
message(STATUS "example prefix header: ${_prefixHeader}")
endif()
if (_precompiledHeader)
message(STATUS "example precompiled header: ${_precompiledHeader}")
endif()
if (TARGET ${_unityTargetName})
message(STATUS "example unity target: ${_unityTargetName}")
endif()

View File

@@ -0,0 +1,24 @@
// cotire example project
#include "example.h"
#ifndef NDEBUG
#include <algorithm>
#include <iterator>
#endif
namespace example {
std::string get_message() {
char msg_chrs[] = { 'C', 'o', 't', 'i', 'r', 'e', 'd', '!' };
#ifdef NDEBUG
return std::string(&msg_chrs[0], &msg_chrs[sizeof(msg_chrs)]);
#else
std::string msg;
msg.reserve(sizeof(msg_chrs));
std::copy(msg_chrs, msg_chrs + sizeof(msg_chrs), std::back_inserter(msg));
return msg;
#endif
}
}

View File

@@ -0,0 +1,10 @@
// cotire example project
#include <string>
namespace example {
std::string get_message();
}

View File

@@ -0,0 +1,17 @@
// cotire example project
#include "log.h"
#include <iostream>
namespace logging {
void error(const std::string& msg) {
std::cerr << msg << std::endl;
}
void info(const std::string& msg) {
std::cout << msg << std::endl;
}
}

View File

@@ -0,0 +1,10 @@
// cotire example project
#include <string>
namespace logging {
void error(const std::string& msg);
void info(const std::string& msg);
}

View File

@@ -0,0 +1,12 @@
// cotire example project main
#include <string>
#include "example.h"
#include "log.h"
int main()
{
std::string msg = example::get_message();
logging::info(msg);
}

View File

@@ -23,29 +23,54 @@ wx_option(wxBUILD_COMPATIBILITY
set(wxBUILD_CUSTOM_SETUP_HEADER_PATH "" CACHE PATH "Include path containing custom wx/setup.h")
mark_as_advanced(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
if(WIN32)
wx_option(wxUSE_DPI_AWARE_MANIFEST "DPI Awareness" "per-monitor" STRINGS "none" "system" "per-monitor")
endif()
wx_option(wxBUILD_DEBUG_LEVEL "Debug Level" Default STRINGS Default 0 1 2)
mark_as_advanced(wxBUILD_DEBUG_LEVEL)
if(MSVC)
if(NOT APPLE)
wx_option(wxBUILD_USE_STATIC_RUNTIME "Link using the static runtime library" OFF)
endif()
if(MSVC)
wx_option(wxBUILD_MSVC_MULTIPROC "Enable multi-processor compilation for MSVC")
else()
# Other compilers support setting the C++ standard, present it an option to the user
endif()
if(NOT MSVC OR MSVC_VERSION GREATER 1800)
# support setting the C++ standard, present it an option to the user
if(DEFINED CMAKE_CXX_STANDARD)
set(wxCXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD})
else()
set(wxCXX_STANDARD_DEFAULT COMPILER_DEFAULT)
endif()
wx_option(wxBUILD_CXX_STANDARD "C++ standard used to build wxWidgets targets"
${wxCXX_STANDARD_DEFAULT} STRINGS COMPILER_DEFAULT 98 11 14 17)
${wxCXX_STANDARD_DEFAULT} STRINGS COMPILER_DEFAULT 98 11 14 17 20)
endif()
if(WIN32)
set(wxBUILD_VENDOR "custom" CACHE STRING "Short string identifying your company (used in DLL name)")
endif()
set(wxBUILD_FLAVOUR "" CACHE STRING "Specify a name to identify the build")
mark_as_advanced(wxBUILD_FLAVOUR)
wx_option(wxBUILD_OPTIMISE "use speed-optimised C/C++ compiler flags for release build" OFF)
mark_as_advanced(wxBUILD_OPTIMISE)
if(MSVC)
set(wxBUILD_STRIPPED_RELEASE_DEFAULT OFF)
else()
set(wxBUILD_STRIPPED_RELEASE_DEFAULT ON)
endif()
wx_option(wxBUILD_STRIPPED_RELEASE "remove debug symbols in release build" ${wxBUILD_STRIPPED_RELEASE_DEFAULT})
mark_as_advanced(wxBUILD_STRIPPED_RELEASE)
wx_option(wxBUILD_PIC "Enable position independent code (PIC)." ON)
mark_as_advanced(wxBUILD_PIC)
wx_option(wxUSE_NO_RTTI "disable RTTI support" OFF)
# STL options
wx_option(wxUSE_STL "use standard C++ classes for everything" OFF)
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_STL "use C++ STL classes")
wx_dependent_option(wxUSE_STD_CONTAINERS "use standard C++ container classes" ON "wxUSE_STL" OFF)
wx_option(wxUSE_UNICODE "compile with Unicode support (NOT RECOMMENDED to be turned off)")
@@ -55,7 +80,9 @@ if(NOT WIN32)
endif()
wx_option(wxUSE_COMPILER_TLS "enable use of compiler TLS support")
if(NOT WIN32)
wx_option(wxUSE_VISIBILITY "use of ELF symbols visibility")
endif()
wx_option(wxUSE_UNSAFE_WXSTRING_CONV "provide unsafe implicit conversions in wxString to const char* or std::string")
wx_option(wxUSE_REPRODUCIBLE_BUILD "enable reproducable build" OFF)
@@ -74,10 +101,18 @@ wx_option(wxUSE_LIBLZMA "use LZMA compression" OFF)
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBLZMA "use liblzma for LZMA compression")
wx_option(wxUSE_OPENGL "use OpenGL (or Mesa)")
wx_option(wxUSE_LIBSDL "use SDL for audio on Unix")
if(NOT WIN32)
if(UNIX)
wx_option(wxUSE_LIBSDL "use SDL for audio on Unix")
wx_option(wxUSE_LIBICONV "use libiconv (character conversion)")
wx_option(wxUSE_LIBNOTIFY "use libnotify for notifications")
wx_option(wxUSE_XTEST "use XTest extension")
wx_option(wxUSE_LIBMSPACK "use libmspack (CHM help files loading)")
wx_option(wxUSE_LIBGNOMEVFS "use GNOME VFS for associating MIME types")
wx_option(wxUSE_GLCANVAS_EGL "use EGL backend for wxGLCanvas")
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBSDL "use SDL for audio on Unix")
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_LIBMSPACK "use libmspack (CHM help files loading)")
endif()
# ---------------------------------------------------------------------------
@@ -182,6 +217,7 @@ if(WIN32)
endif()
wx_option(wxUSE_DBGHELP "use dbghelp.dll API" ${wxUSE_DBGHELP_DEFAULT})
wx_option(wxUSE_INICONF "use wxIniConfig")
wx_option(wxUSE_WINSOCK2 "include <winsock2.h> rather than <winsock.h>" OFF)
wx_option(wxUSE_REGKEY "use wxRegKey class")
endif()
@@ -277,8 +313,9 @@ wx_option(wxUSE_COMBOBOX "use wxComboBox class")
wx_option(wxUSE_COMBOCTRL "use wxComboCtrl class")
wx_option(wxUSE_COMMANDLINKBUTTON "use wxCommmandLinkButton class")
wx_option(wxUSE_DATAVIEWCTRL "use wxDataViewCtrl class")
wx_option(wxUSE_NATIVE_DATAVIEWCTRL "use the native wxDataViewCtrl if available")
wx_option(wxUSE_DATEPICKCTRL "use wxDatePickerCtrl class")
wx_option(wxUSE_DETECT_SM "_sm use code to detect X11 session manager")
wx_option(wxUSE_DETECT_SM "use code to detect X11 session manager" OFF)
wx_option(wxUSE_DIRPICKERCTRL "use wxDirPickerCtrl class")
wx_option(wxUSE_DISPLAY "use wxDisplay class")
wx_option(wxUSE_EDITABLELISTBOX "use wxEditableListBox class")
@@ -360,7 +397,8 @@ wx_option(wxUSE_WIZARDDLG "use wxWizard")
# misc GUI options
# ---------------------------------------------------------------------------
wx_option(wxUSE_MENUS "use wxMenu/wxMenuBar/wxMenuItem classes")
wx_option(wxUSE_MENUS "use wxMenu and wxMenuItem classes")
wx_option(wxUSE_MENUBAR "use wxMenuBar class")
wx_option(wxUSE_MINIFRAME "use wxMiniFrame class")
wx_option(wxUSE_TOOLTIPS "use wxToolTip class")
wx_option(wxUSE_SPLINES "use spline drawing code")
@@ -410,6 +448,7 @@ if(WIN32)
wx_option(wxUSE_TASKBARICON_BALLOONS "enable wxTaskBarIcon::ShowBalloon() method (Win32 only)")
wx_option(wxUSE_UXTHEME "enable support for Windows XP themed look (Win32 only)")
wx_option(wxUSE_WEBVIEW_IE "use wxWebView IE backend (Win32 only)")
wx_option(wxUSE_WEBVIEW_EDGE "use wxWebView Edge (Chromium) backend (Windows 7+ only)" OFF)
wx_option(wxUSE_WXDIB "use wxDIB class (Win32 only)")
if(MSVC_VERSION GREATER 1600 AND NOT CMAKE_VS_PLATFORM_TOOLSET MATCHES "_xp$")
set(wxUSE_WINRT_DEFAULT ON)

View File

@@ -1,5 +1,5 @@
#############################################################################
# Name: CMakeLists.txt
# Name: build/cmake/policies.cmake
# Purpose: CMake policies for wxWidgets
# Author: Tobias Taschner
# Created: 2016-10-21
@@ -10,12 +10,17 @@
# Please keep the policies in the order of their numbers.
if(POLICY CMP0025)
# Compiler id for Apple Clang is now AppleClang
# Compiler id for Apple Clang is now AppleClang.
cmake_policy(SET CMP0025 NEW)
endif()
if(POLICY CMP0028)
# Double colon in target name means ALIAS or IMPORTED target.
cmake_policy(SET CMP0028 NEW)
endif()
if(POLICY CMP0038)
# targets may not link directly to themselves
# Targets may not link directly to themselves.
cmake_policy(SET CMP0038 NEW)
endif()
@@ -25,27 +30,32 @@ if(POLICY CMP0042)
endif()
if(POLICY CMP0045)
# error on non-existent target in get_target_property
# Error on non-existent target in get_target_property.
cmake_policy(SET CMP0045 NEW)
endif()
if(POLICY CMP0046)
# error on non-existent dependency in add_dependencies
# Error on non-existent dependency in add_dependencies.
cmake_policy(SET CMP0046 NEW)
endif()
if(POLICY CMP0048)
# The project() command manages VERSION variables.
cmake_policy(SET CMP0048 NEW)
endif()
if(POLICY CMP0049)
# do not expand variables in target source entries
# Do not expand variables in target source entries.
cmake_policy(SET CMP0049 NEW)
endif()
if(POLICY CMP0053)
# simplify variable reference and escape sequence evaluation
# Simplify variable reference and escape sequence evaluation.
cmake_policy(SET CMP0053 NEW)
endif()
if(POLICY CMP0054)
# only interpret if() arguments as variables or keywords when unquoted
# Only interpret if() arguments as variables or keywords when unquoted.
cmake_policy(SET CMP0054 NEW)
endif()
@@ -58,3 +68,8 @@ if(POLICY CMP0072)
# FindOpenGL prefers GLVND by default when available.
cmake_policy(SET CMP0072 NEW)
endif()
if(POLICY CMP0092)
# MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
cmake_policy(SET CMP0092 NEW)
endif()

View File

@@ -11,7 +11,7 @@ wx_add_sample(access accesstest.cpp DEPENDS wxUSE_ACCESSIBILITY)
wx_add_sample(animate anitest.cpp anitest.h DATA throbber.gif hourglass.ani DEPENDS wxUSE_ANIMATIONCTRL)
wx_add_sample(archive CONSOLE)
wx_add_sample(artprov arttest.cpp artbrows.cpp artbrows.h)
wx_add_sample(aui auidemo.cpp LIBRARIES aui html NAME auidemo DEPENDS wxUSE_AUI)
wx_add_sample(aui auidemo.cpp LIBRARIES wxaui wxhtml NAME auidemo DEPENDS wxUSE_AUI)
wx_add_sample(calendar RES calendar.rc DEPENDS wxUSE_CALENDARCTRL)
wx_add_sample(caret DEPENDS wxUSE_CARET)
wx_add_sample(clipboard DEPENDS wxUSE_CLIPBOARD)
@@ -21,7 +21,7 @@ wx_add_sample(config conftest.cpp DEPENDS wxUSE_CONFIG)
wx_add_sample(console CONSOLE IMPORTANT)
wx_add_sample(dataview IMPORTANT dataview.cpp mymodels.cpp mymodels.h DEPENDS wxUSE_DATAVIEWCTRL)
if(wxUSE_ON_FATAL_EXCEPTION AND (NOT WIN32 OR MSVC))
wx_add_sample(debugrpt LIBRARIES qa DEPENDS wxUSE_DEBUGREPORT)
wx_add_sample(debugrpt LIBRARIES wxqa DEPENDS wxUSE_DEBUGREPORT)
endif()
set(SAMPLE_DIALOGS_SRC dialogs.cpp dialogs.h)
if(NOT wxBUILD_SHARED AND (WXMSW OR APPLE)) # AND NOT WXUNIV
@@ -34,17 +34,17 @@ if(WXGTK2)
wx_list_add_prefix(SAMPLE_DIALOGS_SRC ../../src/generic/ filedlgg.cpp)
endif()
wx_add_sample(dialogs ${SAMPLE_DIALOGS_SRC} DATA tips.txt)
wx_add_sample(dialup nettest.cpp LIBRARIES net DEPENDS wxUSE_DIALUP_MANAGER)
wx_add_sample(display DEPENDS wxUSE_DISPLAY)
wx_add_sample(dialup nettest.cpp LIBRARIES wxnet DEPENDS wxUSE_DIALUP_MANAGER)
wx_add_sample(display)
wx_add_sample(dnd dnd.cpp RES dnd.rc DATA wxwin.png DEPENDS wxUSE_DRAG_AND_DROP)
wx_add_sample(docview docview.cpp doc.cpp view.cpp docview.h doc.h view.h
RES docview.rc LIBRARIES aui DEPENDS wxUSE_DOC_VIEW_ARCHITECTURE)
RES docview.rc LIBRARIES wxaui DEPENDS wxUSE_DOC_VIEW_ARCHITECTURE)
wx_add_sample(dragimag dragimag.cpp dragimag.h RES dragimag.rc
DATA backgrnd.png shape01.png shape02.png shape03.png
DEPENDS wxUSE_DRAGIMAGE)
wx_add_sample(drawing DATA pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp)
wx_add_sample(drawing DATA pat4.bmp pat35.bmp pat36.bmp image.bmp mask.bmp NAME drawingsample)
wx_add_sample(erase)
wx_add_sample(event event.cpp gestures.cpp gestures.h)
wx_add_sample(event event.cpp gestures.cpp gestures.h chessboard.cpp chessboard.h)
wx_add_sample(except DEPENDS wxUSE_EXCEPTIONS)
wx_add_sample(exec)
wx_add_sample(font DATA wxprivate.ttf)
@@ -55,7 +55,7 @@ wx_list_add_prefix(HELP_DOC_FILES doc/
aindex.html down.gif dxxgifs.tex HIER.html icon1.gif icon2.gif index.html
logo.gif wx204.htm wx34.htm wxExtHelpController.html wxhelp.map wx.htm
)
wx_add_sample(help demo.cpp LIBRARIES html
wx_add_sample(help demo.cpp LIBRARIES wxhtml
DATA
back.gif bullet.bmp contents.gif cshelp.txt doc.chm doc.cnt doc.hhc
doc.hhk doc.hhp doc.hlp doc.hpj doc.zip forward.gif up.gif
@@ -63,7 +63,7 @@ wx_add_sample(help demo.cpp LIBRARIES html
NAME helpdemo
DEPENDS wxUSE_HELP
)
wx_add_sample(htlbox LIBRARIES html DEPENDS wxUSE_HTML)
wx_add_sample(htlbox LIBRARIES wxhtml DEPENDS wxUSE_HTML)
if(wxUSE_HTML)
include(html.cmake)
endif()
@@ -71,42 +71,42 @@ wx_add_sample(image image.cpp canvas.cpp canvas.h cursor_png.c RES image.rc
DATA horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm
horse_ag.pnm horse_rg.pnm horse.tif horse.tga horse.xpm horse.cur
horse.ico horse3.ani smile.xbm toucan.png cmyk.jpg cursor.png
DEPENDS wxUSE_IMAGE)
NAME imagesample DEPENDS wxUSE_IMAGE)
foreach(lang ar bg cs de fr it ka pl ru sv ja ja_JP.EUC-JP)
list(APPEND INTERNAT_DATA_FILES ${lang}/internat.po ${lang}/internat.mo)
endforeach()
wx_add_sample(internat DATA ${INTERNAT_DATA_FILES} DEPENDS wxUSE_INTL)
# IPC samples
set(wxSAMPLE_FOLDER ipc)
wx_add_sample(ipc client.cpp client.h connection.h ipcsetup.h NAME ipcclient LIBRARIES net DEPENDS wxUSE_IPC)
wx_add_sample(ipc server.cpp server.h connection.h ipcsetup.h NAME ipcserver LIBRARIES net DEPENDS wxUSE_IPC)
wx_add_sample(ipc CONSOLE baseclient.cpp connection.h ipcsetup.h NAME baseipcclient LIBRARIES net DEPENDS wxUSE_IPC)
wx_add_sample(ipc CONSOLE baseserver.cpp connection.h ipcsetup.h NAME baseipcserver LIBRARIES net DEPENDS wxUSE_IPC)
wx_add_sample(ipc client.cpp client.h connection.h ipcsetup.h NAME ipcclient LIBRARIES wxnet DEPENDS wxUSE_IPC)
wx_add_sample(ipc server.cpp server.h connection.h ipcsetup.h NAME ipcserver LIBRARIES wxnet DEPENDS wxUSE_IPC)
wx_add_sample(ipc CONSOLE baseclient.cpp connection.h ipcsetup.h NAME baseipcclient LIBRARIES wxnet DEPENDS wxUSE_IPC)
wx_add_sample(ipc CONSOLE baseserver.cpp connection.h ipcsetup.h NAME baseipcserver LIBRARIES wxnet DEPENDS wxUSE_IPC)
set(wxSAMPLE_FOLDER)
wx_add_sample(joytest joytest.cpp joytest.h DATA buttonpress.wav DEPENDS wxUSE_JOYSTICK)
wx_add_sample(keyboard)
wx_add_sample(layout layout.cpp layout.h)
wx_add_sample(listctrl listtest.cpp listtest.h RES listtest.rc DEPENDS wxUSE_LISTCTRL)
wx_add_sample(mdi mdi.cpp mdi.h RES mdi.rc DEPENDS wxUSE_MDI wxUSE_DOC_VIEW_ARCHITECTURE wxUSE_MDI_ARCHITECTURE)
wx_add_sample(mediaplayer LIBRARIES media DEPENDS wxUSE_MEDIACTRL)
wx_add_sample(mediaplayer LIBRARIES wxmedia DEPENDS wxUSE_MEDIACTRL)
wx_add_sample(memcheck)
wx_add_sample(menu DEPENDS wxUSE_MENUS)
wx_add_sample(menu DEPENDS wxUSE_MENUS wxUSE_MENUBAR)
wx_add_sample(minimal IMPORTANT)
wx_add_sample(notebook notebook.cpp notebook.h LIBRARIES aui DEPENDS wxUSE_NOTEBOOK)
wx_add_sample(notebook notebook.cpp notebook.h LIBRARIES wxaui DEPENDS wxUSE_NOTEBOOK)
if(wxUSE_OPENGL)
set(wxSAMPLE_SUBDIR opengl/)
set(wxSAMPLE_FOLDER OpenGL)
wx_add_sample(cube cube.cpp cube.h LIBRARIES gl)
wx_add_sample(isosurf isosurf.cpp isosurf.h LIBRARIES gl DATA isosurf.dat.gz)
wx_add_sample(cube cube.cpp cube.h LIBRARIES wxgl)
wx_add_sample(isosurf isosurf.cpp isosurf.h LIBRARIES wxgl DATA isosurf.dat.gz)
wx_add_sample(penguin
penguin.cpp dxfrenderer.cpp trackball.c
dxfrenderer.h penguin.h trackball.h
LIBRARIES gl
LIBRARIES wxgl
DATA penguin.dxf.gz)
wx_add_sample(pyramid
pyramid.cpp oglstuff.cpp mathstuff.cpp oglpfuncs.cpp
pyramid.h oglstuff.h mathstuff.h oglpfuncs.h
LIBRARIES gl)
LIBRARIES wxgl)
set(wxSAMPLE_SUBDIR)
set(wxSAMPLE_FOLDER)
endif()
@@ -116,30 +116,30 @@ wx_add_sample(power)
wx_add_sample(preferences DEPENDS wxUSE_PREFERENCES_EDITOR)
wx_add_sample(printing printing.cpp printing.h DEPENDS wxUSE_PRINTING_ARCHITECTURE)
wx_add_sample(propgrid propgrid.cpp propgrid_minimal.cpp sampleprops.cpp
tests.cpp sampleprops.h propgrid.h LIBRARIES propgrid NAME propgriddemo DEPENDS wxUSE_PROPGRID)
tests.cpp sampleprops.h propgrid.h LIBRARIES wxpropgrid NAME propgriddemo DEPENDS wxUSE_PROPGRID)
wx_add_sample(render FOLDER render)
wx_add_sample(render DLL renddll.cpp NAME renddll FOLDER render)
wx_add_sample(ribbon ribbondemo.cpp LIBRARIES ribbon NAME ribbondemo DEPENDS wxUSE_RIBBON)
wx_add_sample(richtext LIBRARIES richtext html xml NAME richtextdemo DEPENDS wxUSE_XML wxUSE_RICHTEXT)
wx_add_sample(ribbon ribbondemo.cpp LIBRARIES wxribbon NAME ribbondemo DEPENDS wxUSE_RIBBON)
wx_add_sample(richtext LIBRARIES wxrichtext wxhtml wxxml NAME richtextdemo DEPENDS wxUSE_XML wxUSE_RICHTEXT)
wx_add_sample(sashtest sashtest.cpp sashtest.h RES sashtest.rc DEPENDS wxUSE_SASH)
wx_add_sample(scroll)
wx_add_sample(secretstore CONSOLE DEPENDS wxUSE_SECRETSTORE)
wx_add_sample(shaped DATA star.png)
if(wxUSE_SOCKETS)
wx_add_sample(sockets client.cpp NAME client LIBRARIES net FOLDER sockets)
wx_add_sample(sockets server.cpp NAME server LIBRARIES net FOLDER sockets)
wx_add_sample(sockets CONSOLE baseclient.cpp NAME baseclient LIBRARIES net FOLDER sockets)
wx_add_sample(sockets CONSOLE baseserver.cpp NAME baseserver LIBRARIES net FOLDER sockets)
wx_add_sample(sockets client.cpp NAME client LIBRARIES wxnet FOLDER sockets)
wx_add_sample(sockets server.cpp NAME server LIBRARIES wxnet FOLDER sockets)
wx_add_sample(sockets CONSOLE baseclient.cpp NAME baseclient LIBRARIES wxnet FOLDER sockets)
wx_add_sample(sockets CONSOLE baseserver.cpp NAME baseserver LIBRARIES wxnet FOLDER sockets)
endif()
wx_add_sample(sound RES sound.rc DATA 9000g.wav cuckoo.wav doggrowl.wav tinkalink2.wav DEPENDS wxUSE_SOUND)
wx_add_sample(splash DATA splash.png press.mpg DEPENDS wxUSE_SPLASH)
if(TARGET splash AND wxUSE_MEDIACTRL)
wx_exe_link_libraries(splash media)
wx_exe_link_libraries(splash wxmedia)
endif()
wx_add_sample(splitter DEPENDS wxUSE_SPLITTER)
wx_add_sample(statbar DEPENDS wxUSE_STATUSBAR)
wx_add_sample(stc stctest.cpp edit.cpp prefs.cpp edit.h defsext.h prefs.h
DATA stctest.cpp NAME stctest LIBRARIES stc DEPENDS wxUSE_STC)
DATA stctest.cpp NAME stctest LIBRARIES wxstc DEPENDS wxUSE_STC)
wx_add_sample(svg svgtest.cpp RES svgtest.rc DEPENDS wxUSE_SVG)
wx_add_sample(taborder)
wx_add_sample(taskbar tbtest.cpp tbtest.h DEPENDS wxUSE_TASKBARICON)
@@ -152,9 +152,10 @@ wx_add_sample(typetest typetest.cpp typetest.h)
wx_add_sample(uiaction DEPENDS wxUSE_UIACTIONSIMULATOR)
wx_add_sample(validate validate.cpp validate.h DEPENDS wxUSE_VALIDATORS)
wx_add_sample(vscroll vstest.cpp)
wx_add_sample(webview LIBRARIES webview NAME webviewsample DEPENDS wxUSE_WEBVIEW)
wx_add_sample(webview LIBRARIES wxwebview DATA ../help/doc.zip:doc.zip
NAME webviewsample DEPENDS wxUSE_WEBVIEW)
if(TARGET webviewsample AND wxUSE_STC)
wx_exe_link_libraries(webviewsample stc)
wx_exe_link_libraries(webviewsample wxstc)
endif()
wx_add_sample(webrequest LIBRARIES net DEPENDS wxUSE_WEBREQUEST)
# widgets Sample
@@ -214,7 +215,7 @@ wx_list_add_prefix(WIDGETS_RC_FILES icons/
stattext.xpm text.xpm timepick.xpm toggle.xpm
)
wx_add_sample(widgets IMPORTANT ${SAMPLE_WIDGETS_SRC}
DATA ${WIDGETS_RC_FILES} textctrl.cpp
DATA ${WIDGETS_RC_FILES} textctrl.cpp ../image/toucan.png:toucan.png
)
wx_add_sample(wizard DEPENDS wxUSE_WIZARDDLG)
wx_add_sample(wrapsizer)
@@ -245,12 +246,12 @@ wx_add_sample(xrc
custclas.h
objrefdlg.h
DATA ${XRC_RC_FILES}
LIBRARIES aui ribbon xrc html
LIBRARIES wxaui wxribbon wxxrc wxhtml
NAME xrcdemo
DEPENDS wxUSE_XML wxUSE_XRC
)
wx_add_sample(xti xti.cpp classlist.cpp codereadercallback.cpp
classlist.h codereadercallback.h LIBRARIES xml
classlist.h codereadercallback.h LIBRARIES wxxml
DEPENDS wxUSE_XML wxUSE_EXTENDED_RTTI)
if(WIN32)
@@ -263,10 +264,12 @@ if(WIN32)
if(NOT wxBUILD_SHARED)
# this test only makes sense with statically built wx, otherwise
# the same copy of wx would be used
wx_add_sample(dll wx_exe.cpp my_dll.h NAME wx_exe FOLDER dll LIBRARIES my_dll)
wx_add_sample(dll wx_exe.cpp my_dll.h NAME wx_exe FOLDER dll)
wx_link_sample_libraries(wx_exe my_dll)
endif()
wx_add_sample(dll sdk_exe.cpp my_dll.h NAME sdk_exe FOLDER dll LIBRARIES my_dll)
wx_add_sample(dll sdk_exe.cpp my_dll.h NAME sdk_exe FOLDER dll)
wx_link_sample_libraries(sdk_exe my_dll)
endif()
wx_add_sample(regtest RES regtest.rc DEPENDS wxUSE_REGKEY)
@@ -277,8 +280,5 @@ if(WIN32)
#TODO: reenable when sample is fixed
#wx_add_sample(mfc mfctest.cpp mfctest.h resource.h stdafx.h RES mfctest.rc)
wx_add_sample(taskbarbutton DEPENDS wxUSE_TASKBARBUTTON)
if(MSVC)
wx_add_sample(flash DEPENDS wxUSE_ACTIVEX)
endif()
endif()
endif()

View File

@@ -10,7 +10,7 @@
set(wxSAMPLE_FOLDER html)
set(wxSAMPLE_SUBDIR html/)
wx_add_sample(about DATA data/about.htm data/logo.png LIBRARIES html)
wx_add_sample(about DATA data/about.htm data/logo.png LIBRARIES wxhtml)
wx_list_add_prefix(HELP_DATA_FILES helpfiles/
Index.hhk
another.hhc
@@ -23,21 +23,21 @@ wx_list_add_prefix(HELP_DATA_FILES helpfiles/
page2-b.htm
testing.hhp
)
wx_add_sample(help DATA ${HELP_DATA_FILES} LIBRARIES html NAME htmlhelp DEPENDS wxUSE_HELP)
wx_add_sample(helpview DATA test.zip LIBRARIES html DEPENDS wxUSE_HELP)
wx_add_sample(help DATA ${HELP_DATA_FILES} LIBRARIES wxhtml NAME htmlhelp DEPENDS wxUSE_HELP)
wx_add_sample(helpview DATA test.zip LIBRARIES wxhtml DEPENDS wxUSE_HELP)
#TODO: htmlctrl sample uses outdated definitions
#wx_add_sample(htmlctrl LIBRARIES html)
wx_add_sample(printing DATA logo6.gif test.htm LIBRARIES html NAME htmlprinting
#wx_add_sample(htmlctrl LIBRARIES wxhtml)
wx_add_sample(printing DATA logo6.gif test.htm LIBRARIES wxhtml NAME htmlprinting
DEPENDS wxUSE_PRINTING_ARCHITECTURE)
wx_add_sample(test
DATA
imagemap.png pic.png pic2.bmp i18n.gif
imagemap.htm tables.htm test.htm listtest.htm 8859_2.htm cp1250.htm
regres.htm foo.png subsup.html
LIBRARIES net html NAME htmltest)
wx_add_sample(virtual DATA start.htm LIBRARIES html)
wx_add_sample(widget DATA start.htm LIBRARIES html)
wx_add_sample(zip DATA pages.zip start.htm LIBRARIES html DEPENDS wxUSE_FSZIP)
LIBRARIES wxnet wxhtml NAME htmltest)
wx_add_sample(virtual DATA start.htm LIBRARIES wxhtml)
wx_add_sample(widget DATA start.htm LIBRARIES wxhtml)
wx_add_sample(zip DATA pages.zip start.htm LIBRARIES wxhtml DEPENDS wxUSE_FS_ZIP)
set(wxSAMPLE_SUBDIR)
set(wxSAMPLE_FOLDER)

View File

@@ -23,14 +23,6 @@ include(CheckTypeSize)
include(CMakePushCheckState)
include(TestBigEndian)
if(
APPLE AND
CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9 AND
(CMAKE_CXX_STANDARD EQUAL 11 OR CMAKE_CXX_STANDARD EQUAL 14)
)
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-stdlib=libc++")
endif()
# Add a definition to setup.h and append it to a list of defines for
# for compile checks
macro(wx_setup_definition def)
@@ -65,11 +57,17 @@ endif()
if(WXGTK)
# Add GTK version definitions
foreach(gtk_version 1.2.7 2.0 2.10 2.18 2.20 3.0)
foreach(gtk_version 1.2.7 2.0 2.10 2.18 2.20 3.0 3.90.0)
if(wxTOOLKIT_VERSION VERSION_GREATER gtk_version)
if(gtk_version EQUAL 3.90.0)
set(__WXGTK4__ ON)
elseif(gtk_version EQUAL 3.0)
set(__WXGTK3__ ON)
else()
string(REPLACE . "" gtk_version_dotless ${gtk_version})
set(__WXGTK${gtk_version_dotless}__ ON)
endif()
endif()
endforeach()
endif()
@@ -134,14 +132,7 @@ if(NOT MSVC)
endif()
endif()
wx_check_c_source_compiles(
"#define test(fmt, ...) printf(fmt, __VA_ARGS__)
test(\"%s %d %p\", \"test\", 1, 0);"
HAVE_VARIADIC_MACROS
stdio.h
)
#TODO: wxNO_VARIADIC_MACROS
if(wxUSE_STL)
if(wxUSE_STL AND CMAKE_CXX_STANDARD EQUAL 98)
wx_check_cxx_source_compiles("
std::vector<int> moo;
std::list<int> foo;
@@ -154,6 +145,7 @@ if(wxUSE_STL)
if(NOT wxTEST_STL)
message(FATAL_ERROR "Can't use wxUSE_STL as basic STL functionality is missing")
endif()
endif()
wx_check_cxx_source_compiles("
std::string foo, bar;
@@ -166,7 +158,44 @@ if(wxUSE_STL)
HAVE_STD_STRING_COMPARE
string
)
endif()
wx_check_cxx_source_compiles(
"std::wstring s;"
HAVE_STD_WSTRING
string
)
wx_check_cxx_source_compiles("
std::hash_map<double*, char*, std::hash<double*>, std::equal_to<double*> > test1;
std::hash_set<char*, std::hash<char*>, std::equal_to<char*> > test2;"
HAVE_HASH_MAP
hash_map hash_set
)
set(HAVE_STD_HASH_MAP ${HAVE_HASH_MAP})
wx_check_cxx_source_compiles("
__gnu_cxx::hash_map<double*, char*, __gnu_cxx::hash<double*>, std::equal_to<double*> > test1;
__gnu_cxx::hash_set<char*, __gnu_cxx::hash<char*>, std::equal_to<char*> > test2;"
HAVE_EXT_HASH_MAP
ext/hash_map ext/hash_set
)
set(HAVE_GNU_CXX_HASH_MAP ${HAVE_EXT_HASH_MAP})
wx_check_cxx_source_compiles("
std::unordered_map<double*, char*> test1;
std::unordered_set<char*> test2;"
HAVE_STD_UNORDERED_MAP
unordered_map unordered_set
)
set(HAVE_STD_UNORDERED_SET ${HAVE_STD_UNORDERED_MAP})
wx_check_cxx_source_compiles("
std::tr1::unordered_map<double*, char*> test1;
std::tr1::unordered_set<char*> test2;"
HAVE_TR1_UNORDERED_MAP
tr1/unordered_map tr1/unordered_set
)
set(HAVE_TR1_UNORDERED_SET ${HAVE_TR1_UNORDERED_MAP})
# Check for availability of GCC's atomic operations builtins.
wx_check_c_source_compiles("
@@ -217,9 +246,8 @@ macro(wx_get_socket_param_type name code)
endmacro()
# the following tests are for Unix(like) systems only
if(NOT WIN32)
if(wxUSE_LIBICONV AND NOT APPLE)
find_package(Iconv REQUIRED)
if(UNIX)
if(wxUSE_LIBICONV)
set(HAVE_ICONV ON)
set(ICONV_CONST " ")
if(ICONV_SECOND_ARGUMENT_IS_CONST)
@@ -419,8 +447,8 @@ if(NOT WIN32)
check_symbol_exists(getservbyname netdb.h HAVE_GETSERVBYNAME)
check_symbol_exists(inet_aton arpa/inet.h HAVE_INET_ATON)
check_symbol_exists(inet_addr arpa/inet.h HAVE_INET_ADDR)
endif() # wxUSE_SOCKETS
endif() # NOT WIN32
endif(wxUSE_SOCKETS)
endif(UNIX)
if(CMAKE_USE_PTHREADS_INIT)
cmake_push_check_state(RESET)
@@ -537,8 +565,6 @@ check_struct_has_member("struct passwd" pw_gecos pwd.h HAVE_PW_GECOS)
# Check for functions
# ---------------------------------------------------------------------------
# TODO: wcslen
# Check various string symbols
foreach(func
ftime
@@ -547,20 +573,18 @@ foreach(func
wcsdup wcsnlen wcscasecmp wcsncasecmp
wcsrctombs
wcstoull
wcslen
)
string(TOUPPER ${func} func_upper)
check_symbol_exists(${func} wchar.h HAVE_${func_upper})
endforeach()
# Check various functions
foreach(func
fsync
wx_check_funcs(fsync
snprintf vsnprintf strnlen strtoull
setpriority
gettimeofday
)
string(TOUPPER ${func} func_upper)
check_function_exists(${func} HAVE_${func_upper})
endforeach()
if(MSVC)
check_symbol_exists(vsscanf stdio.h HAVE_VSSCANF)
@@ -579,17 +603,9 @@ check_include_file(fcntl.h HAVE_FCNTL_H)
check_include_file(langinfo.h HAVE_LANGINFO_H)
check_include_file(sched.h HAVE_SCHED_H)
check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(w32api.h HAVE_W32API_H)
check_include_file(wchar.h HAVE_WCHAR_H)
check_include_file(wcstr.h HAVE_WCSTR_H)
wx_check_cxx_source_compiles(
"std::wstring s;"
HAVE_STD_WSTRING
string
)
if(wxUSE_DATETIME)
# check for timezone variable
# doesn't exist under Darwin / Mac OS X which uses tm_gmtoff instead
@@ -614,12 +630,8 @@ set(CMAKE_REQUIRED_LIBRARIES dl)
check_symbol_exists(dlopen dlfcn.h HAVE_DLOPEN)
cmake_pop_check_state()
if(HAVE_DLOPEN)
check_symbol_exists(dlerror dlfcn.h HAVE_DLERROR)
check_symbol_exists(dladdr dlfcn.h HAVE_DLADDR)
else()
check_symbol_exists(shl_load dl.h HAVE_SHL_LOAD)
endif()
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
if(APPLE)
set(wxUSE_EPOLL_DISPATCHER OFF)
@@ -641,7 +653,10 @@ endif()
if(wxUSE_XLOCALE)
check_include_file(xlocale.h HAVE_XLOCALE_H)
set(CMAKE_EXTRA_INCLUDE_FILES xlocale.h locale.h)
set(CMAKE_EXTRA_INCLUDE_FILES locale.h)
if(HAVE_XLOCALE_H)
list(APPEND CMAKE_EXTRA_INCLUDE_FILES xlocale.h)
endif()
check_type_size(locale_t LOCALE_T)
set(CMAKE_EXTRA_INCLUDE_FILES)
endif()

View File

@@ -182,8 +182,6 @@
#cmakedefine01 wxUSE_UNICODE
#endif
#cmakedefine01 wxUSE_WCHAR_T
#cmakedefine01 wxUSE_EXCEPTIONS
@@ -222,9 +220,6 @@
#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL
#cmakedefine01 wxUSE_IOSTREAMH
#cmakedefine01 wxUSE_LONGLONG
@@ -367,6 +362,8 @@
#cmakedefine01 wxUSE_WEBVIEW_IE
#endif
#cmakedefine01 wxUSE_WEBVIEW_EDGE
#if (defined(__WXGTK__) && !defined(__WXGTK3__)) || defined(__WXOSX__)
#cmakedefine01 wxUSE_WEBVIEW_WEBKIT
#else
@@ -442,6 +439,8 @@
#cmakedefine01 wxUSE_TREECTRL
#cmakedefine01 wxUSE_TREELISTCTRL
#cmakedefine01 wxUSE_NATIVE_DATAVIEWCTRL
#cmakedefine01 wxUSE_STATUSBAR
#cmakedefine01 wxUSE_NATIVE_STATUSBAR
@@ -496,6 +495,8 @@
#cmakedefine01 wxUSE_MENUS
#cmakedefine01 wxUSE_MENUBAR
#cmakedefine01 wxUSE_NOTIFICATION_MESSAGE
#cmakedefine01 wxUSE_PREFERENCES_EDITOR
@@ -576,6 +577,8 @@
#cmakedefine01 wxUSE_GLCANVAS
#cmakedefine01 wxUSE_GLCANVAS_EGL
#cmakedefine01 wxUSE_RICHTEXT
@@ -660,7 +663,6 @@
#cmakedefine01 wxUSE_THEME_MONO
#cmakedefine01 wxUSE_THEME_WIN32
/* --- end common options --- */
/*
@@ -742,6 +744,8 @@
#cmakedefine01 wxUSE_INICONF
#cmakedefine01 wxUSE_WINSOCK2
#cmakedefine01 wxUSE_DATEPICKCTRL_GENERIC
@@ -767,11 +771,6 @@
*/
#cmakedefine VA_LIST_IS_ARRAY 1
/*
* Define if the compiler supports variadic macros
*/
#cmakedefine HAVE_VARIADIC_MACROS 1
/*
* Define if you don't want variadic macros to be used even if they are
* supported by the compiler.
@@ -1012,9 +1011,6 @@
/* Define if you have pthread_attr_setstacksize */
#cmakedefine HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
/* Define if you have shl_load() */
#cmakedefine HAVE_SHL_LOAD 1
/* Define if you have snprintf() */
#cmakedefine HAVE_SNPRINTF 1
@@ -1117,9 +1113,6 @@
/* Define if wchar_t is distinct type in your compiler. */
#cmakedefine wxWCHAR_T_IS_REAL_TYPE 1
/* Define if you have the dlerror function. */
#cmakedefine HAVE_DLERROR 1
/* Define if you have the dladdr function. */
#cmakedefine HAVE_DLADDR 1
@@ -1231,9 +1224,6 @@
/* Define if you have the <langinfo.h> header file. */
#cmakedefine HAVE_LANGINFO_H 1
/* Define if you have the <w32api.h> header file (mingw,cygwin). */
#cmakedefine HAVE_W32API_H 1
/* Define if you have the <sys/soundcard.h> header file. */
#cmakedefine HAVE_SYS_SOUNDCARD_H 1

View File

@@ -1,5 +1,5 @@
#############################################################################
# Name: build/cmake/main.cmake
# Name: build/cmake/source_groups.cmake
# Purpose: CMake source groups file
# Author: Tobias Taschner
# Created: 2016-10-14

View File

@@ -14,5 +14,6 @@ if(wxUSE_GUI AND wxBUILD_TESTS STREQUAL "ALL")
add_subdirectory(drawing)
add_subdirectory(gui)
add_subdirectory(headers)
endif()

View File

@@ -122,9 +122,9 @@ wx_add_test(test_base ${TEST_SRC}
)
target_compile_definitions(test_base PRIVATE wxUSE_GUI=0 wxUSE_BASE=1)
if(wxUSE_SOCKETS)
wx_exe_link_libraries(test_base net)
wx_exe_link_libraries(test_base wxnet)
endif()
if(wxUSE_XML)
wx_exe_link_libraries(test_base xml)
wx_exe_link_libraries(test_base wxxml)
endif()
wx_test_enable_precomp(test_base)

Some files were not shown because too many files have changed in this diff Show More