initial commit

Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
2025-10-31 23:37:30 +01:00
commit bf6b52fd94
9654 changed files with 4035664 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
autogen.mk
autogen.mk is a makefile provided to automatically update the GNU autotools
build system. It will run Bakefile, aclocal, and autoconf as appropriate.
The .m4 files required for running aclocal are located in build/aclocal.
When upgrading software that wxWidgets depends on (for example, Bakefile,
cppunit, GTK, SDL, or others) it is advisable to upgrade the .m4 files
located in the build/aclocal directory.
It is particularly important that if you use a newer version of Bakefile
to generate the Makefile.in files that you use the newer bakefile*.m4.
Because build/autogen.mk is a Makefile it will automatically rerun
aclocal and autoconf as necessary whenever any m4 in build/aclocal is
newer than the generated aclocal.m4.
You can achieve this simply by copying the new bakefile*.m4 files from
PREFIX/share/aclocal/ into the build/aclocal/ directory and
rerunning make -f build/autogen.mk. Note that you should _not_ preserve
source file times (don't use cp -p) or else it's possible your .m4 files
will be older than the generated aclocal.m4).
Example:
cp /usr/share/aclocal/bakefile*.m4 build/aclocal/
make -f build/autogen.mk
Please don't forget to commit updated .m4 files as well as updated aclocal.m4,
configure, and Makefile.in files to wxWidgets.

View File

@@ -0,0 +1,78 @@
dnl @synopsis AC_raf_FUNC_WHICH_GETSERVBYNAME_R
dnl
dnl Provides a test to determine the correct way to call
dnl getservbyname_r:
dnl
dnl - defines HAVE_FUNC_GETSERVBYNAME_R_6 if it needs 6 arguments (e.g. linux)
dnl - defines HAVE_FUNC_GETSERVBYNAME_R_5 if it needs 5 arguments (e.g. solaris)
dnl - defines HAVE_FUNC_GETSERVBYNAME_R_4 if it needs 4 arguments (e.g. osf/1)
dnl
dnl An example use can be found at
dnl http://raf.org/autoconf/net_getservbyname.c
dnl
dnl Based on Caolan McNamara's gethostbyname_r macro. Based on David
dnl Arnold's autoconf suggestion in the threads faq.
dnl
dnl @category Misc
dnl @author raf <raf@raf.org>
dnl @version 2001-08-20
dnl @license GPLWithACException
AC_DEFUN([AC_raf_FUNC_WHICH_GETSERVBYNAME_R],
[
AC_CACHE_CHECK(how many arguments getservbyname_r() takes,
ac_cv_func_which_getservbyname_r,
[
dnl we need to use C++ to detect missing prototypes
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [
[
char *name;
char *proto;
struct servent *se, *res;
char buffer[2048];
int buflen = 2048;
(void) getservbyname_r(name, proto, se, buffer, buflen, &res)
]])],
ac_cv_func_which_getservbyname_r=six,
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>], [
[
char *name;
char *proto;
struct servent *se;
char buffer[2048];
int buflen = 2048;
(void) getservbyname_r(name, proto, se, buffer, buflen)
]])],
ac_cv_func_which_getservbyname_r=five,
[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
[
char *name;
char *proto;
struct servent *se;
struct servent_data data;
(void) getservbyname_r(name, proto, se, &data);
])],
ac_cv_func_which_getservbyname_r=four,
ac_cv_func_which_getservbyname_r=no
)
]
)
]
)
AC_LANG_POP()
]
)
if test $ac_cv_func_which_getservbyname_r = six; then
AC_DEFINE(HAVE_FUNC_GETSERVBYNAME_R_6)
elif test $ac_cv_func_which_getservbyname_r = five; then
AC_DEFINE(HAVE_FUNC_GETSERVBYNAME_R_5)
elif test $ac_cv_func_which_getservbyname_r = four; then
AC_DEFINE(HAVE_FUNC_GETSERVBYNAME_R_4)
fi
])

View File

@@ -0,0 +1,26 @@
dnl Checks for availability of GCC's atomic operations builtins.
dnl Defines HAVE_GCC_ATOMIC_BUILTINS if available.
AC_DEFUN([WX_ATOMIC_BUILTINS],
[
AC_REQUIRE([AC_PROG_CC])
if test -n "$GCC"; then
AC_MSG_CHECKING([for __sync_xxx_and_fetch builtins])
AC_CACHE_VAL(wx_cv_cc_gcc_atomic_builtins, [
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[],
[
unsigned int value=0;
volatile unsigned int r1 = __sync_add_and_fetch(&value, 2);
volatile unsigned int r2 = __sync_sub_and_fetch(&value, 1);
])],
wx_cv_cc_gcc_atomic_builtins=yes,
wx_cv_cc_gcc_atomic_builtins=no)
])
AC_MSG_RESULT([$wx_cv_cc_gcc_atomic_builtins])
if test $wx_cv_cc_gcc_atomic_builtins = yes; then
AC_DEFINE([HAVE_GCC_ATOMIC_BUILTINS])
fi
fi
])

View File

@@ -0,0 +1,219 @@
# ===========================================================================
# http://autoconf-archive.cryp.to/ax_cflags_gcc_option.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CFLAGS_GCC_OPTION (optionflag [,[shellvar][,[A][,[NA]]])
#
# DESCRIPTION
#
# AX_CFLAGS_GCC_OPTION(-fvomit-frame) would show a message as like
# "checking CFLAGS for gcc -fvomit-frame ... yes" and adds the optionflag
# to CFLAGS if it is understood. You can override the shellvar-default of
# CFLAGS of course. The order of arguments stems from the explicit macros
# like AX_CFLAGS_WARN_ALL.
#
# The cousin AX_CXXFLAGS_GCC_OPTION would check for an option to add to
# CXXFLAGS - and it uses the autoconf setup for C++ instead of C (since it
# is possible to use different compilers for C and C++).
#
# The macro is a lot simpler than any special AX_CFLAGS_* macro (or
# ac_cxx_rtti.m4 macro) but allows to check for arbitrary options.
# However, if you use this macro in a few places, it would be great if you
# would make up a new function-macro and submit it to the ac-archive.
#
# - $1 option-to-check-for : required ("-option" as non-value)
# - $2 shell-variable-to-add-to : CFLAGS (or CXXFLAGS in the other case)
# - $3 action-if-found : add value to shellvariable
# - $4 action-if-not-found : nothing
#
# Note: in earlier versions, $1-$2 were swapped. We try to detect the
# situation and accept a $2=~/-/ as being the old option-to-check-for.
#
# There are other variants that emerged from the original macro variant
# which did just test an option to be possibly added. However, some
# compilers accept an option silently, or possibly for just another option
# that was not intended. Therefore, we have to do a generic test for a
# compiler family. For gcc we check "-pedantic" being accepted which is
# also understood by compilers who just want to be compatible with gcc
# even when not being made from gcc sources.
#
# See also: AX_CFLAGS_SUN_OPTION, AX_CFLAGS_HPUX_OPTION,
# AX_CFLAGS_AIX_OPTION, and AX_CFLAGS_IRIX_OPTION.
#
# LAST MODIFICATION
#
# 2008-04-12
#
# COPYLEFT
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
#
# 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 <http://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 Macro 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.
AC_DEFUN([AX_CFLAGS_GCC_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_PUSH(C)
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_POP()
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_OLD], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$2])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for gcc m4_ifval($2,$2,-option)],
VAR,[VAR="no, unknown"
AC_LANG_PUSH(C++)
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($2,$2,-option)" dnl GCC
"-pedantic % m4_ifval($2,$2,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_POP()
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl -------------------------------------------------------------------------
AC_DEFUN([AX_CFLAGS_GCC_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_PUSH(C)
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_POP()
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION_NEW], [dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_gcc_option_$1])dnl
AC_CACHE_CHECK([m4_ifval($2,$2,FLAGS) for gcc m4_ifval($1,$1,-option)],
VAR,[VAR="no, unknown"
AC_LANG_PUSH(C++)
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic -Werror % m4_ifval($1,$1,-option)" dnl GCC
"-pedantic % m4_ifval($1,$1,-option) %% no, obsolete" dnl new GCC
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[return 0;])],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_POP()
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($2,$2,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($2,$2,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"])
m4_ifval($2,$2,FLAGS)="$m4_ifval($2,$2,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
AC_DEFUN([AX_CFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CFLAGS_GCC_OPTION_NEW($@)],[AX_CFLAGS_GCC_OPTION_OLD($@)])])
AC_DEFUN([AX_CXXFLAGS_GCC_OPTION],[ifelse(m4_bregexp([$2],[-]),-1,
[AX_CXXFLAGS_GCC_OPTION_NEW($@)],[AX_CXXFLAGS_GCC_OPTION_OLD($@)])])

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,196 @@
# ==================================================================================
# 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_MSG_CHECKING([how many arguments gethostbyname_r() takes])
AC_CACHE_VAL([ac_cv_func_which_gethostbyname_r], [
################################################################
ac_cv_func_which_gethostbyname_r=unknown
#
# ONE ARGUMENT (sanity check)
#
# This should fail, as there is no variant of gethostbyname_r() that takes
# a single argument. If it actually compiles, then we can assume that
# 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>],
[
char *name = "www.gnu.org";
(void)gethostbyname_r(name) /* ; */
])],
[ac_cv_func_which_gethostbyname_r=no])
#
# SIX ARGUMENTS
# (e.g. Linux)
#
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
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])
fi
#
# FIVE ARGUMENTS
# (e.g. Solaris)
#
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
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])
fi
#
# THREE ARGUMENTS
# (e.g. AIX, HP-UX, Tru64)
#
if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
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])
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], [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], [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], [1],
[Define to 1 if you have the six-argument form of gethostbyname_r().])
;;
no)
AC_MSG_RESULT([cannot find function declaration in netdb.h])
;;
unknown)
AC_MSG_RESULT([can't tell])
;;
*)
AC_MSG_ERROR([internal error])
;;
esac
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

@@ -0,0 +1,252 @@
dnl
dnl This file is part of Bakefile (http://www.bakefile.org)
dnl
dnl Copyright (C) 2003-2007 Vaclav Slavik, David Elliott and others
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
dnl to deal in the Software without restriction, including without limitation
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
dnl and/or sell copies of the Software, and to permit persons to whom the
dnl Software is furnished to do so, subject to the following conditions:
dnl
dnl The above copyright notice and this permission notice shall be included in
dnl all copies or substantial portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dnl DEALINGS IN THE SOFTWARE.
dnl
dnl Compiler detection macros by David Elliott and Vadim Zeitlin
dnl
dnl ===========================================================================
dnl Macros to detect different C/C++ compilers
dnl ===========================================================================
dnl Based on autoconf _AC_LANG_COMPILER_GNU
dnl _AC_BAKEFILE_LANG_COMPILER(NAME, LANG, SYMBOL, IF-YES, IF-NO)
AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER],
[
AC_LANG_PUSH($2)
AC_CACHE_CHECK(
[whether we are using the $1 $2 compiler],
[bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[],
[
#ifndef $3
choke me
#endif
])],
[bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=yes],
[bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=no]
)
]
)
if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3" = "xyes"; then
:; $4
else
:; $5
fi
AC_LANG_POP($2)
])
dnl More specific version of the above macro checking whether the compiler
dnl version is at least the given one (assumes that we do use this compiler)
dnl
dnl _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(NAME, LANG, SYMBOL, VER, VERMSG, IF-YES, IF-NO)
AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER_LATER_THAN],
[
AC_LANG_PUSH($2)
AC_CACHE_CHECK(
[whether we are using $1 $2 compiler v$5 or later],
[bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[],
[
#ifndef $3 || $3 < $4
choke me
#endif
])],
[bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=yes],
[bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=no]
)
]
)
if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4" = "xyes"; then
:; $6
else
:; $7
fi
AC_LANG_POP($2)
])
dnl IBM xlC compiler defines __xlC__ for both C and C++
AC_DEFUN([AC_BAKEFILE_PROG_XLCC],
[
_AC_BAKEFILE_LANG_COMPILER([IBM xlC], C, __xlC__, XLCC=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_XLCXX],
[
_AC_BAKEFILE_LANG_COMPILER([IBM xlC], C++, __xlC__, XLCXX=yes)
])
dnl recent versions of SGI mipsPro compiler define _SGI_COMPILER_VERSION
dnl
dnl NB: old versions define _COMPILER_VERSION but this could probably be
dnl defined by other compilers too so don't test for it to be safe
AC_DEFUN([AC_BAKEFILE_PROG_SGICC],
[
_AC_BAKEFILE_LANG_COMPILER(SGI, C, _SGI_COMPILER_VERSION, SGICC=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_SGICXX],
[
_AC_BAKEFILE_LANG_COMPILER(SGI, C++, _SGI_COMPILER_VERSION, SGICXX=yes)
])
dnl Sun compiler defines __SUNPRO_C/__SUNPRO_CC
AC_DEFUN([AC_BAKEFILE_PROG_SUNCC],
[
_AC_BAKEFILE_LANG_COMPILER(Sun, C, __SUNPRO_C, SUNCC=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_SUNCXX],
[
_AC_BAKEFILE_LANG_COMPILER(Sun, C++, __SUNPRO_CC, SUNCXX=yes)
])
dnl Intel icc compiler defines __INTEL_COMPILER for both C and C++
AC_DEFUN([AC_BAKEFILE_PROG_INTELCC],
[
_AC_BAKEFILE_LANG_COMPILER(Intel, C, __INTEL_COMPILER, INTELCC=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX],
[
_AC_BAKEFILE_LANG_COMPILER(Intel, C++, __INTEL_COMPILER, INTELCXX=yes)
])
dnl Intel compiler command line options changed in incompatible ways sometimes
dnl before v8 (-KPIC was replaced with gcc-compatible -fPIC) and again in v10
dnl (-create-pch deprecated in favour of -pch-create) so we need to test for
dnl its exact version too
AC_DEFUN([AC_BAKEFILE_PROG_INTELCC_8],
[
_AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C, __INTEL_COMPILER, 800, 8, INTELCC8=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX_8],
[
_AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C++, __INTEL_COMPILER, 800, 8, INTELCXX8=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_INTELCC_10],
[
_AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C, __INTEL_COMPILER, 1000, 10, INTELCC10=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX_10],
[
_AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C++, __INTEL_COMPILER, 1000, 10, INTELCXX10=yes)
])
dnl HP-UX aCC: see http://docs.hp.com/en/6162/preprocess.htm#macropredef
AC_DEFUN([AC_BAKEFILE_PROG_HPCC],
[
_AC_BAKEFILE_LANG_COMPILER(HP, C, __HP_cc, HPCC=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_HPCXX],
[
_AC_BAKEFILE_LANG_COMPILER(HP, C++, __HP_aCC, HPCXX=yes)
])
dnl Tru64 cc and cxx
AC_DEFUN([AC_BAKEFILE_PROG_COMPAQCC],
[
_AC_BAKEFILE_LANG_COMPILER(Compaq, C, __DECC, COMPAQCC=yes)
])
AC_DEFUN([AC_BAKEFILE_PROG_COMPAQCXX],
[
_AC_BAKEFILE_LANG_COMPILER(Compaq, C++, __DECCXX, COMPAQCXX=yes)
])
dnl ===========================================================================
dnl Macros to do all of the compiler detections as one macro
dnl ===========================================================================
dnl check for different proprietary compilers depending on target platform
dnl _AC_BAKEFILE_PROG_COMPILER(LANG)
AC_DEFUN([_AC_BAKEFILE_PROG_COMPILER],
[
AC_REQUIRE([AC_PROG_$1])
dnl Intel compiler can be used under several different OS and even
dnl different architectures (x86, amd64 and Itanium) so it's easier to just
dnl always test for it
AC_BAKEFILE_PROG_INTEL$1
dnl If we use Intel compiler we also need to know its version
if test "$INTEL$1" = "yes"; then
AC_BAKEFILE_PROG_INTEL$1_8
AC_BAKEFILE_PROG_INTEL$1_10
fi
dnl if we're using gcc, we can't be using any of incompatible compilers
if test "x$G$1" != "xyes"; then
dnl most of these compilers are only used under well-defined OS so
dnl don't waste time checking for them on other ones
case `uname -s` in
AIX*)
AC_BAKEFILE_PROG_XL$1
;;
Darwin)
AC_BAKEFILE_PROG_XL$1
;;
IRIX*)
AC_BAKEFILE_PROG_SGI$1
;;
Linux*)
dnl Sun CC is now available under Linux too, test for it unless
dnl we already found that we were using a different compiler
if test "$INTEL$1" != "yes"; then
AC_BAKEFILE_PROG_SUN$1
fi
;;
HP-UX*)
AC_BAKEFILE_PROG_HP$1
;;
OSF1)
AC_BAKEFILE_PROG_COMPAQ$1
;;
SunOS)
AC_BAKEFILE_PROG_SUN$1
;;
esac
fi
])
AC_DEFUN([AC_BAKEFILE_PROG_CC],
[
_AC_BAKEFILE_PROG_COMPILER(CC)
])
AC_DEFUN([AC_BAKEFILE_PROG_CXX],
[
_AC_BAKEFILE_PROG_COMPILER(CXX)
])

View File

@@ -0,0 +1,910 @@
dnl
dnl This file is part of Bakefile (http://www.bakefile.org)
dnl
dnl Copyright (C) 2003-2007 Vaclav Slavik and others
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
dnl to deal in the Software without restriction, including without limitation
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
dnl and/or sell copies of the Software, and to permit persons to whom the
dnl Software is furnished to do so, subject to the following conditions:
dnl
dnl The above copyright notice and this permission notice shall be included in
dnl all copies or substantial portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
dnl DEALINGS IN THE SOFTWARE.
dnl
dnl Support macros for makefiles generated by BAKEFILE.
dnl
dnl ---------------------------------------------------------------------------
dnl Lots of compiler & linker detection code contained here was taken from
dnl wxWidgets configure script (see https://www.wxwidgets.org)
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_GNUMAKE
dnl
dnl Detects GNU make
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_GNUMAKE],
[
dnl does make support "-include" (only GNU make does AFAIK)?
AC_CACHE_CHECK([if make is GNU make], bakefile_cv_prog_makeisgnu,
[
if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null |
grep -sE GNU > /dev/null); then
bakefile_cv_prog_makeisgnu="yes"
else
bakefile_cv_prog_makeisgnu="no"
fi
])
if test "x$bakefile_cv_prog_makeisgnu" = "xyes"; then
IF_GNU_MAKE=""
else
IF_GNU_MAKE="#"
fi
AC_SUBST(IF_GNU_MAKE)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_PLATFORM
dnl
dnl Detects platform and sets PLATFORM_XXX variables accordingly
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_PLATFORM],
[
PLATFORM_UNIX=0
PLATFORM_WIN32=0
PLATFORM_MAC=0
PLATFORM_MACOS=0
PLATFORM_MACOSX=0
PLATFORM_BEOS=0
if test "x$BAKEFILE_FORCE_PLATFORM" = "x"; then
case "${BAKEFILE_HOST}" in
*-*-mingw* )
PLATFORM_WIN32=1
;;
*-*-darwin* )
PLATFORM_MAC=1
PLATFORM_MACOSX=1
;;
*-*-beos* )
PLATFORM_BEOS=1
;;
powerpc-apple-macos* )
PLATFORM_MAC=1
PLATFORM_MACOS=1
;;
* )
PLATFORM_UNIX=1
;;
esac
else
case "$BAKEFILE_FORCE_PLATFORM" in
win32 )
PLATFORM_WIN32=1
;;
darwin )
PLATFORM_MAC=1
PLATFORM_MACOSX=1
;;
unix )
PLATFORM_UNIX=1
;;
beos )
PLATFORM_BEOS=1
;;
* )
AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM])
;;
esac
fi
AC_SUBST(PLATFORM_UNIX)
AC_SUBST(PLATFORM_WIN32)
AC_SUBST(PLATFORM_MAC)
AC_SUBST(PLATFORM_MACOS)
AC_SUBST(PLATFORM_MACOSX)
AC_SUBST(PLATFORM_BEOS)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_PLATFORM_SPECIFICS
dnl
dnl Sets misc platform-specific settings
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_PLATFORM_SPECIFICS],
[
case "${BAKEFILE_HOST}" in
*-*-darwin* )
dnl For Unix to MacOS X porting instructions, see:
dnl http://fink.sourceforge.net/doc/porting/porting.html
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -fno-common"
CXXFLAGS="$CXXFLAGS -fno-common"
fi
if test "x$XLCC" = "xyes"; then
CFLAGS="$CFLAGS -qnocommon"
CXXFLAGS="$CXXFLAGS -qnocommon"
fi
;;
i*86-*-beos* )
LDFLAGS="-L/boot/develop/lib/x86 $LDFLAGS"
;;
esac
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_SUFFIXES
dnl
dnl Detects shared various suffixes for shared libraries, libraries, programs,
dnl plugins etc.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_SUFFIXES],
[
SO_SUFFIX="so"
SO_SUFFIX_MODULE="so"
EXEEXT=""
LIBPREFIX="lib"
LIBEXT=".a"
DLLPREFIX="lib"
DLLPREFIX_MODULE=""
DLLIMP_SUFFIX=""
dlldir="$libdir"
case "${BAKEFILE_HOST}" in
dnl PA-RISC HP systems used .sl but IA64 use ELF-64 and so use the
dnl standard .so extension
ia64-hp-hpux* )
;;
*-hp-hpux* )
SO_SUFFIX="sl"
SO_SUFFIX_MODULE="sl"
;;
*-*-aix* )
dnl quoting from
dnl http://www-1.ibm.com/servers/esdd/articles/gnu.html:
dnl Both archive libraries and shared libraries on AIX have an
dnl .a extension. This will explain why you can't link with an
dnl .so and why it works with the name changed to .a.
SO_SUFFIX="a"
SO_SUFFIX_MODULE="a"
;;
*-*-cygwin* )
SO_SUFFIX="dll"
SO_SUFFIX_MODULE="dll"
DLLIMP_SUFFIX="dll.a"
EXEEXT=".exe"
DLLPREFIX="cyg"
dlldir="$bindir"
;;
*-*-mingw* )
SO_SUFFIX="dll"
SO_SUFFIX_MODULE="dll"
DLLIMP_SUFFIX="dll.a"
EXEEXT=".exe"
DLLPREFIX=""
dlldir="$bindir"
;;
*-*-darwin* )
SO_SUFFIX="dylib"
SO_SUFFIX_MODULE="bundle"
;;
esac
if test "x$DLLIMP_SUFFIX" = "x" ; then
DLLIMP_SUFFIX="$SO_SUFFIX"
fi
AC_SUBST(SO_SUFFIX)
AC_SUBST(SO_SUFFIX_MODULE)
AC_SUBST(DLLIMP_SUFFIX)
AC_SUBST(EXEEXT)
AC_SUBST(LIBPREFIX)
AC_SUBST(LIBEXT)
AC_SUBST(DLLPREFIX)
AC_SUBST(DLLPREFIX_MODULE)
AC_SUBST(dlldir)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_SHARED_LD
dnl
dnl Detects command for making shared libraries, substitutes SHARED_LD_CC
dnl and SHARED_LD_CXX.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_SHARED_LD],
[
dnl the extra compiler flags needed for compilation of shared library
PIC_FLAG=""
if test "x$GCC" = "xyes"; then
dnl the switch for gcc is the same under all platforms
PIC_FLAG="-fPIC"
fi
dnl Defaults for GCC and ELF .so shared libs:
SHARED_LD_CC="\$(CC) -shared ${PIC_FLAG} -o"
SHARED_LD_CXX="\$(CXX) -shared ${PIC_FLAG} -o"
WINDOWS_IMPLIB=0
case "${BAKEFILE_HOST}" in
*-hp-hpux* )
dnl default settings are good for gcc but not for the native HP-UX
if test "x$GCC" != "xyes"; then
dnl no idea why it wants it, but it does
LDFLAGS="$LDFLAGS -L/usr/lib"
SHARED_LD_CC="${CC} -b -o"
SHARED_LD_CXX="${CXX} -b -o"
PIC_FLAG="+Z"
fi
;;
*-*-linux* )
dnl newer icc versions use -fPIC just as gcc does and, in fact, the
dnl newest (v10+) ones don't even understand -KPIC any longer
if test "$INTELCC" = "yes" -a "$INTELCC8" != "yes"; then
PIC_FLAG="-KPIC"
elif test "x$SUNCXX" = "xyes"; then
SHARED_LD_CC="${CC} -G -o"
SHARED_LD_CXX="${CXX} -G -o"
PIC_FLAG="-KPIC"
fi
;;
*-*-solaris2* )
if test "x$SUNCXX" = xyes ; then
SHARED_LD_CC="${CC} -G -o"
SHARED_LD_CXX="${CXX} -G -o"
PIC_FLAG="-KPIC"
fi
;;
*-*-darwin* )
SHARED_LD_MODULE_CC="\${CC} -bundle -headerpad_max_install_names -o"
SHARED_LD_MODULE_CXX="\${CXX} -bundle -headerpad_max_install_names -o"
SHARED_LD_CC="\${CC} -dynamiclib -headerpad_max_install_names -o"
SHARED_LD_CXX="\${CXX} -dynamiclib -headerpad_max_install_names -o"
if test "x$GCC" = "xyes"; then
PIC_FLAG="-dynamic -fPIC"
fi
if test "x$XLCC" = "xyes"; then
PIC_FLAG="-dynamic -DPIC"
fi
;;
*-*-aix* )
if test "x$GCC" = "xyes"; then
dnl at least gcc 2.95 warns that -fPIC is ignored when
dnl compiling each and every file under AIX which is annoying,
dnl so don't use it there (it's useless as AIX runs on
dnl position-independent architectures only anyhow)
PIC_FLAG=""
dnl -bexpfull is needed by AIX linker to export all symbols (by
dnl default it doesn't export any and even with -bexpall it
dnl doesn't export all C++ support symbols, e.g. vtable
dnl pointers) but it's only available starting from 5.1 (with
dnl maintenance pack 2, whatever this is), see
dnl http://www-128.ibm.com/developerworks/eserver/articles/gnu.html
case "${BAKEFILE_HOST}" in
*-*-aix5* )
LD_EXPFULL="-Wl,-bexpfull"
;;
esac
SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o"
SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o"
else
dnl FIXME: makeC++SharedLib is obsolete, what should we do for
dnl recent AIX versions?
AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib,
makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib)
SHARED_LD_CC="$AIX_CC_LD -p 0 -o"
SHARED_LD_CXX="$AIX_CXX_LD -p 0 -o"
fi
;;
*-*-beos* )
dnl can't use gcc under BeOS for shared library creation because it
dnl complains about missing 'main'
SHARED_LD_CC="${LD} -nostart -o"
SHARED_LD_CXX="${LD} -nostart -o"
;;
*-*-irix* )
dnl default settings are ok for gcc
if test "x$GCC" != "xyes"; then
PIC_FLAG="-KPIC"
fi
;;
*-*-cygwin* | *-*-mingw32* | *-*-mingw64* )
PIC_FLAG=""
SHARED_LD_CC="\$(CC) -shared -o"
SHARED_LD_CXX="\$(CXX) -shared -o"
WINDOWS_IMPLIB=1
;;
powerpc-apple-macos* | \
*-*-freebsd* | *-*-openbsd* | *-*-haiku* | *-*-netbsd* | *-*-gnu* | *-*-k*bsd*-gnu | \
*-*-mirbsd* | \
*-*-sunos4* | \
*-*-osf* | \
*-*-dgux5* | \
*-*-sysv5* )
dnl defaults are ok
;;
*)
AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
esac
if test "x$PIC_FLAG" != "x" ; then
PIC_FLAG="$PIC_FLAG -DPIC"
fi
if test "x$SHARED_LD_MODULE_CC" = "x" ; then
SHARED_LD_MODULE_CC="$SHARED_LD_CC"
fi
if test "x$SHARED_LD_MODULE_CXX" = "x" ; then
SHARED_LD_MODULE_CXX="$SHARED_LD_CXX"
fi
AC_SUBST(SHARED_LD_CC)
AC_SUBST(SHARED_LD_CXX)
AC_SUBST(SHARED_LD_MODULE_CC)
AC_SUBST(SHARED_LD_MODULE_CXX)
AC_SUBST(PIC_FLAG)
AC_SUBST(WINDOWS_IMPLIB)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_SHARED_VERSIONS
dnl
dnl Detects linker options for attaching versions (sonames) to shared libs.
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_SHARED_VERSIONS],
[
USE_SOVERSION=0
USE_SOVERLINUX=0
USE_SOVERSOLARIS=0
USE_SOVERCYGWIN=0
USE_SOTWOSYMLINKS=0
USE_MACVERSION=0
SONAME_FLAG=
case "${BAKEFILE_HOST}" in
*-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-haiku* | *-*-netbsd* | \
*-*-k*bsd*-gnu | *-*-mirbsd* | *-*-gnu* )
if test "x$SUNCXX" = "xyes"; then
SONAME_FLAG="-h "
else
SONAME_FLAG="-Wl,-soname,"
fi
USE_SOVERSION=1
USE_SOVERLINUX=1
USE_SOTWOSYMLINKS=1
;;
*-*-solaris2* )
SONAME_FLAG="-h "
USE_SOVERSION=1
USE_SOVERSOLARIS=1
;;
*-*-darwin* )
USE_MACVERSION=1
USE_SOVERSION=1
USE_SOTWOSYMLINKS=1
;;
*-*-cygwin* )
USE_SOVERSION=1
USE_SOVERCYGWIN=1
;;
esac
AC_SUBST(USE_SOVERSION)
AC_SUBST(USE_SOVERLINUX)
AC_SUBST(USE_SOVERSOLARIS)
AC_SUBST(USE_SOVERCYGWIN)
AC_SUBST(USE_MACVERSION)
AC_SUBST(USE_SOTWOSYMLINKS)
AC_SUBST(SONAME_FLAG)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_DEPS
dnl
dnl Detects available C/C++ dependency tracking options
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_DEPS],
[
AC_ARG_ENABLE([dependency-tracking],
AS_HELP_STRING([--disable-dependency-tracking],
[don't use dependency tracking even if the compiler can]),
[bk_use_trackdeps="$enableval"])
AC_MSG_CHECKING([for dependency tracking method])
BK_DEPS=""
if test "x$bk_use_trackdeps" = "xno" ; then
DEPS_TRACKING=0
AC_MSG_RESULT([disabled])
else
DEPS_TRACKING=1
if test "x$GCC" = "xyes"; then
DEPSMODE=gcc
DEPSFLAG="-MMD"
AC_MSG_RESULT([gcc])
elif test "x$SUNCC" = "xyes"; then
DEPSMODE=unixcc
DEPSFLAG="-xM1"
AC_MSG_RESULT([Sun cc])
elif test "x$SGICC" = "xyes"; then
DEPSMODE=unixcc
DEPSFLAG="-M"
AC_MSG_RESULT([SGI cc])
elif test "x$HPCC" = "xyes"; then
DEPSMODE=unixcc
DEPSFLAG="+make"
AC_MSG_RESULT([HP cc])
elif test "x$COMPAQCC" = "xyes"; then
DEPSMODE=gcc
DEPSFLAG="-MD"
AC_MSG_RESULT([Compaq cc])
else
DEPS_TRACKING=0
AC_MSG_RESULT([none])
fi
if test $DEPS_TRACKING = 1 ; then
AC_BAKEFILE_CREATE_FILE_BK_DEPS
chmod +x bk-deps
dnl FIXME: make this $(top_builddir)/bk-deps once autoconf-2.60
dnl is required (and so top_builddir is never empty):
BK_DEPS="`pwd`/bk-deps"
fi
fi
AC_SUBST(DEPS_TRACKING)
AC_SUBST(BK_DEPS)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_CHECK_BASIC_STUFF
dnl
dnl Checks for presence of basic programs, such as C and C++ compiler, "ranlib"
dnl or "install"
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF],
[
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_SUBST(MAKE_SET)
if test "x$SUNCXX" = "xyes"; then
dnl Sun C++ compiler requires special way of creating static libs;
dnl see here for more details:
dnl https://github.com/wxWidgets/wxWidgets/issues/22004
AR=$CXX
AROPTIONS="-xar -o"
AC_SUBST(AR)
elif test "x$SGICC" = "xyes"; then
dnl Almost the same as above for SGI mipsPro compiler
AR=$CXX
AROPTIONS="-ar -o"
AC_SUBST(AR)
else
AC_CHECK_TOOL(AR, ar, ar)
AROPTIONS=rc
fi
AC_SUBST(AROPTIONS)
AC_CHECK_TOOL(STRIP, strip, :)
AC_CHECK_TOOL(NM, nm, :)
dnl Don't use `install -d`, see https://github.com/wxWidgets/wxWidgets/issues/13452
INSTALL_DIR="mkdir -p"
AC_SUBST(INSTALL_DIR)
LDFLAGS_GUI=
case ${BAKEFILE_HOST} in
*-*-cygwin* | *-*-mingw32* | *-*-mingw64* )
LDFLAGS_GUI="-mwindows"
esac
AC_SUBST(LDFLAGS_GUI)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_RES_COMPILERS
dnl
dnl Checks for presence of resource compilers for win32 or mac
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_RES_COMPILERS],
[
case ${BAKEFILE_HOST} in
*-*-cygwin* | *-*-mingw32* | *-*-mingw64* )
dnl Check for win32 resources compiler:
AC_CHECK_TOOL(WINDRES, windres)
;;
esac
AC_SUBST(WINDRES)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_PRECOMP_HEADERS
dnl
dnl Check for precompiled headers support (GCC >= 3.4)
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS],
[
AC_ARG_ENABLE([precomp-headers],
AS_HELP_STRING([--disable-precomp-headers],
[don't use precompiled headers even if compiler can]),
[bk_use_pch="$enableval"])
GCC_PCH=0
ICC_PCH=0
USE_PCH=0
BK_MAKE_PCH=""
case ${BAKEFILE_HOST} in
*-*-cygwin* )
dnl PCH support is broken in cygwin gcc because of unportable
dnl assumptions about mmap() in gcc code which make PCH generation
dnl fail erratically; disable PCH completely until this is fixed
bk_use_pch="no"
;;
esac
if test "x$bk_use_pch" = "x" -o "x$bk_use_pch" = "xyes" ; then
if test "x$GCC" = "xyes"; then
dnl test if we have gcc-3.4:
AC_MSG_CHECKING([if the compiler supports precompiled headers])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
[
#if !defined(__GNUC__) || !defined(__GNUC_MINOR__)
There is no PCH support
#endif
#if (__GNUC__ < 3)
There is no PCH support
#endif
#if (__GNUC__ == 3) && \
((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \
( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) || \
( defined(__INTEL_COMPILER) )
There is no PCH support
#endif
])],
[
AC_MSG_RESULT([yes])
GCC_PCH=1
],
[
if test "$INTELCXX8" = "yes"; then
AC_MSG_RESULT([yes])
ICC_PCH=1
if test "$INTELCXX10" = "yes"; then
ICC_PCH_CREATE_SWITCH="-pch-create"
ICC_PCH_USE_SWITCH="-pch-use"
else
ICC_PCH_CREATE_SWITCH="-create-pch"
ICC_PCH_USE_SWITCH="-use-pch"
fi
else
AC_MSG_RESULT([no])
fi
])
if test $GCC_PCH = 1 -o $ICC_PCH = 1 ; then
USE_PCH=1
AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH
chmod +x bk-make-pch
dnl FIXME: make this $(top_builddir)/bk-make-pch once
dnl autoconf-2.60 is required (and so top_builddir is
dnl never empty):
BK_MAKE_PCH="`pwd`/bk-make-pch"
fi
fi
fi
AC_SUBST(GCC_PCH)
AC_SUBST(ICC_PCH)
AC_SUBST(ICC_PCH_CREATE_SWITCH)
AC_SUBST(ICC_PCH_USE_SWITCH)
AC_SUBST(BK_MAKE_PCH)
])
dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE([autoconf_inc.m4 inclusion])
dnl
dnl To be used in configure.ac of any project using Bakefile-generated mks
dnl
dnl Behaviour can be modified by setting following variables:
dnl BAKEFILE_CHECK_BASICS set to "no" if you don't want bakefile to
dnl to perform check for basic tools like ranlib
dnl BAKEFILE_HOST set this to override host detection, defaults
dnl to ${host}
dnl BAKEFILE_FORCE_PLATFORM set to override platform detection
dnl
dnl Example usage:
dnl
dnl AC_BAKEFILE([FOO(autoconf_inc.m4)])
dnl
dnl (replace FOO with m4_include above, aclocal would die otherwise)
dnl (yes, it's ugly, but thanks to a bug in aclocal, it's the only thing
dnl we can do...)
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE],
[
AC_PREREQ([2.58])
dnl We need to always run C/C++ compiler tests, but it's also possible
dnl for the user to call these macros manually, hence this instead of
dnl simply calling these macros. See http://www.bakefile.org/ticket/64
AC_REQUIRE([AC_BAKEFILE_PROG_CC])
AC_REQUIRE([AC_BAKEFILE_PROG_CXX])
if test "x$BAKEFILE_HOST" = "x"; then
if test "x${host}" = "x" ; then
AC_MSG_ERROR([You must call the autoconf "CANONICAL_HOST" macro in your configure.ac (or .in) file.])
fi
BAKEFILE_HOST="${host}"
fi
if test "x$BAKEFILE_CHECK_BASICS" != "xno"; then
AC_BAKEFILE_CHECK_BASIC_STUFF
fi
AC_BAKEFILE_GNUMAKE
AC_BAKEFILE_PLATFORM
AC_BAKEFILE_PLATFORM_SPECIFICS
AC_BAKEFILE_SUFFIXES
AC_BAKEFILE_SHARED_LD
AC_BAKEFILE_SHARED_VERSIONS
AC_BAKEFILE_DEPS
AC_BAKEFILE_RES_COMPILERS
dnl OBJCFLAGS is set by Autoconf, but OBJCXXFLAGS is not:
AC_SUBST(OBJCXXFLAGS)
BAKEFILE_BAKEFILE_M4_VERSION="0.2.13"
dnl includes autoconf_inc.m4:
$1
if test "$BAKEFILE_AUTOCONF_INC_M4_VERSION" = "" ; then
AC_MSG_ERROR([No version found in autoconf_inc.m4 - bakefile macro was changed to take additional argument, perhaps configure.ac wasn't updated (see the documentation)?])
fi
if test "$BAKEFILE_BAKEFILE_M4_VERSION" != "$BAKEFILE_AUTOCONF_INC_M4_VERSION" ; then
AC_MSG_ERROR([Versions of Bakefile used to generate makefiles ($BAKEFILE_AUTOCONF_INC_M4_VERSION) and configure ($BAKEFILE_BAKEFILE_M4_VERSION) do not match.])
fi
])
dnl ---------------------------------------------------------------------------
dnl Embedded copies of helper scripts follow:
dnl ---------------------------------------------------------------------------
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_DEPS],
[
dnl ===================== bk-deps begins here =====================
dnl (Created by merge-scripts.py from bk-deps
dnl file do not edit here!)
D='$'
cat <<EOF >bk-deps
#!/bin/sh
# This script is part of Bakefile (http://www.bakefile.org) autoconf
# script. It is used to track C/C++ files dependencies in portable way.
#
# Permission is given to use this file in any way.
DEPSMODE=${DEPSMODE}
DEPSFLAG="${DEPSFLAG}"
DEPSDIRBASE=.deps
if test ${D}DEPSMODE = gcc ; then
${D}* ${D}{DEPSFLAG}
status=${D}?
# determine location of created files:
while test ${D}# -gt 0; do
case "${D}1" in
-o )
shift
objfile=${D}1
;;
-* )
;;
* )
srcfile=${D}1
;;
esac
shift
done
objfilebase=\`basename ${D}objfile\`
builddir=\`dirname ${D}objfile\`
depfile=\`basename ${D}srcfile | sed -e 's/\\..*${D}/.d/g'\`
depobjname=\`echo ${D}depfile |sed -e 's/\\.d/.o/g'\`
depsdir=${D}builddir/${D}DEPSDIRBASE
mkdir -p ${D}depsdir
# if the compiler failed, we're done:
if test ${D}{status} != 0 ; then
rm -f ${D}depfile
exit ${D}{status}
fi
# move created file to the location we want it in:
if test -f ${D}depfile ; then
sed -e "s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{depsdir}/${D}{objfilebase}.d
rm -f ${D}depfile
else
# "g++ -MMD -o fooobj.o foosrc.cpp" produces fooobj.d
depfile=\`echo "${D}objfile" | sed -e 's/\\..*${D}/.d/g'\`
if test ! -f ${D}depfile ; then
# "cxx -MD -o fooobj.o foosrc.cpp" creates fooobj.o.d (Compaq C++)
depfile="${D}objfile.d"
fi
if test -f ${D}depfile ; then
sed -e "\\,^${D}objfile,!s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{depsdir}/${D}{objfilebase}.d
rm -f ${D}depfile
fi
fi
exit 0
elif test ${D}DEPSMODE = unixcc; then
${D}* || exit ${D}?
# Run compiler again with deps flag and redirect into the dep file.
# It doesn't work if the '-o FILE' option is used, but without it the
# dependency file will contain the wrong name for the object. So it is
# removed from the command line, and the dep file is fixed with sed.
cmd=""
while test ${D}# -gt 0; do
case "${D}1" in
-o )
shift
objfile=${D}1
;;
* )
eval arg${D}#=\\${D}1
cmd="${D}cmd \\${D}arg${D}#"
;;
esac
shift
done
objfilebase=\`basename ${D}objfile\`
builddir=\`dirname ${D}objfile\`
depsdir=${D}builddir/${D}DEPSDIRBASE
mkdir -p ${D}depsdir
eval "${D}cmd ${D}DEPSFLAG" | sed "s|.*:|${D}objfile:|" >${D}{depsdir}/${D}{objfilebase}.d
exit 0
else
${D}*
exit ${D}?
fi
EOF
dnl ===================== bk-deps ends here =====================
])
AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH],
[
dnl ===================== bk-make-pch begins here =====================
dnl (Created by merge-scripts.py from bk-make-pch
dnl file do not edit here!)
D='$'
cat <<EOF >bk-make-pch
#!/bin/sh
# This script is part of Bakefile (http://www.bakefile.org) autoconf
# script. It is used to generated precompiled headers.
#
# Permission is given to use this file in any way.
outfile="${D}{1}"
header="${D}{2}"
shift
shift
builddir=\`echo ${D}outfile | sed -e 's,/\\.pch/.*${D},,g'\`
compiler=""
headerfile=""
while test ${D}{#} -gt 0; do
add_to_cmdline=1
case "${D}{1}" in
-I* )
incdir=\`echo ${D}{1} | sed -e 's/-I\\(.*\\)/\\1/g'\`
if test "x${D}{headerfile}" = "x" -a -f "${D}{incdir}/${D}{header}" ; then
headerfile="${D}{incdir}/${D}{header}"
fi
;;
-use-pch|-use_pch|-pch-use )
shift
add_to_cmdline=0
;;
esac
if test ${D}add_to_cmdline = 1 ; then
compiler="${D}{compiler} ${D}{1}"
fi
shift
done
if test "x${D}{headerfile}" = "x" ; then
echo "error: can't find header ${D}{header} in include paths" >&2
else
if test -f ${D}{outfile} ; then
rm -f ${D}{outfile}
else
mkdir -p \`dirname ${D}{outfile}\`
fi
depsfile="${D}{builddir}/.deps/\`echo ${D}{outfile} | tr '/.' '__'\`.d"
mkdir -p ${D}{builddir}/.deps
if test "x${GCC_PCH}" = "x1" ; then
# can do this because gcc is >= 3.4:
${D}{compiler} -o ${D}{outfile} -MMD -MF "${D}{depsfile}" "${D}{headerfile}"
elif test "x${ICC_PCH}" = "x1" ; then
filename=pch_gen-${D}${D}
file=${D}{filename}.c
dfile=${D}{filename}.d
cat > ${D}file <<EOT
#include "${D}header"
EOT
# using -MF icc complains about differing command lines in creation/use
${D}compiler -c ${ICC_PCH_CREATE_SWITCH} ${D}outfile -MMD ${D}file && \\
sed -e "s,^.*:,${D}outfile:," -e "s, ${D}file,," < ${D}dfile > ${D}depsfile && \\
rm -f ${D}file ${D}dfile ${D}{filename}.o
fi
exit ${D}{?}
fi
EOF
dnl ===================== bk-make-pch ends here =====================
])

View File

@@ -0,0 +1,275 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR

View File

@@ -0,0 +1,181 @@
# Configure paths for SDL
# Sam Lantinga 9/21/99
# stolen from Manish Singh
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
dnl
AC_DEFUN([AM_PATH_SDL],
[dnl
dnl Get the cflags and libraries from the sdl-config script
dnl
AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
sdl_prefix="$withval", sdl_prefix="")
AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
sdl_exec_prefix="$withval", sdl_exec_prefix="")
AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
, enable_sdltest=yes)
if test x$sdl_exec_prefix != x ; then
sdl_args="$sdl_args --exec-prefix=$sdl_exec_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
fi
fi
if test x$sdl_prefix != x ; then
sdl_args="$sdl_args --prefix=$sdl_prefix"
if test x${SDL_CONFIG+set} != xset ; then
SDL_CONFIG=$sdl_prefix/bin/sdl-config
fi
fi
if test "x$prefix" != xNONE; then
PATH="$prefix/bin:$prefix/usr/bin:$PATH"
fi
AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
min_sdl_version=ifelse([$1], ,0.11.0,$1)
AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
no_sdl=""
if test "$SDL_CONFIG" = "no" ; then
no_sdl=yes
else
SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags`
SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs`
sdl_major_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
sdl_minor_version=`$SDL_CONFIG $sdl_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_sdltest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_CXXFLAGS="$CXXFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
dnl
dnl Now check if the installed SDL is sufficiently new. (Also sanity
dnl checks the results of sdl-config to some extent
dnl
rm -f conf.sdltest
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;
/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_sdl_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_sdl_version");
exit(1);
}
if (($sdl_major_version > major) ||
(($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
(($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
]])],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_sdl" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$SDL_CONFIG" = "no" ; then
echo "*** The sdl-config script installed by SDL could not be found"
echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the SDL_CONFIG environment variable to the"
echo "*** full path to sdl-config."
else
if test -f conf.sdltest ; then
:
else
echo "*** Could not run SDL test program, checking why..."
CFLAGS="$CFLAGS $SDL_CFLAGS"
CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
LIBS="$LIBS $SDL_LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM[[
#include <stdio.h>
#include "SDL.h"
int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main
]], [ return 0; ])],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding SDL or finding the wrong"
echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occurred. This usually means SDL was incorrectly installed"
echo "*** or that you have moved SDL since it was installed. In the latter case, you"
echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
CXXFLAGS="$ac_save_CXXFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
SDL_CFLAGS=""
SDL_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS)
rm -f conf.sdltest
])

View File

@@ -0,0 +1,150 @@
dnl visibility.m4 serial 1 (gettext-0.15)
dnl Copyright (C) 2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Modified for use in wxWidgets by Vaclav Slavik:
dnl - don't define HAVE_VISIBILITY (=0) if not supported
dnl - use -fvisibility-inlines-hidden too
dnl - test in C++ mode
dnl Tests whether the compiler supports the command-line option
dnl -fvisibility=hidden and the function and variable attributes
dnl __attribute__((__visibility__("hidden"))) and
dnl __attribute__((__visibility__("default"))).
dnl Does *not* test for __visibility__("protected") - which has tricky
dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
dnl MacOS X.
dnl Does *not* test for __visibility__("internal") - which has processor
dnl dependent semantics.
dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
dnl "really only recommended for legacy code".
dnl Set the variable CFLAG_VISIBILITY.
dnl Defines and sets the variable HAVE_VISIBILITY.
AC_DEFUN([WX_VISIBILITY],
[
AC_REQUIRE([AC_PROG_CC])
if test -n "$GCC"; then
CFLAGS_VISIBILITY="-fvisibility=hidden"
CXXFLAGS_VISIBILITY="-fvisibility=hidden -fvisibility-inlines-hidden"
AC_MSG_CHECKING([for symbols visibility support])
AC_CACHE_VAL(wx_cv_cc_visibility, [
wx_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY"
AC_LANG_PUSH(C++)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[
/* we need gcc >= 4.0, older versions with visibility support
didn't have class visibility: */
#if defined(__GNUC__) && __GNUC__ < 4
error this gcc is too old;
#endif
/* visibility only makes sense for ELF shared libs: */
#if !defined(__ELF__) && !defined(__APPLE__)
error this platform has no visibility;
#endif
/* At the time of Xcode 4.1 / Clang 3, Clang++ still didn't
have the bugs sorted out. These were fixed starting with
Xcode 4.6.0 / Apple Clang 4.2 (which is based on Clang 3.2 so
check for that version too). */
#ifdef __clang__
#ifdef __APPLE__
#if __clang_major__ < 4 \
|| (__clang_major__ == 4 && __clang_minor__ < 2)
error Clang compiler version < 4.2 is broken w.r.t. visibility;
#endif
#else
#if __clang_major__ < 3 \
|| (__clang_major__ == 3 && __clang_minor__ < 2)
error Clang compiler version < 3.2 is broken w.r.t. visibility;
#endif
#endif
#endif
extern __attribute__((__visibility__("hidden"))) int hiddenvar;
extern __attribute__((__visibility__("default"))) int exportedvar;
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
extern __attribute__((__visibility__("default"))) int exportedfunc (void);
class __attribute__((__visibility__("default"))) Foo {
Foo() {}
};
],
[])],
wx_cv_cc_visibility=yes,
wx_cv_cc_visibility=no)
AC_LANG_POP()
CXXFLAGS="$wx_save_CXXFLAGS"])
AC_MSG_RESULT([$wx_cv_cc_visibility])
if test $wx_cv_cc_visibility = yes; then
dnl we do have basic visibility support, now check if we can use it:
dnl
dnl Debian/Ubuntu's gcc 4.1 is affected:
dnl https://bugs.launchpad.net/ubuntu/+source/gcc-4.1/+bug/109262
AC_MSG_CHECKING([for broken libstdc++ visibility])
AC_CACHE_VAL(wx_cv_cc_broken_libstdcxx_visibility, [
wx_save_CXXFLAGS="$CXXFLAGS"
wx_save_LDFLAGS="$LDFLAGS"
CXXFLAGS="$CXXFLAGS $CXXFLAGS_VISIBILITY"
LDFLAGS="$LDFLAGS -shared -fPIC"
AC_LANG_PUSH(C++)
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[
#include <string>
],
[
std::string s("hello");
return s.length();
])],
wx_cv_cc_broken_libstdcxx_visibility=no,
wx_cv_cc_broken_libstdcxx_visibility=yes)
AC_LANG_POP()
CXXFLAGS="$wx_save_CXXFLAGS"
LDFLAGS="$wx_save_LDFLAGS"])
AC_MSG_RESULT([$wx_cv_cc_broken_libstdcxx_visibility])
if test $wx_cv_cc_broken_libstdcxx_visibility = yes; then
AC_MSG_CHECKING([whether we can work around it])
AC_CACHE_VAL(wx_cv_cc_visibility_workaround, [
AC_LANG_PUSH(C++)
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[
#pragma GCC visibility push(default)
#include <string>
#pragma GCC visibility pop
],
[
std::string s("hello");
return s.length();
])],
wx_cv_cc_visibility_workaround=no,
wx_cv_cc_visibility_workaround=yes)
AC_LANG_POP()
])
AC_MSG_RESULT([$wx_cv_cc_visibility_workaround])
if test $wx_cv_cc_visibility_workaround = no; then
dnl we can't use visibility at all then
wx_cv_cc_visibility=no
fi
fi
fi
if test $wx_cv_cc_visibility = yes; then
AC_DEFINE([HAVE_VISIBILITY])
if test $wx_cv_cc_broken_libstdcxx_visibility = yes; then
AC_DEFINE([HAVE_BROKEN_LIBSTDCXX_VISIBILITY])
fi
else
CFLAGS_VISIBILITY=""
CXXFLAGS_VISIBILITY=""
fi
AC_SUBST([CFLAGS_VISIBILITY])
AC_SUBST([CXXFLAGS_VISIBILITY])
fi
])

View File

@@ -0,0 +1,79 @@
# Created: 2005/03/12
# Author: David Elliott
# Usage Example:
# make -f build/autogen.mk ACLOCAL=aclocal-1.9
# This is a simple Makefile to update the UNIX build system in such a
# way that doing a cvs diff on its output files should reveal only the
# true changes, not meaningless differences due to slightly different
# autoconf or aclocal m4 files.
# For aclocal: All necessary m4 files are located in the build/aclocal
# directory. Running aclocal -I build/aclocal when using aclocal 1.9
# will result in an aclocal.m4 which uses m4_include for these files.
ACLOCAL=aclocal
AUTOCONF=autoconf
BAKEFILE_GEN=bakefile_gen
# configure depends on everything else so this will build everything.
.PHONY: all
all: configure
BAKEFILES=\
build/bakefiles/build_cfg.bkl \
build/bakefiles/common.bkl \
build/bakefiles/common_samples.bkl \
build/bakefiles/common_samples_intree.bkl \
build/bakefiles/common_samples_outoftree.bkl \
build/bakefiles/config.bkl \
build/bakefiles/expat.bkl \
build/bakefiles/files.bkl \
build/bakefiles/jpeg.bkl \
build/bakefiles/lexilla.bkl \
build/bakefiles/mac_bundles.bkl \
build/bakefiles/monolithic.bkl \
build/bakefiles/multilib.bkl \
build/bakefiles/opengl.bkl \
build/bakefiles/plugins.bkl \
build/bakefiles/plugins_deps.bkl \
build/bakefiles/png.bkl \
build/bakefiles/regex.bkl \
build/bakefiles/scintilla.bkl \
build/bakefiles/tiff.bkl \
build/bakefiles/version.bkl \
build/bakefiles/wx.bkl \
build/bakefiles/wxpresets/libsample/libsample.bkl \
build/bakefiles/wxpresets/presets/wx.bkl \
build/bakefiles/wxpresets/presets/wx_unix.bkl \
build/bakefiles/wxpresets/presets/wx_win32.bkl \
build/bakefiles/wxpresets/presets/wx_xrc.bkl \
build/bakefiles/zlib.bkl \
tests/test.bkl
# Run bakefile-gen (which generates everything) whenever a bakefile is newer
# than Makefile.in or autoconf_inc.m4.
# This dep is obviously wrong but probably close enough
autoconf_inc.m4 Makefile.in: $(BAKEFILES)
cd build/bakefiles && \
$(BAKEFILE_GEN) -f autoconf
# Run configure whenever configure.ac, aclocal.m4 or autoconf_inc.m4 is updated
configure: configure.ac aclocal.m4 autoconf_inc.m4
$(AUTOCONF)
ACLOCAL_SOURCES = \
build/aclocal/ac_raf_func_which_getservbyname_r.m4 \
build/aclocal/atomic_builtins.m4 \
build/aclocal/ax_func_which_gethostbyname_r.m4 \
build/aclocal/bakefile-lang.m4 \
build/aclocal/bakefile.m4 \
build/aclocal/pkg.m4 \
build/aclocal/sdl.m4 \
build/aclocal/visibility.m4
# Run aclocal whenever acinclude or one of our local m4s is updated.
aclocal.m4: configure.ac acinclude.m4 $(ACLOCAL_SOURCES)
$(ACLOCAL) -I build/aclocal

View File

@@ -0,0 +1,243 @@
<?xml version="1.0" ?>
<bakefile-gen xmlns="http://www.bakefile.org/schema/bakefile-gen">
<!--
The formats below are disabled because wxWidgets doesn't support these
compilers any longer (although bakefile still does).
-->
<disable-formats>borland,dmars,dmars_smake,msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj,watcom</disable-formats>
<!-- These wildcards match all .bkl files in wxWidgets tree: -->
<input>
wx.bkl
../../samples/*.bkl
../../samples/*/*.bkl
../../samples/*/*/*.bkl
../../demos/*.bkl
../../demos/*/*.bkl
../../demos/*/*/*.bkl
../../utils/*.bkl
../../utils/*/*.bkl
../../utils/*/*/*.bkl
../../tests/*.bkl
../../tests/*/*.bkl
</input>
<!-- List of output formats to generate: -->
<add-formats>
autoconf,borland,dmars_smake,dmars,mingw,msvc,msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj,watcom
</add-formats>
<del-formats files="../../samples/*.bkl">
autoconf,msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj
</del-formats>
<del-formats files="../../demos/*.bkl">
msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj
</del-formats>
<del-formats files="../../samples/html/html_samples.bkl">
msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj
</del-formats>
<del-formats files="../../samples/opengl/opengl_samples.bkl">
msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj
</del-formats>
<del-formats files="../../utils/*.bkl">
msvc6prj,msvs2003prj,msvs2005prj,msvs2008prj
</del-formats>
<!-- Some samples use MSVC-specific stuff -->
<del-formats files="../../samples/mfc/mfc.bkl">
autoconf,borland,dmars_smake,dmars,mingw,watcom
</del-formats>
<!-- Default flags (for all formats and bakefiles): -->
<add-flags>-Iformats</add-flags>
<!-- Directories where the files go: -->
<add-flags files="wx.bkl" formats="autoconf">
-o../../Makefile.in
</add-flags>
<add-flags files="wx.bkl" formats="borland">
-o../msw/makefile.bcc
</add-flags>
<add-flags files="wx.bkl" formats="dmars_smake">
-o../msw/makefile.dms
</add-flags>
<add-flags files="wx.bkl" formats="dmars">
-o../msw/makefile.dmc
</add-flags>
<add-flags files="wx.bkl" formats="mingw">
-o../msw/makefile.gcc
</add-flags>
<add-flags files="wx.bkl" formats="msvc">
-o../msw/makefile.vc
</add-flags>
<add-flags files="wx.bkl" formats="watcom">
-o../msw/makefile.wat
</add-flags>
<add-flags files="wx.bkl" formats="msvc6prj">
-o../msw/wx.dsw
</add-flags>
<add-flags files="wx.bkl" formats="msvs2003prj">
-o../msw/wx_vc7.sln
</add-flags>
<add-flags files="wx.bkl" formats="msvs2005prj">
-o../msw/wx_vc8.sln
</add-flags>
<add-flags files="wx.bkl" formats="msvs2008prj">
-o../msw/wx_vc9.sln
</add-flags>
<!-- Format specific settings: -->
<add-flags formats="autoconf">
-DAUTOCONF_MACROS_FILE=../../autoconf_inc.m4
</add-flags>
<!-- Use different names for Visual C++ 200x project files: -->
<add-flags files="../../samples/*/*,../../samples/*/*/*,../../demos/*/*,../../utils/*/*,../../utils/*/*/*,../../tests/*,../../tests/*/*"
formats="msvs2003prj">
-o$(INPUT_FILE_DIR)/$(INPUT_FILE_BASENAME_NOEXT)_vc7.sln
</add-flags>
<add-flags files="../../samples/*/*,../../samples/*/*/*,../../demos/*/*,../../utils/*/*,../../utils/*/*/*,../../tests/*,../../tests/*/*"
formats="msvs2005prj">
-o$(INPUT_FILE_DIR)/$(INPUT_FILE_BASENAME_NOEXT)_vc8.sln
</add-flags>
<add-flags files="../../samples/*/*,../../samples/*/*/*,../../demos/*/*,../../utils/*/*,../../utils/*/*/*,../../tests/*,../../tests/*/*"
formats="msvs2008prj">
-o$(INPUT_FILE_DIR)/$(INPUT_FILE_BASENAME_NOEXT)_vc9.sln
</add-flags>
<add-flags formats="msvs2005prj,msvs2008prj">
-DMSVS_PLATFORMS=win32,win64
</add-flags>
<!-- Makefile specific settings: -->
<add-flags formats="borland,dmars_smake,dmars,mingw,msvc,watcom">
-DWRITE_OPTIONS_FILE=0
</add-flags>
<del-flags formats="borland,dmars_smake,dmars,mingw,msvc,watcom"
files="wx.bkl">
-DWRITE_OPTIONS_FILE=0
</del-flags>
<add-flags files="wx.bkl" formats="borland">
-DOPTIONS_FILE=config.bcc
</add-flags>
<add-flags files="wx.bkl" formats="dmars_smake">
-DOPTIONS_FILE=config.dms
</add-flags>
<add-flags files="wx.bkl" formats="dmars">
-DOPTIONS_FILE=config.dmc
</add-flags>
<add-flags files="wx.bkl" formats="mingw">
-DOPTIONS_FILE=config.gcc
</add-flags>
<add-flags files="wx.bkl" formats="msvc">
-DOPTIONS_FILE=config.vc
</add-flags>
<add-flags files="wx.bkl" formats="watcom">
-DOPTIONS_FILE=config.wat
</add-flags>
<add-flags files="../../*/*">-DWXTOPDIR=../</add-flags>
<add-flags files="../../*/*/*">-DWXTOPDIR=../../</add-flags>
<add-flags files="../../*/*/*/*">-DWXTOPDIR=../../../</add-flags>
<add-flags files="../../*/*/*/*/*">-DWXTOPDIR=../../../../</add-flags>
<add-flags files="../../*/*" formats="borland">
-DOPTIONS_FILE=../build/msw/config.bcc
</add-flags>
<add-flags files="../../*/*" formats="dmars_smake">
-DOPTIONS_FILE=../build/msw/config.dms
</add-flags>
<add-flags files="../../*/*" formats="dmars">
-DOPTIONS_FILE=../build/msw/config.dmc
</add-flags>
<add-flags files="../../*/*" formats="mingw">
-DOPTIONS_FILE=../build/msw/config.gcc
</add-flags>
<add-flags files="../../*/*" formats="msvc">
-DOPTIONS_FILE=../build/msw/config.vc
</add-flags>
<add-flags files="../../*/*" formats="watcom">
-DOPTIONS_FILE=../build/msw/config.wat
</add-flags>
<add-flags files="../../*/*/*" formats="borland">
-DOPTIONS_FILE=../../build/msw/config.bcc
</add-flags>
<add-flags files="../../*/*/*" formats="dmars_smake">
-DOPTIONS_FILE=../../build/msw/config.dms
</add-flags>
<add-flags files="../../*/*/*" formats="dmars">
-DOPTIONS_FILE=../../build/msw/config.dmc
</add-flags>
<add-flags files="../../*/*/*" formats="mingw">
-DOPTIONS_FILE=../../build/msw/config.gcc
</add-flags>
<add-flags files="../../*/*/*" formats="msvc">
-DOPTIONS_FILE=../../build/msw/config.vc
</add-flags>
<add-flags files="../../*/*/*" formats="watcom">
-DOPTIONS_FILE=../../build/msw/config.wat
</add-flags>
<add-flags files="../../*/*/*/*" formats="borland">
-DOPTIONS_FILE=../../../build/msw/config.bcc
</add-flags>
<add-flags files="../../*/*/*/*" formats="dmars_smake">
-DOPTIONS_FILE=../../../build/msw/config.dms
</add-flags>
<add-flags files="../../*/*/*/*" formats="dmars">
-DOPTIONS_FILE=../../../build/msw/config.dmc
</add-flags>
<add-flags files="../../*/*/*/*" formats="mingw">
-DOPTIONS_FILE=../../../build/msw/config.gcc
</add-flags>
<add-flags files="../../*/*/*/*" formats="msvc">
-DOPTIONS_FILE=../../../build/msw/config.vc
</add-flags>
<add-flags files="../../*/*/*/*" formats="watcom">
-DOPTIONS_FILE=../../../build/msw/config.wat
</add-flags>
<add-flags files="../../*/*/*/*/*" formats="borland">
-DOPTIONS_FILE=../../../../build/msw/config.bcc
</add-flags>
<add-flags files="../../*/*/*/*/*" formats="dmars_smake">
-DOPTIONS_FILE=../../../../build/msw/config.dms
</add-flags>
<add-flags files="../../*/*/*/*/*" formats="dmars">
-DOPTIONS_FILE=../../../../build/msw/config.dmc
</add-flags>
<add-flags files="../../*/*/*/*/*" formats="mingw">
-DOPTIONS_FILE=../../../../build/msw/config.gcc
</add-flags>
<add-flags files="../../*/*/*/*/*" formats="msvc">
-DOPTIONS_FILE=../../../../build/msw/config.vc
</add-flags>
<add-flags files="../../*/*/*/*/*" formats="watcom">
-DOPTIONS_FILE=../../../../build/msw/config.wat
</add-flags>
<!-- Makefiles for out-of-tree building of samples on Unix: -->
<add-formats files="../../samples/*/*.bkl,../../samples/*/*/*.bkl">
gnu
</add-formats>
<del-formats files="../../samples/mfc/mfc.bkl,../../samples/webview_chromium/webview_chromium.bkl">
gnu
</del-formats>
<add-flags files="../../samples/*/*.bkl,../../samples/*/*/*.bkl"
formats="gnu">
-DOUT_OF_TREE_MAKEFILES=1 -o$(INPUT_FILE_DIR)/makefile.unx
</add-flags>
<!-- Personal customizations (not in VCS): -->
<include file="Bakefiles.local.bkgen" ignore_missing="1"/>
</bakefile-gen>

View File

@@ -0,0 +1,40 @@
This directory contains Bakefile (see https://www.bakefile.org)
files needed to generate native makefiles for wxWidgets library and
samples.
Use the bakefile_gen utility to regenerate the makefiles (run it in this
directory!). If you run it with no arguments, it will generate all makefiles
that are not up to date.
Use "bakefile_gen -c" to clean generated files.
You can generate or clean only subset of files by specifying -f or -b flags
when invoking bakefile_gen. For example, "bakefile_gen -fborland,msvc" will
only regenerate Borland C++ and MSVC makefiles. -b flag limits
regeneration only to specified bakefiles. For example,
"bakefile_gen -b wx.bkl" will only regenerate main library makefiles.
"bakefile_gen -b "../../samples/html/*/*.bkl" will regenerate makefiles for
all wxHTML samples. -b and -f can be combined.
You can customize the process of generating makefiles by adding file
Bakefiles.local.bkgen (same format as Bakefiles.bkgen) with further settings.
For example, you may disable output for compilers you don't use:
<?xml version="1.0" ?>
<bakefile-gen>
<disable-formats>msvc,msvs2003prj</disable-formats>
</bakefile-gen>
Note: bakefile_gen creates file .bakefile_gen.state with dependencies
information. This file can be safely deleted, but it contains valuable
information that speed up regeneration process.
Note: the following files are generated using bakefile_gen:
* build/msw/*
* makefiles with same names as makefiles in above dirs, Makefile.in files
that contain "This makefile was generated by Bakefile" banner and
VC++ project files in samples, demos and utils directories
* src/wxWindows.dsp
* autoconf_inc.m4
* all Makefile.in files
(hopefully I didn't forget anything - VS)

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" ?>
<makefile>
<!--
Generate build.cfg file on Windows, with settings used to build
the library.
-->
<if cond="FORMAT not in ['autoconf','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">
<set var="BUILD_CFG_FILE" make_var="1">
$(SETUPHDIR)$(DIRSEP)build.cfg
</set>
<action id="build_cfg_file">
<is-phony>1</is-phony>
<dependency-of>all</dependency-of>
<depends>libdir_setup</depends>
<command>
@echo WXVER_MAJOR=$(WXVER_MAJOR) >$(BUILD_CFG_FILE)
@echo WXVER_MINOR=$(WXVER_MINOR) >>$(BUILD_CFG_FILE)
@echo WXVER_RELEASE=$(WXVER_RELEASE) >>$(BUILD_CFG_FILE)
@echo BUILD=$(BUILD) >>$(BUILD_CFG_FILE)
@echo MONOLITHIC=$(MONOLITHIC) >>$(BUILD_CFG_FILE)
@echo SHARED=$(SHARED) >>$(BUILD_CFG_FILE)
@echo UNICODE=1 >>$(BUILD_CFG_FILE)
@echo TOOLKIT=$(TOOLKIT) >>$(BUILD_CFG_FILE)
@echo TOOLKIT_VERSION=$(TOOLKIT_VERSION) >>$(BUILD_CFG_FILE)
@echo WXUNIV=$(WXUNIV) >>$(BUILD_CFG_FILE)
@echo CFG=$(CFG) >>$(BUILD_CFG_FILE)
@echo VENDOR=$(VENDOR) >>$(BUILD_CFG_FILE)
@echo OFFICIAL_BUILD=$(OFFICIAL_BUILD) >>$(BUILD_CFG_FILE)
@echo DEBUG_FLAG=$(DEBUG_FLAG) >>$(BUILD_CFG_FILE)
@echo DEBUG_INFO=$(DEBUG_INFO) >>$(BUILD_CFG_FILE)
@echo RUNTIME_LIBS=$(RUNTIME_LIBS) >>$(BUILD_CFG_FILE)
@echo USE_EXCEPTIONS=$(USE_EXCEPTIONS) >>$(BUILD_CFG_FILE)
@echo USE_RTTI=$(USE_RTTI) >>$(BUILD_CFG_FILE)
@echo USE_THREADS=$(USE_THREADS) >>$(BUILD_CFG_FILE)
@echo USE_AUI=$(USE_AUI) >>$(BUILD_CFG_FILE)
@echo USE_GUI=$(USE_GUI) >>$(BUILD_CFG_FILE)
@echo USE_HTML=$(USE_HTML) >>$(BUILD_CFG_FILE)
@echo USE_MEDIA=$(USE_MEDIA) >>$(BUILD_CFG_FILE)
@echo USE_OPENGL=$(USE_OPENGL) >>$(BUILD_CFG_FILE)
@echo USE_QA=$(USE_QA) >>$(BUILD_CFG_FILE)
@echo USE_PROPGRID=$(USE_PROPGRID) >>$(BUILD_CFG_FILE)
@echo USE_RIBBON=$(USE_RIBBON) >>$(BUILD_CFG_FILE)
@echo USE_RICHTEXT=$(USE_RICHTEXT) >>$(BUILD_CFG_FILE)
@echo USE_STC=$(USE_STC) >>$(BUILD_CFG_FILE)
@echo USE_WEBVIEW=$(USE_WEBVIEW) >>$(BUILD_CFG_FILE)
@echo USE_WEBVIEW_CHROMIUM=$(USE_WEBVIEW_CHROMIUM) >>$(BUILD_CFG_FILE)
@echo USE_XML=$(USE_XML) >>$(BUILD_CFG_FILE)
@echo USE_XRC=$(USE_XRC) >>$(BUILD_CFG_FILE)
@echo COMPILER=$(COMPILER) >>$(BUILD_CFG_FILE)
@echo COMPILER_VERSION=$(COMPILER_VERSION) >>$(BUILD_CFG_FILE)
@echo CC=$(CC) >>$(BUILD_CFG_FILE)
@echo CXX=$(CXX) >>$(BUILD_CFG_FILE)
@echo CFLAGS=$(CFLAGS) >>$(BUILD_CFG_FILE)
@echo CPPFLAGS=$(CPPFLAGS) >>$(BUILD_CFG_FILE)
@echo CXXFLAGS=$(CXXFLAGS) >>$(BUILD_CFG_FILE)
@echo LDFLAGS=$(LDFLAGS) >>$(BUILD_CFG_FILE)
</command>
</action>
</if>
</makefile>

View File

@@ -0,0 +1,930 @@
<?xml version="1.0" ?>
<makefile>
<requires version="0.2.7"/>
<!-- bakefile modules we need: -->
<using module="datafiles"/>
<!-- load python module with wxwindows helpers: -->
<using module="wxwin"/>
<!-- DFE: Add a platform meaning regular MacOS (not OS X) -->
<!-- FIXME: This will be handled in Bakefile but for now I wanted to
get my changes to the wx bakefiles in the tree but invisible to
windows toolkits and their config.xxx settings -->
<if cond="FORMAT=='autoconf'">
<option name="PLATFORM_MACOS"/>
</if>
<if cond="FORMAT!='autoconf'">
<set var="PLATFORM_MACOS">0</set>
</if>
<set var="PLATFORM_QT">0</set>
<include file="config.bkl"/>
<include file="plugins_deps.bkl"/>
<!-- wxWidgets version numbers logic: -->
<include file="version.bkl"/>
<set var="ARCH_SUFFIX">
<if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORM=='win64'">_x64</if>
<if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORM=='win64'">_x64</if>
<if cond="TARGET_CPU=='amd64'">_x64</if>
<if cond="TARGET_CPU=='AMD64'">_x64</if>
<if cond="TARGET_CPU=='arm'">_arm</if>
<if cond="TARGET_CPU=='ARM'">_arm</if>
<if cond="TARGET_CPU=='arm64'">_arm64</if>
<if cond="TARGET_CPU=='ARM64'">_arm64</if>
<if cond="TARGET_CPU=='ia64'">_ia64</if>
<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>
<!-- ================================================================== -->
<!-- Names of libraries and DLLs: -->
<!-- ================================================================== -->
<set var="PORTNAME">
<if cond="USE_GUI=='0'">base</if>
<if cond="USE_GUI=='1'">$(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)</if>
</set>
<set var="WXBASEPORT">
<if cond="TOOLKIT=='MAC'">_carbon</if>
</set>
<!--
Optional compiler version, mainly for Windows compilers for which it is
supposed to be set on make command line for the official builds.
-->
<set var="COMPILER_VERSION" make_var="1">
<if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'">ERROR-COMPILER-VERSION-MUST-BE-SET-FOR-OFFICIAL-BUILD</if>
</set>
<set var="COMPILERORGCC">
<if cond="isdefined('COMPILER')">$(COMPILER)</if>
<if cond="not isdefined('COMPILER')">gcc</if>
</set>
<!--
In the official builds we use not only the compiler name but also its
version and architecture we compile for in the libraries names.
-->
<set var="WXCOMPILER">
<if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'">_$(COMPILERORGCC)$(COMPILER_VERSION)$(ARCH_SUFFIX)</if>
<if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(COMPILERORGCC)$(ARCH_SUFFIX)</if>
</set>
<set var="VENDORTAG">
<if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='1'"></if>
<if cond="PLATFORM_WIN32=='1' and OFFICIAL_BUILD=='0'">_$(VENDOR)</if>
</set>
<!-- debug suffix used for Windows libraries which use debug CRT -->
<set var="WXDEBUGFLAG">
<if cond="BUILD=='debug' and DEBUG_RUNTIME_LIBS=='default'">d</if>
<if cond="DEBUG_RUNTIME_LIBS=='1'">d</if>
</set>
<set var="WX_U_D_SUFFIX">
u$(WXDEBUGFLAG)
</set>
<set var="WXNAMESUFFIX">
$(WX_U_D_SUFFIX)$(WX_LIB_FLAVOUR)
</set>
<set var="WXUNIVNAME">
<if cond="WXUNIV=='1'">univ</if>
</set>
<set var="WXUNIV_DEFINE">
<if cond="WXUNIV=='1'">__WXUNIVERSAL__</if>
</set>
<if cond="FORMAT=='autoconf'">
<set var="WXNAMEPREFIX">wx_base$(WXBASEPORT)</set>
<set var="WXNAMEPREFIXGUI">wx_$(PORTNAME)$(WXUNIVNAME)</set>
<set var="WXVERSIONTAG">-$(WX_RELEASE)</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="WXNAMEPREFIX">
wxbase$(WXBASEPORT)$(WX_RELEASE_NODOT)
</set>
<set var="WXNAMEPREFIXGUI">
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)</set>
<set var="WXVERSIONTAG"></set>
</if>
<set var="WXDLLNAMEPREFIX">
<if cond="PLATFORM_WIN32=='1'">
wxbase$(WXBASEPORT)$(WXWIN32DLLVERSION)
</if>
<if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIX)</if>
</set>
<set var="WXDLLNAMEPREFIXGUI">
<if cond="PLATFORM_WIN32=='1'">
wx$(PORTNAME)$(WXUNIVNAME)$(WXWIN32DLLVERSION)
</if>
<if cond="PLATFORM_WIN32=='0'">$(WXNAMEPREFIXGUI)</if>
</set>
<set var="WXDLLVERSIONTAG">
<if cond="PLATFORM_WIN32=='1'"></if>
<if cond="PLATFORM_WIN32=='0'">$(WXVERSIONTAG)</if>
</set>
<!-- =============================================================== -->
<!-- Names of component libraries: -->
<!-- =============================================================== -->
<set var="WXLIB_BASE">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
</set>
<set var="WXLIB_NET">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('net')))</if>
</set>
<set var="WXLIB_QA">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('qa')))</if>
</set>
<set var="WXLIB_CORE">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
</set>
<set var="WXLIB_ADV">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('adv')))</if>
</set>
<set var="WXLIB_MEDIA">
<if cond="MONOLITHIC=='0' and USE_MEDIA=='1'">$(mk.evalExpr(wxwin.mkLibName('media')))</if>
</set>
<set var="WXLIB_HTML">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('html')))</if>
</set>
<set var="WXLIB_XML">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xml')))</if>
</set>
<set var="WXLIB_XRC">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('xrc')))</if>
</set>
<set var="WXLIB_AUI">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('aui')))</if>
</set>
<set var="WXLIB_RIBBON">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('ribbon')))</if>
</set>
<set var="WXLIB_PROPGRID">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('propgrid')))</if>
</set>
<set var="WXLIB_RICHTEXT">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('richtext')))</if>
</set>
<set var="WXLIB_STC">
<if cond="MONOLITHIC=='0' and USE_STC=='1'">$(mk.evalExpr(wxwin.mkLibName('stc')))</if>
</set>
<set var="WXLIB_WEBVIEW">
<if cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'">$(mk.evalExpr(wxwin.mkLibName('webview')))</if>
</set>
<set var="WXLIB_MONO">
<if cond="MONOLITHIC=='1'">$(mk.evalExpr(wxwin.mkLibName('mono')))</if>
</set>
<!-- =============================================================== -->
<!-- Where to store built libraries and objects: -->
<!-- =============================================================== -->
<if cond="FORMAT!='autoconf'">
<set var="WXDLLFLAG">
<if cond="SHARED=='1'">dll</if>
</set>
<set var="CFG_NAME_PART">
$(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)$(WXDLLFLAG)$(CFG)
</set>
<!-- NB: this is make_var so that it can be overridden on command line
like this: nmake -f makefile.vc COMPILER_PREFIX=vc6 -->
<set var="COMPILER_PREFIX" make_var="1">$(COMPILER)</set>
<set var="OBJS" make_var="1">
$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(CFG_NAME_PART)
</set>
<set var="BUILDDIR">$(OBJS)</set>
</if>
<set var="LIBTYPE_SUFFIX" make_var="1">
<if cond="FORMAT!='autoconf' and SHARED=='0' and PLATFORM_WIN32=='1'">lib</if>
<if cond="FORMAT!='autoconf' and SHARED=='1' and PLATFORM_WIN32=='1'">dll</if>
<if cond="FORMAT=='watcom' and SHARED=='0' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_lib</if>
<if cond="FORMAT=='watcom' and SHARED=='1' and PLATFORM_WIN32=='0'">$(TOOLKIT_LOWERCASE)_dll</if>
</set>
<set var="LIBDIRNAME" make_var="1">
<if cond="FORMAT=='autoconf'">$(wx_top_builddir)/lib</if>
<if cond="FORMAT!='autoconf'">
$(nativePaths(TOP_SRCDIR))lib$(DIRSEP)$(COMPILER_PREFIX)$(COMPILER_VERSION)$(ARCH_SUFFIX)_$(LIBTYPE_SUFFIX)$(CFG)
</if>
</set>
<if cond="FORMAT!='autoconf'">
<set var="SETUPHDIR" make_var="1">
$(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)
</set>
</if>
<!-- =============================================================== -->
<!-- Templates for libs: -->
<!-- =============================================================== -->
<set var="DEBUGINFO">
<if cond="BUILD=='debug' and DEBUG_INFO=='default'">on</if>
<if cond="DEBUG_INFO=='1'">on</if>
<if cond="BUILD=='release' and DEBUG_INFO=='default'">off</if>
<if cond="DEBUG_INFO=='0'">off</if>
</set>
<set var="DEBUGRUNTIME">
<if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='debug'">on</if>
<if cond="DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">off</if>
<if cond="DEBUG_RUNTIME_LIBS=='0'">off</if>
<if cond="DEBUG_RUNTIME_LIBS=='1'">on</if>
</set>
<set var="OPTIMIZEFLAG">
<if cond="BUILD=='debug'">off</if>
<if cond="BUILD=='release'">speed</if>
</set>
<set var="EXCEPTIONSFLAG">
<if cond="USE_EXCEPTIONS=='1'">on</if>
<if cond="USE_EXCEPTIONS=='0'">off</if>
</set>
<set var="RTTIFLAG">
<if cond="USE_RTTI=='1'">on</if>
<if cond="USE_RTTI=='0'">off</if>
</set>
<set var="THREADSFLAG">
<if cond="USE_THREADS=='1'">multi</if>
<if cond="USE_THREADS=='0'">single</if>
</set>
<set var="RTTI_DEFINE">
<if cond="USE_RTTI=='0'">wxNO_RTTI</if>
</set>
<set var="EXCEPTIONS_DEFINE">
<if cond="USE_EXCEPTIONS=='0'">wxNO_EXCEPTIONS</if>
</set>
<set var="THREAD_DEFINE">
<if cond="USE_THREADS=='0'">wxNO_THREADS</if>
</set>
<set var="DEBUG_DEFINE">
<if cond="DEBUG_FLAG=='0'">wxDEBUG_LEVEL=0</if>
</set>
<set var="NDEBUG_DEFINE">
<if cond="FORMAT!='autoconf' and DEBUG_RUNTIME_LIBS=='default' and BUILD=='release'">NDEBUG</if>
<if cond="FORMAT!='autoconf' and DEBUG_RUNTIME_LIBS=='0'">NDEBUG</if>
</set>
<!-- does not cover all cases, but better than nothing -->
<set var="NO_VC_CRTDBG">
<if cond="FORMAT=='msvc' and BUILD=='debug' and DEBUG_RUNTIME_LIBS=='0'">__NO_VC_CRTDBG__</if>
<if cond="FORMAT=='msvc' and BUILD=='release' and DEBUG_FLAG=='1'">__NO_VC_CRTDBG__</if>
</set>
<!-- fill for the specific case of the format/compiler -->
<set var="WIN32_WINNT">
<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>
<set var="CAIRO_LIBDIR">
<if cond="USE_CAIRO=='1'">$(DOLLAR)(CAIRO_ROOT)/lib</if>
</set>
<set var="CAIRO_INCLUDEDIR">
<if cond="USE_CAIRO=='1'">$(DOLLAR)(CAIRO_ROOT)/include/cairo</if>
</set>
<set var="LINK_TARGET_CPU">
<if cond="TARGET_CPU=='amd64'">/MACHINE:X64</if>
<if cond="TARGET_CPU=='AMD64'">/MACHINE:X64</if>
<if cond="TARGET_CPU=='arm'">/MACHINE:ARM</if>
<if cond="TARGET_CPU=='ARM'">/MACHINE:ARM</if>
<if cond="TARGET_CPU=='arm64'">/MACHINE:ARM64</if>
<if cond="TARGET_CPU=='ARM64'">/MACHINE:ARM64</if>
<if cond="TARGET_CPU=='ia64'">/MACHINE:IA64</if>
<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">
<!-- system dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='1'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<!-- per-monitor dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='2'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware_pmv2.manifest</if>
</set>
</if>
<if cond="FORMAT=='msvc'">
<set var="WIN32_DPI_LINKFLAG">
<!-- system dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='14.0'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='15.0'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='16.0'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='1' and VISUALSTUDIOVERSION=='17.0'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware.manifest</if>
<!-- per-monitor dpi -->
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='14.0'">/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'">/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'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_dpi_aware_pmv2.manifest</if>
<if cond="USE_DPI_AWARE_MANIFEST=='2' and VISUALSTUDIOVERSION=='17.0'">/MANIFEST:EMBED /MANIFESTINPUT:$(TOP_SRCDIR)include/wx/msw/wx_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>
<optimize>$(OPTIMIZEFLAG)</optimize>
<threading>$(THREADSFLAG)</threading>
<runtime-libs>$(RUNTIME_LIBS)</runtime-libs>
<cxx-rtti>$(RTTIFLAG)</cxx-rtti>
<cxx-exceptions>$(EXCEPTIONSFLAG)</cxx-exceptions>
<if cond="FORMAT!='autoconf'">
<cppflags>$(EXTRACFLAGS)</cppflags>
</if>
<!-- Suppress deprecation warnings for standard library calls -->
<if cond="FORMAT in ['msvc','msvs2005prj','msvs2008prj']">
<define>_CRT_SECURE_NO_DEPRECATE=1</define>
<define>_CRT_NON_CONFORMING_SWPRINTFS=1</define>
<define>_SCL_SECURE_NO_WARNINGS=1</define>
</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>
</template>
<template id="3rdparty_lib_base" template="common_settings,anylib">
<!--
we want to install 3rd party libs system-wide only with static
version of wxWidgets; otherwise they are embedded in shared libs:
-->
<install-if>SHARED=='0'</install-if>
<pic>$(substituteFromDict(SHARED, {'0':'off', '1':'on'}))</pic>
<!--
we don't want to have asserts in the 3rd party libraries code,
neither we nor wx users are interested in debugging them anyhow
-->
<define>NDEBUG</define>
<if cond="IS_MSVC">
<!--
we're not interested in deprecation warnings about the use of
standard C functions in the 3rd party libraries (these warnings
are only given by VC8+ but it's simpler to just always define
this symbol which disables them, even for previous VC versions)
-->
<define>_CRT_SECURE_NO_WARNINGS</define>
</if>
</template>
<!--
This template is used for most third party libraries.
Note: when inheriting from this template, template_append should
be normally used instead of just template, to ensure that the built-in
third party libraries include directories appear before the ones
defined here (which could include the same headers).
-->
<template id="3rdparty_lib" template="3rdparty_lib_base">
<if cond="FORMAT=='autoconf'">
<libname>$(id)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)</libname>
</if>
<if cond="FORMAT!='autoconf'">
<libname>$(id)$(WXDEBUGFLAG)$(HOST_SUFFIX)</libname>
</if>
</template>
<!-- This one is only used by wxregex currently and additionally includes
"u" suffix in the library name for compatibility. -->
<template id="3rdparty_lib_u" template="3rdparty_lib_base">
<libname cond="FORMAT=='autoconf'">
$(id)u$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</libname>
<libname cond="FORMAT!='autoconf'">
$(id)u$(WXDEBUGFLAG)$(HOST_SUFFIX)
</libname>
</template>
<!-- deal with the need to copy setup.h here: -->
<define-tag name="msvc-headers" rules="dll,lib">
<if cond="IS_MSVC_PRJ">
<msvc-project-files>
$(addPrefixToList('include\\', wxwin.headersOnly(value)))
</msvc-project-files>
</if>
</define-tag>
<set var="msvc_copy_setup_h_script">
<if cond="IS_MSVC_PRJ=='1' and FORMAT!='msvc6prj'">
Creating $(SETUPHDIR)\wx\setup.h
InputPath=..\..\include\wx\%s
"$(SETUPHDIR)\wx\setup.h" :
$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
</if>
<if cond="IS_MSVC_PRJ=='1' and FORMAT=='msvc6prj'">
Creating $(SETUPHDIR)\wx\setup.h
InputPath=..\..\include\wx\%s
"$(SETUPHDIR)\wx\setup.h" : $(DOLLAR)(SOURCE) "$(DOLLAR)(INTDIR)" "$(DOLLAR)(OUTDIR)"
$(TAB)copy "$(DOLLAR)(InputPath)" $(SETUPHDIR)\wx\setup.h
</if>
</set>
<define-tag name="msvc-headers-setup-h" rules="dll,lib">
<if cond="IS_MSVC_PRJ">
<msvc-headers>
$(addPrefixToList('wx/', value))
</msvc-headers>
<set var="_custom_build_files" append="1">
$(nativePaths(addPrefixToList('include/wx/', value)))
</set>
</if>
</define-tag>
<define-tag name="msvc-copy-setup-h" rules="dll,lib">
<if cond="IS_MSVC_PRJ">
<msvc-headers-setup-h>
msw/setup.h
univ/setup.h
</msvc-headers-setup-h>
<set var="_custom_build_include_wx_msw_setup_h">
<if cond="WXUNIV=='0' and TOOLKIT=='MSW'">
$(msvc_copy_setup_h_script % 'msw\setup.h')
</if>
</set>
<set var="_custom_build_include_wx_gtk_setup_h">
<if cond="WXUNIV=='0' and TOOLKIT=='GTK'">
$(msvc_copy_setup_h_script % 'gtk\setup.h')
</if>
</set>
<set var="_custom_build_include_wx_univ_setup_h">
<if cond="WXUNIV=='1'">
$(msvc_copy_setup_h_script % 'univ\setup.h')
</if>
</set>
</if>
</define-tag>
<define-tag name="msvc-create-rcdefs-h" rules="dll,lib">
<if cond="IS_MSVC_PRJ">
<msvc-headers-setup-h>
msw/genrcdefs.h
</msvc-headers-setup-h>
<set var="_custom_build_include_wx_msw_genrcdefs_h">
Creating $(SETUPHDIR)\wx\msw\rcdefs.h
InputPath=..\..\include\wx\msw\genrcdefs.h
"$(SETUPHDIR)\wx\msw\rcdefs.h" : "$(DOLLAR)(SOURCE)" "$(SETUPHDIR)\wx\msw"
$(TAB)cl /EP /nologo "$(DOLLAR)(InputPath)" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
</set>
</if>
</define-tag>
<template id="msvc_setup_h">
<msvc-copy-setup-h/>
<msvc-create-rcdefs-h/>
</template>
<!-- =============================================================== -->
<!-- 3rd party libs: -->
<!-- =============================================================== -->
<!-- 3rd party libraries: -->
<include file="regex.bkl"/>
<include file="zlib.bkl"/>
<include file="png.bkl"/>
<include file="webp.bkl"/>
<include file="jpeg.bkl"/>
<include file="tiff.bkl"/>
<include file="expat.bkl"/>
<include file="scintilla.bkl"/>
<include file="lexilla.bkl"/>
<!-- =============================================================== -->
<!-- Templates for wxWidgets libs: -->
<!-- =============================================================== -->
<!-- NB: in monolithic build, even wxBase-only must be linked against
GUI extralibs, otherwise there would be unresolved references.
The variables below are defined so that all libs are used
in monolithic build, but not in multilib one. -->
<set var="EXTRALIBS_FOR_BASE">
<if cond="MONOLITHIC=='1'">$(EXTRALIBS) $(EXTRALIBS_XML) $(EXTRALIBS_GUI)</if>
<if cond="MONOLITHIC=='0'">$(EXTRALIBS)</if>
</set>
<set var="EXTRALIBS_FOR_GUI">
<if cond="MONOLITHIC=='1'"></if>
<if cond="MONOLITHIC=='0'">$(EXTRALIBS_GUI)</if>
</set>
<!-- GTK+ under Windows requires -mms-bitfields gcc switch -->
<set var="CXXFLAGS_GTK_WINDOWS_GCC">
<if cond="TOOLKIT=='GTK' and FORMAT=='mingw'">-mms-bitfields</if>
</set>
<template id="wx" template="common_settings">
<set var="wxid">$(wxwin.mk_wxid(id))</set>
<define>__WX$(TOOLKIT)__</define>
<define>$(WXUNIV_DEFINE)</define>
<define>$(DEBUG_DEFINE)</define>
<define>$(NDEBUG_DEFINE)</define>
<define>$(EXCEPTIONS_DEFINE)</define>
<define>$(RTTI_DEFINE)</define>
<define>$(THREAD_DEFINE)</define>
<include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
<include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include>
<include cond="FORMAT!='autoconf'">$(CAIRO_INCLUDEDIR)</include>
<lib-path>$(LIBDIRNAME)</lib-path>
<warnings>max</warnings>
<cppflags-watcom>
-wcd=549 <!-- 'sizeof' operand contains compiler generated information -->
-wcd=656 <!-- define this function inside its class definition (may improve code quality) -->
-wcd=657 <!-- define this function inside its class definition (could have improved code quality) -->
-wcd=667 <!-- 'va_start' macro will not work without an argument before '...' -->
</cppflags-watcom>
<cxxflags-mingw>
-Wno-ctor-dtor-privacy <!-- only defines a private destructor and has no friends -->
$(CXXFLAGS_GTK_WINDOWS_GCC)
</cxxflags-mingw>
</template>
<!-- for both GUI and wxBase libs/samples: -->
<template id="wx_append_base_nomono">
<!-- link against builtin 3rd party libs, if needed: -->
<sys-lib>$(LIB_ZLIB)</sys-lib>
<sys-lib>$(LIB_REGEX)</sys-lib>
<sys-lib>$(LIB_EXPAT)</sys-lib>
<ldlibs>$(EXTRALIBS_FOR_BASE)</ldlibs>
<!-- system libraries on windows: -->
<if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1'">
<sys-lib>$(CAIRO_LIB)</sys-lib>
<lib-path>$(CAIRO_LIBDIR)</lib-path>
<if cond="FORMAT=='borland'">
<sys-lib>ole2w32</sys-lib>
</if>
<if cond="FORMAT!='borland'">
<sys-lib>kernel32</sys-lib>
<sys-lib>user32</sys-lib>
<sys-lib>gdi32</sys-lib>
<sys-lib>gdiplus</sys-lib>
<sys-lib>msimg32</sys-lib>
<sys-lib>comdlg32</sys-lib>
<sys-lib>winspool</sys-lib>
<sys-lib>winmm</sys-lib>
<sys-lib>shell32</sys-lib>
<sys-lib>shlwapi</sys-lib>
<sys-lib>comctl32</sys-lib>
<sys-lib>ole32</sys-lib>
<sys-lib>oleaut32</sys-lib>
<sys-lib>uuid</sys-lib>
<sys-lib>rpcrt4</sys-lib>
<sys-lib>advapi32</sys-lib>
<sys-lib>version</sys-lib>
<sys-lib>ws2_32</sys-lib>
<!-- this one is only used if wxUSE_URL_NATIVE==1 but we don't
know if it is here so just add it unconditionally -->
<sys-lib>wininet</sys-lib>
</if>
<!-- For MSVC this library is conditionally included from
wx/msw/libraries.h when wxUSE_ACCESSIBILITY==1 -->
<if cond="IS_MSVC=='0'">
<sys-lib>oleacc</sys-lib>
<sys-lib>uxtheme</sys-lib>
</if>
</if>
</template>
<set var="LIB_GTK">
<if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1' and TOOLKIT=='GTK' and TOOLKIT_VERSION=='2'">gtk-win32-2.0.lib gdk-win32-2.0.lib gio-2.0.lib pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib</if>
<if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1' and TOOLKIT=='GTK' and TOOLKIT_VERSION=='3'">libgtk-3.dll.a libgdk-3.dll.a gio-2.0.lib pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib</if>
<if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1' and TOOLKIT=='GTK' and TOOLKIT_VERSION=='4'">libgtk-4.dll.a libgdk-4.dll.a gio-2.0.lib pangocairo-1.0.lib gdk_pixbuf-2.0.lib cairo.lib pango-1.0.lib gobject-2.0.lib gthread-2.0.lib glib-2.0.lib</if>
</set>
<!-- for GUI libs/samples: -->
<template id="wx_append_nomono" template_append="wx_append_base_nomono">
<sys-lib>$(LIB_TIFF)</sys-lib>
<sys-lib>$(LIB_JPEG)</sys-lib>
<sys-lib>$(LIB_PNG)</sys-lib>
<sys-lib>$(LIB_WEBP)</sys-lib>
<ldlibs>$(LIB_GTK)</ldlibs>
<ldlibs>$(EXTRALIBS_FOR_GUI)</ldlibs>
</template>
<set var="LIB_PNG_IF_MONO">
<if cond="MONOLITHIC=='1'">$(LIB_PNG)</if>
</set>
<set var="LIB_SCINTILLA_IF_MONO">
<if cond="MONOLITHIC=='1' and USE_STC=='1'">$(LIB_SCINTILLA)</if>
</set>
<set var="LIB_LEXILLA_IF_MONO">
<if cond="MONOLITHIC=='1' and USE_STC=='1'">$(LIB_LEXILLA)</if>
</set>
<template id="wx_append_base" template_append="wx_append_base_nomono">
<!-- Always link against the full wx library in monolithic build and
also against the PNG one as core code references it for Tango
icons and so it is pulled in even by the console programs. -->
<sys-lib>$(WXLIB_MONO)</sys-lib>
<sys-lib>$(LIB_PNG_IF_MONO)</sys-lib>
</template>
<template id="wx_append" template_append="wx_append_nomono">
<!-- Always link against the wxWin library in monolithic build: -->
<sys-lib>$(WXLIB_MONO)</sys-lib>
<sys-lib>$(LIB_SCINTILLA_IF_MONO)</sys-lib>
<sys-lib>$(LIB_LEXILLA_IF_MONO)</sys-lib>
</template>
<set var="WX_DISABLE_PRECOMP_HEADERS" overwrite="0">0</set>
<template id="wx_lib_b" template="wx,anylib">
<set var="WXLIBNAME">$(wxwin.mkLibName(wxid))</set>
<libname>$(WXLIBNAME)</libname>
<define>WXBUILDING</define>
<if cond="WX_DISABLE_PRECOMP_HEADERS=='0'">
<if cond="FORMAT!='autoconf'">
<sources>$(WXTOPDIR)src/common/dummy.cpp</sources>
<precomp-headers-gen>
$(WXTOPDIR)src/common/dummy.cpp
</precomp-headers-gen>
</if>
<precomp-headers-location>$(WXTOPDIR)include</precomp-headers-location>
<precomp-headers-header>wx/wxprec.h</precomp-headers-header>
<precomp-headers>on</precomp-headers>
<precomp-headers-file>wxprec_$(id)</precomp-headers-file>
<precomp-headers-exclude>
src/common/extended.c
src/gtk/eggtrayicon.c
src/gtk/treeentry_gtk.c
</precomp-headers-exclude>
</if>
<if cond="IS_MSVC_PRJ=='1' and BUILDING_LIB=='1'">
<msvc-file-group>Common Sources:src/common/*</msvc-file-group>
<msvc-file-group>GTK+ Sources:src/gtk/*</msvc-file-group>
<msvc-file-group>MSW Sources:src/msw/*</msvc-file-group>
<msvc-file-group>Generic Sources:src/generic/*</msvc-file-group>
<msvc-file-group>wxUniv Sources:src/univ/*</msvc-file-group>
<msvc-file-group>wxHTML Sources:src/html/*</msvc-file-group>
<msvc-file-group>Setup Headers:*/setup.h</msvc-file-group>
<msvc-file-group>GTK+ Headers:*wx/gtk/*.h</msvc-file-group>
<msvc-file-group>MSW Headers:*wx/msw/*.h</msvc-file-group>
<msvc-file-group>Generic Headers:*wx/generic/*.h</msvc-file-group>
<msvc-file-group>wxUniv Headers:*wx/univ/*.h</msvc-file-group>
<msvc-file-group>wxHTML Headers:*wx/html/*.h</msvc-file-group>
<msvc-file-group>Common Headers:*wx/*.h</msvc-file-group>
</if>
</template>
<if cond="FORMAT=='autoconf'">
<set var="RCDEFDIR">
<if cond="TOOLKIT=='MSW'">
$(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
</if>
</set>
</if>
<template id="wx_dll_b" template="wx_lib_b">
<set var="WXDLLNAME">$(wxwin.mkDllName(wxid))</set>
<if cond="FORMAT=='autoconf'">
<ldflags>$(DYLIB_RPATH_FLAG)</ldflags>
<set var="__dllinstdir">$(DLLDIR)</set>
</if>
<dllname>$(WXDLLNAME)</dllname>
<version>$(WX_VERSION)</version>
<so_version>$(WXSOVERSION)</so_version>
<!-- FIXME: until libtool scheme is implemented in bakefile -->
<ldflags cond="FORMAT=='autoconf'">$(WXMACVERSION_CMD)</ldflags>
<!-- version info resources: -->
<res-define>WXDLLNAME=$(WXDLLNAME)</res-define>
<if cond="FORMAT=='autoconf'">
<res-include>$(RCDEFDIR)</res-include>
<res-include>$(TOP_SRCDIR)include</res-include>
<postlink-command>$(DYLIB_RPATH_POSTLINK)</postlink-command>
</if>
<if cond="FORMAT=='borland'">
<!-- path to windows.h for this compiler -->
<res-include>$(DOLLAR)(BCCDIR)\include\windows\sdk</res-include>
</if>
<win32-res>$(WXTOPDIR)src/msw/version.rc</win32-res>
</template>
<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>wxwebp</depends>
<depends>wxscintilla</depends>
<depends>wxlexilla</depends>
</template>
<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_append="wx_3rdparty_includes_base">
<include>$(INC_TIFF_BUILD)</include>
<include>$(INC_TIFF)</include>
<include>$(INC_JPEG)</include>
<include>$(INC_PNG)</include>
<include>$(INC_WEBP)</include>
</template>
<template id="wx_lib"
template="wx_3rdparty_includes_gui,wx_lib_b,msvc_setup_h"/>
<template id="wx_base_lib"
template="wx_3rdparty_includes_base,wx_lib_b,msvc_setup_h">
<define>wxUSE_GUI=0</define>
</template>
<template id="wx_dll"
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_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>
<!-- additional includes and defines for webview edge -->
<set var="webview_additional_include">
<if cond="TOOLKIT=='MSW'">$(TOP_SRCDIR)3rdparty/webview2/build/native/include</if>
</set>
<set var="webview_additional_include_wrl">
<if cond="TOOLKIT=='MSW' and IS_MSVC=='0'">$(TOP_SRCDIR)include/wx/msw/wrl</if>
</set>
<set var="webview_additional_libdirs_arch">
<if cond="TARGET_CPU=='amd64'">x64</if>
<if cond="TARGET_CPU=='AMD64'">x64</if>
<if cond="TARGET_CPU=='arm64'">arm64</if>
<if cond="TARGET_CPU=='ARM64'">arm64</if>
<if cond="TARGET_CPU=='x64'">x64</if>
<if cond="TARGET_CPU=='X64'">x64</if>
<if cond="TARGET_CPU=='x86'">x86</if>
<if cond="TARGET_CPU=='X86'">x86</if>
<if cond="TARGET_CPU==''">x86</if>
</set>
<set var="webview_additional_libdirs">
<if cond="IS_MSVC=='1' and TOOLKIT=='MSW'">$(TOP_SRCDIR)3rdparty/webview2/build/native/$(webview_additional_libdirs_arch)</if>
</set>
<set var="webview_edge_pragma_warning">
<if cond="TOOLKIT=='MSW' and IS_MSVC=='0'">-Wno-unknown-pragmas</if>
</set>
<template id="webview_additional">
<include>$(webview_additional_include_wrl)</include>
<include>$(webview_additional_include)</include>
<lib-path>$(webview_additional_libdirs)</lib-path>
<cxxflags>$(webview_edge_pragma_warning)</cxxflags>
</template>
<!-- =============================================================== -->
<!-- Templates for building wxWidgets plugins: -->
<!-- =============================================================== -->
<if cond="WX_STABLE_BRANCH=='1'">
<set var="PLUGIN_VERSION0">
<if cond="PLATFORM_UNIX=='1'">$(WX_RELEASE)</if>
<if cond="PLATFORM_UNIX=='0'">$(WX_RELEASE_NODOT)</if>
</set>
</if>
<if cond="WX_STABLE_BRANCH=='0'">
<set var="PLUGIN_VERSION0">
<if cond="PLATFORM_UNIX=='1'">$(WX_VERSION)</if>
<if cond="PLATFORM_UNIX=='0'">$(WX_VERSION_NODOT)</if>
</set>
</if>
<set var="PLUGVERDELIM">
<if cond="PLATFORM_UNIX=='1'">-</if>
<if cond="PLATFORM_UNIX=='0'"></if>
</set>
<set var="PLUGIN_VERSION">$(PLUGVERDELIM)$(PLUGIN_VERSION0)</set>
<set var="PLUGINS_INST_DIR" make_var="1">
$(LIBDIR)/wx/$(PLUGIN_VERSION0)
</set>
<define-rule name="wx-base-plugin" extends="module">
<template template="common_settings">
<dllname>
$(id)$(WX_U_D_SUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
</dllname>
<define>WXUSINGDLL</define>
<define>wxUSE_GUI=0</define>
<install-to>$(PLUGINS_INST_DIR)</install-to>
</template>
</define-rule>
<define-rule name="wx-gui-plugin" extends="module">
<template template="wx">
<dllname>
$(id)_$(PORTNAME)$(WXUNIVNAME)$(WX_U_D_SUFFIX)$(PLUGIN_VERSION)$(WXCOMPILER)
</dllname>
<define>WXUSINGDLL</define>
<install-to>$(PLUGINS_INST_DIR)</install-to>
</template>
</define-rule>
<!-- =============================================================== -->
<!-- Support for wxWidgets samples: -->
<!-- =============================================================== -->
<!-- Link against one wxWin library. Value must be literal! -->
<define-tag name="wx-lib" rules="exe,dll,module">
<sys-lib>$(wxwin.libToLink(value))</sys-lib>
<ldflags>$(wxwin.extraLdflags(value))</ldflags>
<ldlibs>$(wxwin.extraLdlibs(value))</ldlibs>
<!-- msvs200?prj formats don't support external dependencies yet: -->
<if cond="FORMAT=='msvc6prj' and MONOLITHIC=='0'">
<depends-on-dsp>$(wxwin.makeDspDependency(value))</depends-on-dsp>
</if>
</define-tag>
<!-- A hack to keep autoconf happy (we pass CPPFLAGS that contain
{top_srcdir} from configure, poor bakefile can't know that
and won't output top_srcdir = @top_srcdir@ line): -->
<set var="VARS_DONT_ELIMINATE" append="1">top_srcdir</set>
</makefile>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" ?>
<makefile>
<if cond="not isdefined('OUT_OF_TREE_MAKEFILES')">
<set var="OUT_OF_TREE_MAKEFILES">0</set>
</if>
<if cond="OUT_OF_TREE_MAKEFILES=='1'">
<include file="common_samples_outoftree.bkl"/>
</if>
<if cond="OUT_OF_TREE_MAKEFILES=='0'">
<include file="common_samples_intree.bkl"/>
</if>
</makefile>

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" ?>
<makefile>
<include file="common.bkl"/>
<!-- =============================================================== -->
<!-- Template for wxWidgets samples: -->
<!-- =============================================================== -->
<set var="WX_ENABLE_PRECOMP_HEADERS">0</set>
<set var="DLLFLAG">
<if cond="SHARED=='1'">WXUSINGDLL</if>
</set>
<template id="wx_util_b" template="wx">
<include>$(SRCDIR)</include>
<define>$(DLLFLAG)</define>
<if cond="FORMAT=='autoconf'">
<ldflags>$(DYLIB_RPATH_FLAG)</ldflags>
</if>
</template>
<template id="wx_util" template="wx_util_b,wx_dpi">
<app-type>gui</app-type>
<!-- resource files includes: -->
<include>$(SRCDIR)/$(WXTOPDIR)samples</include>
<!-- this include is not added via <include> for autoconf, see
common.bkl: -->
<if cond="FORMAT=='autoconf'">
<res-include>$(RCDEFDIR)</res-include>
<res-include>$(TOP_SRCDIR)include</res-include>
</if>
<if cond="FORMAT=='borland'">
<!-- path to windows.h for this compiler -->
<res-include>$(DOLLAR)(BCCDIR)\include\windows\sdk</res-include>
</if>
<win32-res>$(WXTOPDIR)samples/sample.rc</win32-res>
<!-- FIXME: temporary, until bakefile can reuse existing pch files -->
<if cond="FORMAT!='autoconf'">
<if cond="WX_ENABLE_PRECOMP_HEADERS=='0'">
<define>NOPCH</define>
</if>
</if>
</template>
<template id="wx_util_console" template="wx_util_b">
<app-type>console</app-type>
<define>wxUSE_GUI=0</define>
</template>
<template id="wx_sample" template="wx_util">
<if cond="FORMAT=='autoconf'">
<wx-mac-app-bundle/>
<cxxflags>$(SAMPLES_CXXFLAGS)</cxxflags>
</if>
</template>
<template id="wx_sample_console" template="wx_util_console">
<if cond="FORMAT=='autoconf'">
<cxxflags>$(SAMPLES_CXXFLAGS)</cxxflags>
</if>
</template>
<!-- =============================================================== -->
<!-- Support for samples data files: -->
<!-- =============================================================== -->
<if cond="FORMAT_SUPPORTS_ACTIONS=='1'">
<define-rule name="wx-data" extends="copy-files">
<template>
<dependency-of>all</dependency-of>
<dstdir>$(BUILDDIR)</dstdir>
<srcdir>$(SRCDIR)</srcdir>
</template>
<!--
VS - FIXME:
Don't clean the files because it would wipe out sources files if
BUILDDIR==SRCDIR. This is same behaviour as in the old build system,
but it would be better to delete the files during "make clean" if
BUILDDIR!=SRCDIR.
<define-tag name="files">
<clean-files>
$(' '.join(['$(BUILDDIR)$(DIRSEP)%s'%x for x in value.split()]))
</clean-files>
</define-tag>
-->
</define-rule>
</if>
<if cond="FORMAT_SUPPORTS_ACTIONS=='0'">
<!-- empty stub for project-files formats which don't support <command> -->
<define-rule name="wx-data" extends="action">
<define-tag name="dstdir"/>
<define-tag name="srcdir"/>
<define-tag name="files"/>
</define-rule>
</if>
<!-- =============================================================== -->
<!-- Misc platform specialities: -->
<!-- =============================================================== -->
<if cond="FORMAT=='autoconf'">
<include file="mac_bundles.bkl"/>
</if>
</makefile>

View File

@@ -0,0 +1,52 @@
<?xml version="1.0" ?>
<makefile>
<!-- =============================================================== -->
<!-- Templates for out-of-tree Unix makefiles for wxWidgets samples: -->
<!-- =============================================================== -->
<include file="wxpresets/presets/wx.bkl"/>
<template id="wx_app_base" template="wx">
<include>$(SRCDIR)</include>
</template>
<template id="wx_util" template="wx_app_base">
<app-type>gui</app-type>
</template>
<template id="wx_util_console" template="wx_app_base">
<app-type>console</app-type>
</template>
<template id="wx_sample" template="wx_util">
<if cond="FORMAT=='autoconf'">
<cxxflags>$(SAMPLES_CXXFLAGS)</cxxflags>
</if>
</template>
<template id="wx_sample_console" template="wx_util_console">
<if cond="FORMAT=='autoconf'">
<cxxflags>$(SAMPLES_CXXFLAGS)</cxxflags>
</if>
</template>
<define-rule name="wx-gui-plugin" extends="module">
<template template="wx_app_base"/>
</define-rule>
<!-- Define templates used by the samples -->
<template id="wx_append"/>
<template id="wx_append_base">
<cxxflags>-DwxUSE_GUI=0</cxxflags>
</template>
<define-rule name="wx-data" pseudo="1">
<define-tag name="files"/>
<define-tag name="dstdir"/>
<define-tag name="srcdir"/>
</define-rule>
</makefile>

View File

@@ -0,0 +1,570 @@
<?xml version="1.0" ?>
<makefile>
<set var="IS_MSVC_PRJ">
$(FORMAT in ['msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj'])
</set>
<set var="IS_MSVC">
$(IS_MSVC_PRJ=='1' or FORMAT=='msvc')
</set>
<set var="BUILDING_LIB" overwrite="0">0</set>
<set var="CPP_DEFAULT_VALUE">
<if cond="FORMAT=='borland'">
cpp32 -Sr -oCON
</if>
<if cond="FORMAT=='mingw'">
$(DOLLAR)(CC) -E
</if>
<if cond="FORMAT=='msvc'">
$(DOLLAR)(CC) /EP /nologo
</if>
<if cond="FORMAT=='watcom'">
$(DOLLAR)(CC) -p
</if>
</set>
<option name="CPP">
<default-value>
$(CPP_DEFAULT_VALUE)
</default-value>
<description>
The C preprocessor
</description>
</option>
<option name="SHARED">
<values>0,1</values>
<values-description>,DLL</values-description>
<default-value>0</default-value>
<description>
What type of library to build?
</description>
</option>
<if cond="FORMAT!='autoconf'">
<option name="TOOLKIT">
<values>MSW,GTK</values>
<values-description>,GTK+</values-description>
<default-value>MSW</default-value>
<description>
Used toolkit
</description>
</option>
<if cond="FORMAT not in ['autoconf','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">
<option name="TOOLKIT_VERSION">
<values>,2</values>
<values-description>,2</values-description>
<default-value></default-value>
<description>
GTK+ toolkit version
</description>
</option>
</if>
<!-- We must make TOOLKIT a constant under Windows -->
<if cond="FORMAT in ['borland','mingw','msvc','watcom', 'msvc6prj', 'msvs2003prj', 'msvs2005prj', 'msvs2008prj']">
<set var="TOOLKIT">MSW</set>
</if>
</if>
<!--
Don't include wxUniversal configurations in project files, they
confuse people who don't know what "Universal" means and double the
number of configurations. If you do need to build wxUniversal, either
use the make files or comment out the 3 lines below and rerun
bakefile_gen to regenerate the projects with them.
-->
<if cond="IS_MSVC_PRJ=='1'">
<set var="WXUNIV">0</set>
</if>
<if cond="IS_MSVC_PRJ=='0'">
<option name="WXUNIV">
<values>0,1</values>
<values-description>,Universal</values-description>
<default-value>0</default-value>
<description>
Build wxUniversal instead of native port?
</description>
</option>
</if>
<option name="BUILD">
<values>debug,release</values>
<values-description>Debug,Release</values-description>
<default-value>debug</default-value>
<description>
Type of compiled binaries
</description>
</option>
<if cond="FORMAT=='msvc'">
<option name="TARGET_CPU">
<default-value>$(DOLLAR)(CPU)</default-value>
<description>
The target processor architecture must be specified when it is not X86.
This does not affect the compiler output, so you still need to make sure
your environment is set up appropriately with the correct compiler in the
PATH. Rather it affects some options passed to some of the common build
utilities such as the resource compiler and the linker.
Accepted values: IA64, X64, ARM, 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"/>
</if>
<!--
For MSVC enable debug information in all builds: it is needed to be
able to debug the crash dumps produced by wxDebugReport and as it
generates it in separate PDB files it doesn't cost us much to enable it
(except for disk space...).
-->
<set var="DEBUG_INFO_DEFAULT">
<if cond="IS_MSVC=='1'">1</if>
<if cond="IS_MSVC=='0'">default</if>
</set>
<option name="DEBUG_INFO">
<values>0,1,default</values>
<default-value>$(DEBUG_INFO_DEFAULT)</default-value>
<description>
Should debugging info be included in the executables? The default value
"default" means that debug info will be included if BUILD=debug
and not included if BUILD=release.
</description>
</option>
<option name="DEBUG_FLAG">
<values>0,1,default</values>
<default-value>1</default-value>
<description>
Value of wxDEBUG_LEVEL. The default value is the same as 1 and means that all
but expensive assert checks are enabled, use 0 to completely remove debugging
code.
</description>
</option>
<if cond="FORMAT=='msvc'">
<option name="DEBUG_RUNTIME_LIBS">
<values>0,1,default</values>
<default-value>default</default-value>
<description>
Link against debug (e.g. msvcrtd.dll) or release (msvcrt.dll) RTL?
Default is to use debug CRT if and only if BUILD==debug.
</description>
</option>
</if>
<if cond="FORMAT!='msvc'">
<set var="DEBUG_RUNTIME_LIBS">default</set>
</if>
<set var="MONOLITHIC_DEFAULT">
<if cond="FORMAT=='watcom'">1</if>
<if cond="FORMAT!='watcom'">0</if>
</set>
<option name="MONOLITHIC">
<values>0,1</values>
<values-description>Multilib,Monolithic</values-description>
<default-value>$(MONOLITHIC_DEFAULT)</default-value>
<description>
Multiple libraries or single huge monolithic one?
</description>
</option>
<if cond="FORMAT=='autoconf'"> <!-- FIXME - temporary -->
<option name="USE_PLUGINS">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build parts of the library as dynamically loadable plugins
(only supported in multilib build)?
</description>
</option>
</if>
<if cond="FORMAT!='autoconf'">
<set var="USE_PLUGINS">0</set> <!-- FIXME - temporary -->
</if>
<option name="USE_GUI">
<values>0,1</values>
<values-description>Base,GUI</values-description>
<default-value>1</default-value>
<description>
Build GUI libraries?
</description>
</option>
<option name="USE_HTML">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxHTML library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_WEBVIEW">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxWebView library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_WEBVIEW_CHROMIUM">
<values>0,1</values>
<default-value>0</default-value>
</option>
<option name="USE_MEDIA">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build multimedia library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_XML">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build XML-related libraries?
</description>
</option>
<option name="USE_XRC">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxXRC library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_AUI">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxAUI library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_RIBBON">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxRibbon library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_PROPGRID">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxPropertyGrid library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_RICHTEXT">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxRichTextCtrl library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_STC">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build wxStyledTextCtrl library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_OPENGL">
<values>0,1</values>
<default-value>1</default-value>
<description>
Build OpenGL canvas library (USE_GUI must be 1)?
</description>
</option>
<!-- currently only VC++ can compile wxDebugReport which is in QA lib -->
<set var="USE_QA_DEFAULT">
<if cond="FORMAT in ['msvc','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">1</if>
<if cond="FORMAT not in ['msvc','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">0</if>
</set>
<option name="USE_QA">
<values>0,1</values>
<default-value>$(USE_QA_DEFAULT)</default-value>
<description>
Build quality assurance classes library (USE_GUI must be 1)?
</description>
</option>
<option name="USE_EXCEPTIONS">
<values>0,1</values>
<default-value>1</default-value>
<description>
Enable exceptions in compiled code.
</description>
</option>
<option name="USE_RTTI">
<values>0,1</values>
<default-value>1</default-value>
<description>
Enable run-time type information (RTTI) in compiled code.
</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>
<description>
Enable threading in compiled code.
</description>
</option>
<option name="USE_CAIRO">
<values>0,1</values>
<default-value>0</default-value>
<description>
Enable wxCairoContext for platforms other than Linux/GTK.
</description>
</option>
<option name="OFFICIAL_BUILD">
<values>0,1</values>
<default-value>0</default-value>
<description>
Is this official build by wxWidgets developers?
</description>
</option>
<option name="VENDOR">
<default-value>custom</default-value>
<description>
Use this to name your customized DLLs differently
</description>
</option>
<!-- These basically do what vendor does in the places it didn't. -->
<!-- They should all be unified under some suitable descriptor -->
<option name="WX_FLAVOUR">
<default-value></default-value>
</option>
<option name="WX_LIB_FLAVOUR">
<default-value></default-value>
</option>
<option name="CFG">
<default-value></default-value>
<description>
Name of your custom configuration. This affects directory
where object files are stored as well as the location of
compiled .lib files and setup.h under the lib/ toplevel directory.
</description>
</option>
<!-- ================================================================== -->
<!-- Autoconf -->
<!-- ================================================================== -->
<if cond="FORMAT=='autoconf'">
<option name="TOOLKIT"/>
<option name="TOOLKIT_LOWERCASE"/>
<option name="TOOLKIT_VERSION"/>
<option name="TOOLCHAIN_NAME"/>
<option name="TOOLCHAIN_FULLNAME"/>
<option name="EXTRALIBS"/>
<option name="EXTRALIBS_XML"/>
<option name="EXTRALIBS_HTML"/>
<option name="EXTRALIBS_MEDIA"/>
<option name="EXTRALIBS_GUI"/>
<option name="EXTRALIBS_OPENGL"/>
<option name="EXTRALIBS_SDL"/>
<option name="EXTRALIBS_STC"/>
<option name="EXTRALIBS_WEBVIEW"/>
<option name="EXTRALDFLAGS_WEBVIEW"/>
<option name="WX_CPPFLAGS"/>
<option name="WX_CFLAGS"/>
<option name="WX_CXXFLAGS"/>
<option name="WX_LDFLAGS"/>
<option name="CATCH2_CFLAGS"/>
<option name="HOST_SUFFIX"/>
<option name="DYLIB_RPATH_FLAG"/>
<option name="DYLIB_RPATH_INSTALL"/>
<option name="DYLIB_RPATH_POSTLINK"/>
<option name="SAMPLES_RPATH_FLAG"/>
<option name="SAMPLES_CXXFLAGS"/>
<option name="USE_WEBVIEW_WEBKIT2"/>
<!-- see configure.ac; it's required by some samples on Mac OS X -->
<option name="HEADER_PAD_OPTION"/>
<set var="TOP_SRCDIR">$(top_srcdir)/</set>
<set var="RUNTIME_LIBS">dynamic</set>
<set var="WXTOPDIR"/> <!-- to be overridden on bakefile cmd line -->
<option name="WITH_PLUGIN_SDL">
<values>0,1</values>
</option>
<option name="wx_top_builddir"/>
</if>
<!-- ================================================================== -->
<!-- windows/dos compilers -->
<!-- ================================================================== -->
<if cond="FORMAT!='autoconf'">
<option name="RUNTIME_LIBS">
<values>dynamic,static</values>
<default-value>dynamic</default-value>
<description>
Version of C runtime library to use. You can change this to
static if SHARED=0, but it is highly recommended to not do
it if SHARED=1 unless you know what you are doing.
</description>
</option>
<set var="WXTOPDIR"/> <!-- to be overridden on bakefile cmd line -->
<set var="WIN32_TOOLKIT">
<if cond="TOOLKIT=='MSW'">MSW</if>
<if cond="TOOLKIT=='GTK'">GTK</if>
</set>
<set var="WIN32_TOOLKIT_LOWERCASE">
<if cond="TOOLKIT=='MSW'">msw</if>
<if cond="TOOLKIT=='GTK'">gtk</if>
</set>
<set var="TOOLKIT" overwrite="0">
<if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='win32,win64'">$(WIN32_TOOLKIT)</if>
<if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORMS=='win32,win64'">$(WIN32_TOOLKIT)</if>
<if cond="FORMAT not in ['msvs2005prj','msvs2008prj'] and PLATFORM_WIN32=='1'">$(WIN32_TOOLKIT)</if>
</set>
<set var="TOOLKIT_LOWERCASE">
<if cond="FORMAT=='msvs2005prj' and MSVS_PLATFORMS=='win32,win64'">$(WIN32_TOOLKIT_LOWERCASE)</if>
<if cond="FORMAT=='msvs2008prj' and MSVS_PLATFORMS=='win32,win64'">$(WIN32_TOOLKIT_LOWERCASE)</if>
<if cond="FORMAT not in ['msvs2005prj','msvs2008prj'] and PLATFORM_WIN32=='1'">$(WIN32_TOOLKIT_LOWERCASE)</if>
</set>
<if cond="FORMAT in ['msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">
<set var="TOOLKIT_VERSION">
<if cond="PLATFORM_WIN32=='1' and TOOLKIT=='GTK'">2</if>
</set>
</if>
<set var="HOST_SUFFIX"/>
<set var="EXTRACFLAGS"/>
<set var="EXTRALIBS"/>
<set var="EXTRALIBS_XML"/>
<set var="EXTRALIBS_HTML"/>
<set var="EXTRALIBS_MEDIA"/>
<set var="EXTRALIBS_GUI"/>
<set var="EXTRALIBS_OPENGL">
<if cond="COMPILER=='wat' and TOOLKIT=='MSW'">opengl32.lib</if>
<if cond="COMPILER=='vc'">opengl32.lib</if>
<if cond="COMPILER=='gcc'">-lopengl32</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="EXTRALDFLAGS_WEBVIEW"/>
<set var="WITH_PLUGIN_SDL">0</set>
<if cond="BUILDING_LIB=='1'">
<set-srcdir>../..</set-srcdir>
</if>
<set var="TOP_SRCDIR">$(SRCDIR)/$(WXTOPDIR)</set>
</if>
<if cond="FORMAT=='mingw'">
<option name="WINDRES">
<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>
</if>
<!-- ================================================================== -->
<!-- Project files - hardcode some defaults -->
<!-- ================================================================== -->
<if cond="FORMAT_SUPPORTS_CONDITIONS=='0'">
<set var="RUNTIME_LIBS">dynamic</set>
<set var="OFFICIAL_BUILD">0</set>
<set var="USE_AUI">1</set>
<set var="USE_RIBBON">1</set>
<set var="USE_PROPGRID">1</set>
<set var="USE_RICHTEXT">1</set>
<set var="USE_STC">1</set>
<set var="USE_HTML">1</set>
<set var="USE_WEBVIEW">1</set>
<set var="USE_WEBVIEW_CHROMIUM">0</set>
<set var="USE_MEDIA">1</set>
<set var="USE_XML">1</set>
<set var="USE_XRC">1</set>
<set var="USE_OPENGL">1</set>
<set var="USE_QA">1</set>
<set var="MONOLITHIC">0</set>
<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>
<set var="DEBUG_FLAG">default</set>
</if>
<!-- DigitalMars make is braindead, it doesn't have conditional
processing: -->
<if cond="FORMAT=='dmars'">
<set var="RUNTIME_LIBS">static</set>
<set var="BUILD">debug</set>
<set var="SHARED">0</set>
<set var="WXUNIV">0</set>
<!-- Free version does not distribute OpenGL,
in commercial distribution better use dmars_smake format -->
<set var="USE_OPENGL">0</set>
</if>
<!-- Directory where CEF should be available -->
<set var="CEF_DIR">
$(TOP_SRCDIR)/3rdparty/cef
</set>
</makefile>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" ?>
<makefile>
<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)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="wxUSE_EXPAT">builtin</set>
<set var="LIB_EXPAT">
<if cond="wxUSE_EXPAT=='builtin'">
wxexpat$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<set var="INC_EXPAT">
<if cond="wxUSE_EXPAT=='builtin'">$(TOP_SRCDIR)src/expat/expat/lib</if>
</set>
<lib id="wxexpat" template_append="3rdparty_lib"
cond="wxUSE_EXPAT=='builtin' and BUILDING_LIB=='1'">
<dirname>$(LIBDIRNAME)</dirname>
<include cond="FORMAT!='autoconf'">$(LIBDIRNAME)</include>
<include cond="FORMAT=='autoconf'">$(BUILDDIR)/src/expat/expat</include>
<define cond="FORMAT=='autoconf'">
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
src/expat/expat/lib/xmltok.c
</sources>
</lib>
</makefile>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,80 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<option name="wxUSE_LIBJPEG"/>
<set var="LIB_JPEG">
<if cond="wxUSE_LIBJPEG=='builtin' and USE_GUI=='1'">
wxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="wxUSE_LIBJPEG">builtin</set>
<set var="LIB_JPEG">
<if cond="wxUSE_LIBJPEG=='builtin' and USE_GUI=='1'">
wxjpeg$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<set var="INC_JPEG">
<if cond="wxUSE_LIBJPEG=='builtin'">$(TOP_SRCDIR)src/jpeg</if>
</set>
<lib id="wxjpeg" template_append="3rdparty_lib"
cond="wxUSE_LIBJPEG=='builtin' and USE_GUI=='1' and BUILDING_LIB=='1'">
<dirname>$(LIBDIRNAME)</dirname>
<include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
<cflags-borland>-w-8004 -w-8008 -w-8057 -w-8066</cflags-borland>
<cflags-watcom>-wcd=136</cflags-watcom>
<sources>
src/jpeg/jaricom.c
src/jpeg/jcapimin.c
src/jpeg/jcapistd.c
src/jpeg/jcarith.c
src/jpeg/jccoefct.c
src/jpeg/jccolor.c
src/jpeg/jcdctmgr.c
src/jpeg/jchuff.c
src/jpeg/jcinit.c
src/jpeg/jcmainct.c
src/jpeg/jcmarker.c
src/jpeg/jcmaster.c
src/jpeg/jcomapi.c
src/jpeg/jcparam.c
src/jpeg/jcprepct.c
src/jpeg/jcsample.c
src/jpeg/jctrans.c
src/jpeg/jdapimin.c
src/jpeg/jdapistd.c
src/jpeg/jdarith.c
src/jpeg/jdatadst.c
src/jpeg/jdatasrc.c
src/jpeg/jdcoefct.c
src/jpeg/jdcolor.c
src/jpeg/jddctmgr.c
src/jpeg/jdhuff.c
src/jpeg/jdinput.c
src/jpeg/jdmainct.c
src/jpeg/jdmarker.c
src/jpeg/jdmaster.c
src/jpeg/jdmerge.c
src/jpeg/jdpostct.c
src/jpeg/jdsample.c
src/jpeg/jdtrans.c
src/jpeg/jerror.c
src/jpeg/jfdctflt.c
src/jpeg/jfdctfst.c
src/jpeg/jfdctint.c
src/jpeg/jidctflt.c
src/jpeg/jidctfst.c
src/jpeg/jidctint.c
src/jpeg/jmemmgr.c
src/jpeg/jmemnobs.c
src/jpeg/jquant1.c
src/jpeg/jquant2.c
src/jpeg/jutils.c
</sources>
</lib>
</makefile>

View File

@@ -0,0 +1,189 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<set var="LIB_LEXILLA">
<if cond="USE_STC=='1'">
wxlexilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="LIB_LEXILLA">
<if cond="USE_STC=='1'">
wxlexilla$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<template id="wxlexilla_cppflags">
<include>$(TOP_SRCDIR)src/stc/lexilla/access</include>
<include>$(TOP_SRCDIR)src/stc/lexilla/include</include>
<include>$(TOP_SRCDIR)src/stc/lexilla/lexlib</include>
<include>$(TOP_SRCDIR)src/stc/lexilla/include</include>
<include>$(TOP_SRCDIR)src/stc/scintilla/include</include>
<include>$(TOP_SRCDIR)src/stc/scintilla/src</include>
</template>
<set var="wxlexilla_usingdll">
<if cond="SHARED=='1' and MONOLITHIC=='0'">WXUSINGDLL</if>
</set>
<lib id="wxlexilla" template_append="3rdparty_lib,wxlexilla_cppflags,msvc_setup_h"
cond="USE_STC=='1' and BUILDING_LIB=='1'">
<if cond="FORMAT!='autoconf'">
<include>$(SETUPHDIR)</include>
<include>$(TOP_SRCDIR)include</include>
</if>
<define>$(wxlexilla_usingdll)</define>
<define>__WX$(TOOLKIT)__</define>
<define>$(WXUNIV_DEFINE)</define>
<define>$(DEBUG_DEFINE)</define>
<dirname>$(LIBDIRNAME)</dirname>
<sources>
src/stc/lexilla/access/LexillaAccess.cxx
src/stc/lexilla/lexers/LexA68k.cxx
src/stc/lexilla/lexers/LexAPDL.cxx
src/stc/lexilla/lexers/LexASY.cxx
src/stc/lexilla/lexers/LexAU3.cxx
src/stc/lexilla/lexers/LexAVE.cxx
src/stc/lexilla/lexers/LexAVS.cxx
src/stc/lexilla/lexers/LexAbaqus.cxx
src/stc/lexilla/lexers/LexAda.cxx
src/stc/lexilla/lexers/LexAsciidoc.cxx
src/stc/lexilla/lexers/LexAsm.cxx
src/stc/lexilla/lexers/LexAsn1.cxx
src/stc/lexilla/lexers/LexBaan.cxx
src/stc/lexilla/lexers/LexBash.cxx
src/stc/lexilla/lexers/LexBasic.cxx
src/stc/lexilla/lexers/LexBatch.cxx
src/stc/lexilla/lexers/LexBibTeX.cxx
src/stc/lexilla/lexers/LexBullant.cxx
src/stc/lexilla/lexers/LexCIL.cxx
src/stc/lexilla/lexers/LexCLW.cxx
src/stc/lexilla/lexers/LexCOBOL.cxx
src/stc/lexilla/lexers/LexCPP.cxx
src/stc/lexilla/lexers/LexCSS.cxx
src/stc/lexilla/lexers/LexCaml.cxx
src/stc/lexilla/lexers/LexCmake.cxx
src/stc/lexilla/lexers/LexCoffeeScript.cxx
src/stc/lexilla/lexers/LexConf.cxx
src/stc/lexilla/lexers/LexCrontab.cxx
src/stc/lexilla/lexers/LexCsound.cxx
src/stc/lexilla/lexers/LexD.cxx
src/stc/lexilla/lexers/LexDMAP.cxx
src/stc/lexilla/lexers/LexDMIS.cxx
src/stc/lexilla/lexers/LexDart.cxx
src/stc/lexilla/lexers/LexDataflex.cxx
src/stc/lexilla/lexers/LexDiff.cxx
src/stc/lexilla/lexers/LexECL.cxx
src/stc/lexilla/lexers/LexEDIFACT.cxx
src/stc/lexilla/lexers/LexEScript.cxx
src/stc/lexilla/lexers/LexEiffel.cxx
src/stc/lexilla/lexers/LexErlang.cxx
src/stc/lexilla/lexers/LexErrorList.cxx
src/stc/lexilla/lexers/LexFSharp.cxx
src/stc/lexilla/lexers/LexFlagship.cxx
src/stc/lexilla/lexers/LexForth.cxx
src/stc/lexilla/lexers/LexFortran.cxx
src/stc/lexilla/lexers/LexGAP.cxx
src/stc/lexilla/lexers/LexGDScript.cxx
src/stc/lexilla/lexers/LexGui4Cli.cxx
src/stc/lexilla/lexers/LexHTML.cxx
src/stc/lexilla/lexers/LexHaskell.cxx
src/stc/lexilla/lexers/LexHex.cxx
src/stc/lexilla/lexers/LexHollywood.cxx
src/stc/lexilla/lexers/LexIndent.cxx
src/stc/lexilla/lexers/LexInno.cxx
src/stc/lexilla/lexers/LexJSON.cxx
src/stc/lexilla/lexers/LexJulia.cxx
src/stc/lexilla/lexers/LexKVIrc.cxx
src/stc/lexilla/lexers/LexKix.cxx
src/stc/lexilla/lexers/LexLaTeX.cxx
src/stc/lexilla/lexers/LexLisp.cxx
src/stc/lexilla/lexers/LexLout.cxx
src/stc/lexilla/lexers/LexLua.cxx
src/stc/lexilla/lexers/LexMMIXAL.cxx
src/stc/lexilla/lexers/LexMPT.cxx
src/stc/lexilla/lexers/LexMSSQL.cxx
src/stc/lexilla/lexers/LexMagik.cxx
src/stc/lexilla/lexers/LexMake.cxx
src/stc/lexilla/lexers/LexMarkdown.cxx
src/stc/lexilla/lexers/LexMatlab.cxx
src/stc/lexilla/lexers/LexMaxima.cxx
src/stc/lexilla/lexers/LexMetapost.cxx
src/stc/lexilla/lexers/LexModula.cxx
src/stc/lexilla/lexers/LexMySQL.cxx
src/stc/lexilla/lexers/LexNim.cxx
src/stc/lexilla/lexers/LexNimrod.cxx
src/stc/lexilla/lexers/LexNix.cxx
src/stc/lexilla/lexers/LexNsis.cxx
src/stc/lexilla/lexers/LexNull.cxx
src/stc/lexilla/lexers/LexOScript.cxx
src/stc/lexilla/lexers/LexOpal.cxx
src/stc/lexilla/lexers/LexPB.cxx
src/stc/lexilla/lexers/LexPLM.cxx
src/stc/lexilla/lexers/LexPO.cxx
src/stc/lexilla/lexers/LexPOV.cxx
src/stc/lexilla/lexers/LexPS.cxx
src/stc/lexilla/lexers/LexPascal.cxx
src/stc/lexilla/lexers/LexPerl.cxx
src/stc/lexilla/lexers/LexPowerPro.cxx
src/stc/lexilla/lexers/LexPowerShell.cxx
src/stc/lexilla/lexers/LexProgress.cxx
src/stc/lexilla/lexers/LexProps.cxx
src/stc/lexilla/lexers/LexPython.cxx
src/stc/lexilla/lexers/LexR.cxx
src/stc/lexilla/lexers/LexRaku.cxx
src/stc/lexilla/lexers/LexRebol.cxx
src/stc/lexilla/lexers/LexRegistry.cxx
src/stc/lexilla/lexers/LexRuby.cxx
src/stc/lexilla/lexers/LexRust.cxx
src/stc/lexilla/lexers/LexSAS.cxx
src/stc/lexilla/lexers/LexSML.cxx
src/stc/lexilla/lexers/LexSQL.cxx
src/stc/lexilla/lexers/LexSTTXT.cxx
src/stc/lexilla/lexers/LexScriptol.cxx
src/stc/lexilla/lexers/LexSmalltalk.cxx
src/stc/lexilla/lexers/LexSorcus.cxx
src/stc/lexilla/lexers/LexSpecman.cxx
src/stc/lexilla/lexers/LexSpice.cxx
src/stc/lexilla/lexers/LexStata.cxx
src/stc/lexilla/lexers/LexTACL.cxx
src/stc/lexilla/lexers/LexTADS3.cxx
src/stc/lexilla/lexers/LexTAL.cxx
src/stc/lexilla/lexers/LexTCL.cxx
src/stc/lexilla/lexers/LexTCMD.cxx
src/stc/lexilla/lexers/LexTOML.cxx
src/stc/lexilla/lexers/LexTeX.cxx
src/stc/lexilla/lexers/LexTroff.cxx
src/stc/lexilla/lexers/LexTxt2tags.cxx
src/stc/lexilla/lexers/LexVB.cxx
src/stc/lexilla/lexers/LexVHDL.cxx
src/stc/lexilla/lexers/LexVerilog.cxx
src/stc/lexilla/lexers/LexVisualProlog.cxx
src/stc/lexilla/lexers/LexX12.cxx
src/stc/lexilla/lexers/LexYAML.cxx
src/stc/lexilla/lexers/LexZig.cxx
src/stc/lexilla/lexlib/Accessor.cxx
src/stc/lexilla/lexlib/DefaultLexer.cxx
src/stc/lexilla/lexlib/InList.cxx
src/stc/lexilla/lexlib/LexAccessor.cxx
src/stc/lexilla/lexlib/LexCharacterCategory.cxx
src/stc/lexilla/lexlib/LexCharacterSet.cxx
src/stc/lexilla/lexlib/LexerBase.cxx
src/stc/lexilla/lexlib/LexerModule.cxx
src/stc/lexilla/lexlib/LexerSimple.cxx
src/stc/lexilla/lexlib/PropSetSimple.cxx
src/stc/lexilla/lexlib/StyleContext.cxx
src/stc/lexilla/lexlib/WordList.cxx
src/stc/lexilla/src/Lexilla.cxx
</sources>
</lib>
<!-- used to conditionally link against wxlexilla only if it's enabled -->
<set var="wxlexilla_library_link">
<if cond="USE_STC=='1' and BUILDING_LIB=='1'">wxlexilla</if>
</set>
</makefile>

View File

@@ -0,0 +1,102 @@
<?xml version="1.0" ?>
<makefile>
<!--
Support for application bundles, for wxWidgets samples.
-->
<set var="BUNDLE_PLIST" overwrite="0">
$(TOP_SRCDIR)src/osx/carbon/Info.plist.in
</set>
<set var="BUNDLE_ICON" overwrite="0">
$(TOP_SRCDIR)src/osx/carbon/wxmac.icns
</set>
<set var="BUNDLE_RESOURCES" overwrite="0"></set>
<set var="BUNDLE_FONT_RESOURCES" overwrite="0"></set>
<define-tag name="wx-mac-app-bundle" rules="exe">
<!-- bundle directory: -->
<set var="BUNDLE">$(id).app/Contents</set>
<set var="BUNDLE_TGT">$(BUNDLE)/PkgInfo</set>
<set var="BUNDLE_TGT_REF">
<!-- TODO Remove Mac -->
<if cond="TOOLKIT=='MAC'">$(BUNDLE)/PkgInfo</if>
<if cond="TOOLKIT=='OSX_CARBON'">$(BUNDLE)/PkgInfo</if>
<if cond="TOOLKIT=='OSX_COCOA'">$(BUNDLE)/PkgInfo</if>
<if cond="TOOLKIT=='OSX_IPHONE'">$(BUNDLE)/PkgInfo</if>
<if cond="TOOLKIT=='COCOA'">$(BUNDLE)/PkgInfo</if>
</set>
<add-target target="$(BUNDLE_TGT)" type="action"
cond="target and PLATFORM_MACOSX=='1'"/>
<modify-target target="$(BUNDLE_TGT)">
<!-- required data: -->
<depends>$(id)</depends>
<depends-on-file>$(BUNDLE_PLIST)</depends-on-file>
<depends-on-file>$(BUNDLE_ICON)</depends-on-file>
<depends-on-file>$(BUNDLE_RESOURCES)</depends-on-file>
<depends-on-file>$(BUNDLE_FONT_RESOURCES)</depends-on-file>
<command>
<!-- create the directories: -->
mkdir -p $(BUNDLE)
mkdir -p $(BUNDLE)/MacOS
mkdir -p $(BUNDLE)/Resources
<!-- Info.plist: -->
sed -e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_GUI_IDENTIFIER}/org.wxwidgets.$(id)/" \
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_EXECUTABLE_NAME}/$(id)/" \
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_BUNDLE_NAME}/$(id)/" \
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_COPYRIGHT}/Copyright 2002-2025 wxWidgets/" \
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_BUNDLE_VERSION}/$(WX_VERSION)/" \
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_INFO_STRING}/$(id) version $(WX_VERSION), (c) 2002-2025 wxWidgets/" \
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_LONG_VERSION_STRING}/$(WX_VERSION), (c) 2002-2025 wxWidgets/" \
-e "s/\$(DOLLAR)$(DOLLAR){MACOSX_BUNDLE_SHORT_VERSION_STRING}/$(WX_RELEASE)/" \
$(BUNDLE_PLIST) >$(BUNDLE)/Info.plist
<!-- PkgInfo: -->
/bin/echo "APPL????" >$(BUNDLE)/PkgInfo
<!-- move the binary: -->
ln -f $(ref("__targetdir",id))$(ref("__targetname",id)) $(BUNDLE)/MacOS/$(id)
<!-- copy the application icon: -->
cp -f $(BUNDLE_ICON) $(BUNDLE)/Resources/wxmac.icns
</command>
<if cond="BUNDLE_RESOURCES!=''">
<command>
<!-- copy all other bundle resources: -->
cp -f $(BUNDLE_RESOURCES) $(BUNDLE)/Resources
</command>
</if>
<if cond="BUNDLE_FONT_RESOURCES!=''">
<!--
Special case of font resources, which must be copied into
the Fonts subdirectory used in src/osx/carbon/Info.plist.in file.
-->
<command>
mkdir -p $(BUNDLE)/Resources/Fonts
cp -f $(BUNDLE_FONT_RESOURCES) $(BUNDLE)/Resources/Fonts
</command>
</if>
</modify-target>
<!-- add pseudo target id_bundle: -->
<add-target target="$(id)_bundle" type="phony"
cond="target and PLATFORM_MACOSX=='1'"/>
<modify-target target="$(id)_bundle">
<dependency-of>all</dependency-of>
<depends>$(BUNDLE_TGT_REF)</depends>
</modify-target>
<!-- "make clean" should delete the bundle: -->
<modify-target target="clean">
<command>rm -rf $(id).app</command>
</modify-target>
</define-tag>
</makefile>

View File

@@ -0,0 +1,815 @@
#
# "make dist" target implementation:
#
############################# Dirs #################################
WXDIR = $(top_srcdir)
# Subordinate library possibilities
SRCDIR = $(WXDIR)/src
GENDIR = $(WXDIR)/src/generic
COMMDIR = $(WXDIR)/src/common
HTMLDIR = $(WXDIR)/src/html
RICHTEXTDIR = $(WXDIR)/src/richtext
AUIDIR = $(WXDIR)/src/aui
RIBBONDIR = $(WXDIR)/src/ribbon
PROPGRIDDIR = $(WXDIR)/src/propgrid
STCDIR = $(WXDIR)/src/stc
SCINTILLADIR = $(WXDIR)/src/stc/scintilla
LEXILLADIR = $(WXDIR)/src/stc/lexilla
UNIXDIR = $(WXDIR)/src/unix
PNGDIR = $(WXDIR)/src/png
WEBPDIR = $(WXDIR)/3rdparty/libwebp
JPEGDIR = $(WXDIR)/src/jpeg
TIFFDIR = $(WXDIR)/src/tiff
ZLIBDIR = $(WXDIR)/src/zlib
EXPATDIR = $(WXDIR)/src/expat
GTKDIR = $(WXDIR)/src/gtk
X11DIR = $(WXDIR)/src/x11
X11INC = $(WXDIR)/include/wx/x11
MSWDIR = $(WXDIR)/src/msw
MACDIR = $(WXDIR)/src/osx
COCOADIR = $(WXDIR)/src/cocoa
FTDIR = $(WXDIR)/src/freetype
INCDIR = $(WXDIR)/include
IFACEDIR = $(WXDIR)/interface
SAMPDIR = $(WXDIR)/samples
DEMODIR = $(WXDIR)/demos
UTILSDIR = $(WXDIR)/utils
MISCDIR = $(WXDIR)/misc
DOCDIR = $(WXDIR)/docs
INTLDIR = $(WXDIR)/locale
TOOLKITDIR = $(TOOLKIT_LOWERCASE)
########################## Archive name ###############################
# append a version suffix x.y.z to all file names
WXARCHIVE=@DISTDIR@-$(WX_VERSION).tar.gz
WXGLARCHIVE=@DISTDIR@-gl-$(WX_VERSION).tar.gz
WXSAMPLES=wx$(TOOLKIT)-samples-$(WX_VERSION).tar.gz
WXDEMOS=wx$(TOOLKIT)-demos-$(WX_VERSION).tar.gz
WXARCHIVE_ZIP=wxMSW-$(WX_VERSION).zip
WXARCHIVE_BZIP=@DISTDIR@-$(WX_VERSION).tar.bz2
WXGLARCHIVE_BZIP=@DISTDIR@-gl-$(WX_VERSION).tar.bz2
WXSAMPLES_BZIP=wx$(TOOLKIT)-samples-$(WX_VERSION).tar.bz2
WXDEMOS_BZIP=wx$(TOOLKIT)-demos-$(WX_VERSION).tar.bz2
DISTDIRNAME=@DISTDIR@-$(WX_VERSION)
DISTDIR=./_dist_dir/$(DISTDIRNAME)
BASEDISTDIR=./_dist_dir/wxBase-$(WX_VERSION)
########################## Tools ###############################
CP_PR = cp -pR
CP_P = cp -p
########################## make dist rules ###############################
# this target should copy only the files common to really all ports (including
# wxBase) to the dist dir
ALL_DIST: distrib_clean
mkdir _dist_dir
mkdir $(DISTDIR)
$(CP_P) $(WXDIR)/configure.ac $(DISTDIR)
$(CP_P) $(WXDIR)/configure $(DISTDIR)
$(CP_P) $(WXDIR)/autoconf_inc.m4 $(DISTDIR)
$(CP_P) $(WXDIR)/wxwin.m4 $(DISTDIR)
$(CP_P) $(WXDIR)/acinclude.m4 $(DISTDIR)
$(CP_P) $(WXDIR)/aclocal.m4 $(DISTDIR)
$(CP_P) $(WXDIR)/config.sub $(DISTDIR)
$(CP_P) $(WXDIR)/config.guess $(DISTDIR)
$(CP_P) $(WXDIR)/install-sh $(DISTDIR)
$(CP_P) $(WXDIR)/mkinstalldirs $(DISTDIR)
$(CP_P) $(WXDIR)/wx-config.in $(DISTDIR)
$(CP_P) $(WXDIR)/wx-config-inplace.in $(DISTDIR)
$(CP_P) $(WXDIR)/version-script.in $(DISTDIR)
$(CP_P) $(WXDIR)/setup.h.in $(DISTDIR)
$(CP_P) $(WXDIR)/setup.h_vms $(DISTDIR)
$(CP_P) $(WXDIR)/descrip.mms $(DISTDIR)
$(CP_P) $(WXDIR)/Makefile.in $(DISTDIR)
$(CP_P) $(DOCDIR)/lgpl.txt $(DISTDIR)/COPYING.LIB
$(CP_P) $(DOCDIR)/licence.txt $(DISTDIR)/LICENCE.txt
$(CP_P) $(DOCDIR)/changes.txt $(DISTDIR)/CHANGES.txt
mkdir $(DISTDIR)/lib
$(CP_P) $(WXDIR)/lib/vms.opt $(DISTDIR)/lib
$(CP_P) $(WXDIR)/lib/vms_gtk.opt $(DISTDIR)/lib
mkdir $(DISTDIR)/src
mkdir $(DISTDIR)/src/xml
$(CP_P) $(SRCDIR)/xml/*.cpp $(DISTDIR)/src/xml
mkdir $(DISTDIR)/src/zlib
$(CP_P) $(ZLIBDIR)/*.h $(DISTDIR)/src/zlib
$(CP_P) $(ZLIBDIR)/*.c $(DISTDIR)/src/zlib
$(CP_P) $(ZLIBDIR)/README $(DISTDIR)/src/zlib
#$(CP_P) $(ZLIBDIR)/*.mms $(DISTDIR)/src/zlib
$(CP_PR) $(EXPATDIR) $(DISTDIR)/src/expat
#(cd $(DISTDIR)/src/expat ; rm -rf `find -name CVS`)
# copy some files from include/ that are not installed:
mkdir $(DISTDIR)/include
mkdir $(DISTDIR)/include/wx
mkdir $(DISTDIR)/include/wx/private
$(CP_P) $(INCDIR)/wx/fmappriv.h $(DISTDIR)/include/wx
$(CP_P) $(INCDIR)/wx/private/*.h $(DISTDIR)/include/wx/private
# copy wxpresets
mkdir $(DISTDIR)/build
mkdir $(DISTDIR)/build/bakefiles
$(CP_P) $(WXDIR)/build/bakefiles/README $(DISTDIR)/build/bakefiles
$(CP_P) $(WXDIR)/build/bakefiles/*.* $(DISTDIR)/build/bakefiles
mkdir $(DISTDIR)/build/bakefiles/wxpresets
mkdir $(DISTDIR)/build/bakefiles/wxpresets/presets
$(CP_P) $(WXDIR)/build/bakefiles/wxpresets/*.txt $(DISTDIR)/build/bakefiles/wxpresets
$(CP_P) $(WXDIR)/build/bakefiles/wxpresets/presets/*.bkl $(DISTDIR)/build/bakefiles/wxpresets/presets
$(CP_P) $(WXDIR)/build/bakefiles/wxpresets/presets/wx_presets.py $(DISTDIR)/build/bakefiles/wxpresets/presets
mkdir $(DISTDIR)/build/bakefiles/wxpresets/sample
$(CP_P) $(WXDIR)/build/bakefiles/wxpresets/sample/minimal* $(DISTDIR)/build/bakefiles/wxpresets/sample
$(CP_P) $(WXDIR)/build/bakefiles/wxpresets/sample/config* $(DISTDIR)/build/bakefiles/wxpresets/sample
mkdir $(DISTDIR)/build/bakefiles/wxpresets/libsample
$(CP_P) $(WXDIR)/build/bakefiles/wxpresets/libsample/*.* $(DISTDIR)/build/bakefiles/wxpresets/libsample
mkdir $(DISTDIR)/build/aclocal
$(CP_P) $(WXDIR)/build/aclocal/*.m4 $(DISTDIR)/build/aclocal
# this target is the common part of distribution script for all GUI toolkits,
# but is not used when building wxBase distribution
ALL_GUI_DIST: ALL_DIST
$(CP_P) $(DOCDIR)/readme.txt $(DISTDIR)/README.txt
if test -f $(DOCDIR)/$(TOOLKITDIR)/changes.txt ; then \
$(CP_P) $(DOCDIR)/$(TOOLKITDIR)/changes.txt $(DISTDIR)/CHANGES-$(TOOLKIT).txt ; fi
$(CP_P) $(DOCDIR)/$(TOOLKITDIR)/readme.txt $(DISTDIR)/README-$(TOOLKIT).txt
if test -f $(DOCDIR)/$(TOOLKITDIR)/todo.txt ; then \
$(CP_P) $(DOCDIR)/$(TOOLKITDIR)/todo.txt $(DISTDIR)/TODO.txt ; fi
mkdir $(DISTDIR)/include/wx/$(TOOLKITDIR)
if test -d $(INCDIR)/wx/$(TOOLKITDIR)/private; then \
mkdir $(DISTDIR)/include/wx/$(TOOLKITDIR)/private && \
$(CP_P) $(INCDIR)/wx/$(TOOLKITDIR)/private/*.h $(DISTDIR)/include/wx/$(TOOLKITDIR)/private; \
fi
mkdir $(DISTDIR)/include/wx/meta
mkdir $(DISTDIR)/include/wx/generic
mkdir $(DISTDIR)/include/wx/generic/private
mkdir $(DISTDIR)/include/wx/html
mkdir $(DISTDIR)/include/wx/richtext
mkdir $(DISTDIR)/include/wx/richtext/bitmaps
mkdir $(DISTDIR)/include/wx/aui
mkdir $(DISTDIR)/include/wx/ribbon
mkdir $(DISTDIR)/include/wx/persist
mkdir $(DISTDIR)/include/wx/propgrid
mkdir $(DISTDIR)/include/wx/stc
mkdir $(DISTDIR)/include/wx/protocol
mkdir $(DISTDIR)/include/wx/unix
mkdir $(DISTDIR)/include/wx/unix/private
mkdir $(DISTDIR)/include/wx/xml
mkdir $(DISTDIR)/include/wx/xrc
$(CP_P) $(INCDIR)/wx/*.h $(DISTDIR)/include/wx
$(CP_P) $(INCDIR)/wx/*.cpp $(DISTDIR)/include/wx
$(CP_P) $(INCDIR)/wx/meta/*.h $(DISTDIR)/include/wx/meta
$(CP_P) $(INCDIR)/wx/generic/*.h $(DISTDIR)/include/wx/generic
$(CP_P) $(INCDIR)/wx/generic/private/*.h $(DISTDIR)/include/wx/generic/private
$(CP_P) $(INCDIR)/wx/html/*.h $(DISTDIR)/include/wx/html
$(CP_P) $(INCDIR)/wx/richtext/*.h $(DISTDIR)/include/wx/richtext
$(CP_P) $(INCDIR)/wx/richtext/bitmaps/*.xpm $(DISTDIR)/include/wx/richtext/bitmaps
$(CP_P) $(INCDIR)/wx/aui/*.h $(DISTDIR)/include/wx/aui
$(CP_P) $(INCDIR)/wx/ribbon/*.h $(DISTDIR)/include/wx/ribbon
$(CP_P) $(INCDIR)/wx/persist/*.h $(DISTDIR)/include/wx/persist
$(CP_P) $(INCDIR)/wx/propgrid/*.h $(DISTDIR)/include/wx/propgrid
$(CP_P) $(INCDIR)/wx/stc/*.h $(DISTDIR)/include/wx/stc
$(CP_P) $(INCDIR)/wx/protocol/*.h $(DISTDIR)/include/wx/protocol
$(CP_P) $(INCDIR)/wx/unix/*.h $(DISTDIR)/include/wx/unix
$(CP_P) $(INCDIR)/wx/unix/private/*.h $(DISTDIR)/include/wx/unix/private
$(CP_P) $(INCDIR)/wx/xml/*.h $(DISTDIR)/include/wx/xml
$(CP_P) $(INCDIR)/wx/xrc/*.h $(DISTDIR)/include/wx/xrc
mkdir $(DISTDIR)/art
mkdir $(DISTDIR)/art/gtk
$(CP_P) $(WXDIR)/art/*.xpm $(DISTDIR)/art
$(CP_P) $(WXDIR)/art/gtk/*.xpm $(DISTDIR)/art/gtk
mkdir $(DISTDIR)/src/$(TOOLKITDIR)
$(CP_P) $(COMMDIR)/*.cpp $(DISTDIR)/src/common
$(CP_P) $(COMMDIR)/*.c $(DISTDIR)/src/common
$(CP_P) $(COMMDIR)/*.inc $(DISTDIR)/src/common
$(CP_P) $(COMMDIR)/*.mms $(DISTDIR)/src/common
mkdir $(DISTDIR)/src/xrc
$(CP_P) $(SRCDIR)/xrc/*.cpp $(DISTDIR)/src/xrc
mkdir $(DISTDIR)/src/unix
$(CP_P) $(UNIXDIR)/*.cpp $(DISTDIR)/src/unix
$(CP_P) $(UNIXDIR)/*.mms $(DISTDIR)/src/unix
mkdir $(DISTDIR)/src/generic
$(CP_P) $(GENDIR)/*.cpp $(DISTDIR)/src/generic
$(CP_P) $(GENDIR)/*.mms $(DISTDIR)/src/generic
mkdir $(DISTDIR)/src/html
$(CP_P) $(HTMLDIR)/*.cpp $(DISTDIR)/src/html
mkdir $(DISTDIR)/src/richtext
$(CP_P) $(RICHTEXTDIR)/*.cpp $(DISTDIR)/src/richtext
mkdir $(DISTDIR)/src/aui
$(CP_P) $(AUIDIR)/*.cpp $(DISTDIR)/src/aui
mkdir $(DISTDIR)/src/ribbon
$(CP_P) $(RIBBONDIR)/*.cpp $(DISTDIR)/src/ribbon
mkdir $(DISTDIR)/src/propgrid
$(CP_P) $(PROPGRIDDIR)/*.cpp $(DISTDIR)/src/propgrid
mkdir $(DISTDIR)/src/stc
$(CP_P) $(STCDIR)/*.* $(DISTDIR)/src/stc
mkdir $(DISTDIR)/src/stc/scintilla
$(CP_PR) $(SCINTILLADIR)/* $(DISTDIR)/src/stc/scintilla
mkdir $(DISTDIR)/src/stc/lexilla
$(CP_PR) $(LEXILLADIR)/* $(DISTDIR)/src/stc/lexilla
mkdir $(DISTDIR)/src/png
$(CP_PR) $(PNGDIR)/* $(DISTDIR)/src/png
mkdir $(DISTDIR)/3rdparty/libwebp
$(CP_PR) $(WEBPDIR)/* $(DISTDIR)/3rdparty/libwebp
mkdir $(DISTDIR)/src/jpeg
$(CP_P) $(JPEGDIR)/*.h $(DISTDIR)/src/jpeg
$(CP_P) $(JPEGDIR)/*.c $(DISTDIR)/src/jpeg
$(CP_P) $(JPEGDIR)/*.vc $(DISTDIR)/src/jpeg
$(CP_P) $(JPEGDIR)/makefile.* $(DISTDIR)/src/jpeg
$(CP_P) $(JPEGDIR)/README $(DISTDIR)/src/jpeg
mkdir $(DISTDIR)/src/tiff
mkdir $(DISTDIR)/src/tiff/config
mkdir $(DISTDIR)/src/tiff/contrib
mkdir $(DISTDIR)/src/tiff/port
mkdir $(DISTDIR)/src/tiff/html
mkdir $(DISTDIR)/src/tiff/man
mkdir $(DISTDIR)/src/tiff/libtiff
mkdir $(DISTDIR)/src/tiff/tools
mkdir $(DISTDIR)/src/tiff/test
mkdir $(DISTDIR)/src/tiff/m4
$(CP_P) $(TIFFDIR)/config/* $(DISTDIR)/src/tiff/config
$(CP_PR) $(TIFFDIR)/contrib/* $(DISTDIR)/src/tiff/contrib
$(CP_P) $(TIFFDIR)/port/* $(DISTDIR)/src/tiff/port
$(CP_PR) $(TIFFDIR)/html/* $(DISTDIR)/src/tiff/html
$(CP_P) $(TIFFDIR)/man/* $(DISTDIR)/src/tiff/man
$(CP_P) $(TIFFDIR)/tools/* $(DISTDIR)/src/tiff/tools
$(CP_P) $(TIFFDIR)/test/* $(DISTDIR)/src/tiff/test
$(CP_P) $(TIFFDIR)/libtiff/* $(DISTDIR)/src/tiff/libtiff
$(CP_P) $(TIFFDIR)/m4/* $(DISTDIR)/src/tiff/m4
$(CP_P) $(TIFFDIR)/README $(DISTDIR)/src/tiff
$(CP_P) $(TIFFDIR)/VERSION $(DISTDIR)/src/tiff
$(CP_P) $(TIFFDIR)/configure* $(DISTDIR)/src/tiff
$(CP_P) $(TIFFDIR)/aclocal.m4 $(DISTDIR)/src/tiff
$(CP_P) $(TIFFDIR)/autogen.sh $(DISTDIR)/src/tiff
$(CP_P) $(TIFFDIR)/Makefile* $(DISTDIR)/src/tiff
BASE_DIST: ALL_DIST INTL_DIST
# make --disable-gui the default
rm $(DISTDIR)/configure.ac
sed 's/DEFAULT_wxUSE_GUI=yes/DEFAULT_wxUSE_GUI=no/' \
$(WXDIR)/configure.ac > $(DISTDIR)/configure.ac
rm $(DISTDIR)/configure
sed 's/DEFAULT_wxUSE_GUI=yes/DEFAULT_wxUSE_GUI=no/' \
$(WXDIR)/configure > $(DISTDIR)/configure
chmod +x $(DISTDIR)/configure
mkdir $(DISTDIR)/include/wx/protocol
mkdir $(DISTDIR)/include/wx/unix
mkdir $(DISTDIR)/include/wx/xml
mkdir $(DISTDIR)/include/wx/msw
mkdir $(DISTDIR)/include/wx/html
mkdir $(DISTDIR)/include/wx/richtext
mkdir $(DISTDIR)/include/wx/richtext/bitmaps
mkdir $(DISTDIR)/include/wx/aui
mkdir $(DISTDIR)/include/wx/ribbon
mkdir $(DISTDIR)/include/wx/persist
mkdir $(DISTDIR)/include/wx/propgrid
mkdir $(DISTDIR)/include/wx/stc
mkdir $(DISTDIR)/include/wx/osx
mkdir $(DISTDIR)/include/wx/osx/carbon
mkdir $(DISTDIR)/include/wx/osx/core
mkdir $(DISTDIR)/src/unix
mkdir $(DISTDIR)/src/osx
mkdir $(DISTDIR)/src/osx/core
mkdir $(DISTDIR)/src/osx/carbon
mkdir $(DISTDIR)/src/msw
$(CP_P) $(DOCDIR)/base/readme.txt $(DISTDIR)/README.txt
$(CP_P) $(WXDIR)/src/common/*.inc $(DISTDIR)/src/common
list='$(ALL_PORTS_BASE_HEADERS)'; for p in $$list; do \
$(CP_P) $(WXDIR)/include/$$p $(DISTDIR)/include/$$p; \
done
list='$(ALL_BASE_SOURCES)'; for p in $$list; do \
$(CP_P) $(WXDIR)/$$p $(DISTDIR)/$$p; \
done
mkdir $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/Makefile.in $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/makefile.* $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/sample.* $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/samples.* $(DISTDIR)/samples
mkdir $(DISTDIR)/samples/console
$(CP_P) $(SAMPDIR)/console/Makefile.in $(DISTDIR)/samples/console
$(CP_P) $(SAMPDIR)/console/makefile.unx $(DISTDIR)/samples/console
$(CP_P) $(SAMPDIR)/console/console.cpp $(DISTDIR)/samples/console
$(CP_P) $(SAMPDIR)/console/console.dsp $(DISTDIR)/samples/console
mv $(DISTDIR) $(BASEDISTDIR)
GTK_DIST: UNIV_DIST
$(CP_P) $(INCDIR)/wx/gtk/*.h $(DISTDIR)/include/wx/gtk
$(CP_P) $(GTKDIR)/*.h $(DISTDIR)/src/gtk
$(CP_P) $(GTKDIR)/*.cpp $(DISTDIR)/src/gtk
$(CP_P) $(GTKDIR)/*.c $(DISTDIR)/src/gtk
$(CP_P) $(GTKDIR)/*.xbm $(DISTDIR)/src/gtk
$(CP_P) $(GTKDIR)/*.mms $(DISTDIR)/src/gtk
mkdir $(DISTDIR)/include/wx/x11/private
$(CP_P) $(INCDIR)/wx/x11/private/*.h $(DISTDIR)/include/wx/x11/private
mkdir $(DISTDIR)/include/wx/gtk/gnome
mkdir $(DISTDIR)/src/gtk/gnome
$(CP_P) $(INCDIR)/wx/gtk/gnome/*.h $(DISTDIR)/include/wx/gtk/gnome
$(CP_P) $(GTKDIR)/gnome/*.cpp $(DISTDIR)/src/gtk/gnome
mkdir $(DISTDIR)/src/osx
mkdir $(DISTDIR)/src/osx/core
$(CP_P) $(WXDIR)/src/osx/core/*.cpp $(DISTDIR)/src/osx/core
mkdir $(DISTDIR)/include/wx/osx
mkdir $(DISTDIR)/include/wx/osx/core
$(CP_P) $(WXDIR)/include/wx/osx/core/*.h $(DISTDIR)/include/wx/osx/core
X11_DIST: UNIV_DIST
$(CP_P) $(INCDIR)/wx/x11/*.h $(DISTDIR)/include/wx/x11
mkdir $(DISTDIR)/include/wx/x11/private
$(CP_P) $(INCDIR)/wx/x11/private/*.h $(DISTDIR)/include/wx/x11/private
mkdir $(DISTDIR)/include/wx/gtk/private
$(CP_P) $(INCDIR)/wx/gtk/private/string.h $(DISTDIR)/include/wx/gtk/private
$(CP_P) $(X11DIR)/*.cpp $(DISTDIR)/src/x11
$(CP_P) $(X11DIR)/*.c $(DISTDIR)/src/x11
$(CP_P) $(X11DIR)/*.xbm $(DISTDIR)/src/x11
mkdir $(DISTDIR)/src/osx
mkdir $(DISTDIR)/src/osx/core
$(CP_P) $(WXDIR)/src/osx/core/*.cpp $(DISTDIR)/src/osx/core
mkdir $(DISTDIR)/include/wx/osx
mkdir $(DISTDIR)/include/wx/osx/core
$(CP_P) $(WXDIR)/include/wx/osx/core/*.h $(DISTDIR)/include/wx/osx/core
OSX_CARBON_DIST: ALL_GUI_DIST
$(CP_P) $(INCDIR)/*.* $(DISTDIR)/include
mkdir $(DISTDIR)/include/wx/osx/carbon
mkdir $(DISTDIR)/include/wx/osx/carbon/private
mkdir $(DISTDIR)/include/wx/osx/cocoa
mkdir $(DISTDIR)/include/wx/osx/iphone
$(CP_P) $(INCDIR)/wx/osx/*.h $(DISTDIR)/include/wx/osx
$(CP_P) $(INCDIR)/wx/osx/carbon/*.h $(DISTDIR)/include/wx/osx/carbon
$(CP_P) $(INCDIR)/wx/osx/carbon/private/*.h $(DISTDIR)/include/wx/osx/carbon/private
$(CP_P) $(INCDIR)/wx/osx/private/*.h $(DISTDIR)/include/wx/osx/private
$(CP_P) $(INCDIR)/wx/osx/cocoa/*.h $(DISTDIR)/include/wx/osx/cocoa
$(CP_P) $(INCDIR)/wx/osx/iphone/*.h $(DISTDIR)/include/wx/osx/iphone
mkdir $(DISTDIR)/include/wx/osx/core
mkdir $(DISTDIR)/include/wx/osx/core/private
$(CP_P) $(INCDIR)/wx/osx/core/*.h $(DISTDIR)/include/wx/osx/core
$(CP_P) $(INCDIR)/wx/osx/core/private/*.h $(DISTDIR)/include/wx/osx/core/private
mkdir $(DISTDIR)/src/osx/core
$(CP_P) $(MACDIR)/core/*.cpp $(DISTDIR)/src/osx/core
mkdir $(DISTDIR)/src/osx/cocoa
$(CP_P) $(MACDIR)/cocoa/*.mm $(DISTDIR)/src/osx/cocoa
mkdir $(DISTDIR)/src/osx/iphone
$(CP_P) $(MACDIR)/iphone/*.mm $(DISTDIR)/src/osx/iphone
mkdir $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/*.cpp $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/*.mm $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/*.icns $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/Info.plist.in $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/*.h $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/*.r $(DISTDIR)/src/osx/carbon
mkdir $(DISTDIR)/src/wxWindows.xcodeproj
$(CP_P) $(WXDIR)/src/wxWindows.xcodeproj/* $(DISTDIR)/src/wxWindows.xcodeproj
COCOA_DIST: ALL_GUI_DIST
$(CP_P) $(INCDIR)/wx/cocoa/*.h $(DISTDIR)/include/wx/cocoa
$(CP_P) $(COCOADIR)/*.mm $(DISTDIR)/src/cocoa
$(CP_P) $(COCOADIR)/*.cpp $(DISTDIR)/src/cocoa
$(CP_P) $(COCOADIR)/*.r $(DISTDIR)/src/cocoa
mkdir $(DISTDIR)/include/wx/osx/core
$(CP_P) $(INCDIR)/wx/osx/core/*.h $(DISTDIR)/include/wx/osx/core
mkdir $(DISTDIR)/src/osx/core
$(CP_P) $(MACDIR)/core/*.cpp $(DISTDIR)/src/osx/core
mkdir $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/Info.plist.in $(DISTDIR)/src/osx/carbon
$(CP_P) $(MACDIR)/carbon/wxmac.icns $(DISTDIR)/src/osx/carbon
MSW_DIST: UNIV_DIST
mkdir $(DISTDIR)/include/wx/msw/ole
$(CP_P) $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.cur $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.ico $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.bmp $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.rc $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.manifest $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/ole/*.h $(DISTDIR)/include/wx/msw/ole
mkdir $(DISTDIR)/src/msw/ole
$(CP_P) $(MSWDIR)/*.cpp $(DISTDIR)/src/msw
$(CP_P) $(MSWDIR)/*.c $(DISTDIR)/src/msw
$(CP_P) $(MSWDIR)/*.rc $(DISTDIR)/src/msw
$(CP_P) $(MSWDIR)/ole/*.cpp $(DISTDIR)/src/msw/ole
MSW_ZIP_TEXT_DIST: ALL_GUI_DIST
mkdir $(DISTDIR)/build/msw
$(CP_P) $(WXDIR)/build/msw/* $(DISTDIR)/build/msw
$(CP_P) $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw
mkdir $(DISTDIR)/include/wx/msw/ole
$(CP_P) $(INCDIR)/wx/msw/*.h $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.rc $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.manifest $(DISTDIR)/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/ole/*.h $(DISTDIR)/include/wx/msw/ole
mkdir $(DISTDIR)/src/msw/ole
$(CP_P) $(MSWDIR)/*.cpp $(DISTDIR)/src/msw
$(CP_P) $(MSWDIR)/*.rc $(DISTDIR)/src/msw
$(CP_P) $(MSWDIR)/*.c $(DISTDIR)/src/msw
$(CP_P) $(MSWDIR)/ole/*.cpp $(DISTDIR)/src/msw/ole
$(CP_P) $(SRCDIR)/*.??? $(DISTDIR)/src
UNIV_DIST: ALL_GUI_DIST
mkdir $(DISTDIR)/include/wx/univ
mkdir $(DISTDIR)/src/univ
mkdir $(DISTDIR)/src/univ/themes
$(CP_P) $(INCDIR)/wx/univ/*.h $(DISTDIR)/include/wx/univ
$(CP_P) $(SRCDIR)/univ/*.cpp $(DISTDIR)/src/univ
$(CP_P) $(SRCDIR)/univ/themes/*.cpp $(DISTDIR)/src/univ/themes
DEMOS_DIST: ALL_GUI_DIST
mkdir $(DISTDIR)/demos
$(CP_P) $(DEMODIR)/Makefile.in $(DISTDIR)/demos
mkdir $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/Makefile.in $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/makefile.unx $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/*.cpp $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/*.h $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/*.xpm $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/*.ico $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/*.rc $(DISTDIR)/demos/bombs
$(CP_P) $(DEMODIR)/bombs/readme.txt $(DISTDIR)/demos/bombs
mkdir $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/Makefile.in $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/makefile.unx $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/*.h $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/*.cpp $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/*.xpm $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/*.htm $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/*.ico $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/*.rc $(DISTDIR)/demos/forty
$(CP_P) $(DEMODIR)/forty/readme.txt $(DISTDIR)/demos/forty
mkdir $(DISTDIR)/demos/life
mkdir $(DISTDIR)/demos/life/bitmaps
$(CP_P) $(DEMODIR)/life/Makefile.in $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/makefile.unx $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/*.cpp $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/*.h $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/*.xpm $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/*.inc $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/*.lif $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/*.rc $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/*.ico $(DISTDIR)/demos/life
$(CP_P) $(DEMODIR)/life/bitmaps/*.xpm $(DISTDIR)/demos/life/bitmaps
$(CP_P) $(DEMODIR)/life/bitmaps/*.bmp $(DISTDIR)/demos/life/bitmaps
mkdir $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/Makefile.in $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/makefile.unx $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/*.h $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/*.cpp $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/*.xpm $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/*.dat $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/*.txt $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/*.rc $(DISTDIR)/demos/poem
$(CP_P) $(DEMODIR)/poem/*.ico $(DISTDIR)/demos/poem
mkdir $(DISTDIR)/demos/fractal
$(CP_P) $(DEMODIR)/fractal/Makefile.in $(DISTDIR)/demos/fractal
$(CP_P) $(DEMODIR)/fractal/makefile.unx $(DISTDIR)/demos/fractal
$(CP_P) $(DEMODIR)/fractal/*.cpp $(DISTDIR)/demos/fractal
$(CP_P) $(DEMODIR)/fractal/*.rc $(DISTDIR)/demos/fractal
$(CP_P) $(DEMODIR)/fractal/*.ico $(DISTDIR)/demos/fractal
SAMPLES_DIST: ALL_GUI_DIST
mkdir $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/Makefile.in $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/makefile.* $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/sample.* $(DISTDIR)/samples
$(CP_P) $(SAMPDIR)/samples.* $(DISTDIR)/samples
# copy files common to all samples in a general way (samples without
# Makefile.in in them are Windows-specific and shouldn't be included in
# Unix distribution)
for s in `find $(SAMPDIR) $(SAMPDIR)/html $(SAMPDIR)/opengl \
-mindepth 1 -maxdepth 1 -type d -not -name .svn`; do \
if [ ! -f $$s/Makefile.in ]; then continue; fi; \
t="$(DISTDIR)/samples/`echo $$s | sed 's@$(SAMPDIR)/@@'`"; \
mkdir -p $$t; \
$(CP_P) $$s/Makefile.in \
`find $$s -maxdepth 1 -name 'makefile.*' -o -name descrip.mms -o \
-name '*.cpp' -o -name '*.h' -o \
-name '*.bmp' -o -name '*.ico' -o -name '*.png' -o \
-name '*.rc' -o -name '*.xpm'` $$t; \
i=""; \
if [ -d $$s/bitmaps ]; then i="bitmaps"; fi; \
if [ -d $$s/icons ]; then i="icons"; fi; \
if [ -n "$$i" ]; then \
mkdir $$t/$$i; \
cp `find $$s/$$i -name '*.bmp' -o -name '*.xpm'` $$t/$$i; \
fi; \
done
# copy the rest, not covered by the above loop
$(CP_P) $(SAMPDIR)/animate/hourglass.ani $(DISTDIR)/samples/animate
$(CP_P) $(SAMPDIR)/animate/throbber.gif $(DISTDIR)/samples/animate
$(CP_P) $(SAMPDIR)/dialogs/tips.txt $(DISTDIR)/samples/dialogs
$(CP_P) $(SAMPDIR)/dnd/d_and_d.txt $(DISTDIR)/samples/dnd
mkdir $(DISTDIR)/samples/help/doc
$(CP_P) $(SAMPDIR)/help/*.h?? $(DISTDIR)/samples/help
$(CP_P) $(SAMPDIR)/help/*.gif $(DISTDIR)/samples/help
$(CP_P) $(SAMPDIR)/help/cshelp.txt $(DISTDIR)/samples/help
$(CP_P) $(SAMPDIR)/help/*.chm $(DISTDIR)/samples/help
$(CP_P) $(SAMPDIR)/help/*.cnt $(DISTDIR)/samples/help
$(CP_P) $(SAMPDIR)/help/doc.zip $(DISTDIR)/samples/help
$(CP_P) $(SAMPDIR)/help/doc/*.* $(DISTDIR)/samples/help/doc
mkdir $(DISTDIR)/samples/html/about/data
$(CP_P) $(SAMPDIR)/html/about/data/*.htm $(DISTDIR)/samples/html/about/data
$(CP_P) $(SAMPDIR)/html/about/data/*.png $(DISTDIR)/samples/html/about/data
mkdir $(DISTDIR)/samples/html/help/helpfiles
$(CP_P) $(SAMPDIR)/html/help/helpfiles/*.??? $(DISTDIR)/samples/html/help/helpfiles
$(CP_P) $(SAMPDIR)/html/helpview/*.zip $(DISTDIR)/samples/html/helpview
$(CP_P) $(SAMPDIR)/html/printing/*.htm $(DISTDIR)/samples/html/printing
$(CP_P) $(SAMPDIR)/html/printing/*.gif $(DISTDIR)/samples/html/printing
$(CP_P) $(SAMPDIR)/html/test/*.gif $(DISTDIR)/samples/html/test
$(CP_P) $(SAMPDIR)/html/test/*.htm $(DISTDIR)/samples/html/test
$(CP_P) $(SAMPDIR)/html/test/*.html $(DISTDIR)/samples/html/test
$(CP_P) $(SAMPDIR)/html/virtual/*.htm $(DISTDIR)/samples/html/virtual
$(CP_P) $(SAMPDIR)/html/widget/*.htm $(DISTDIR)/samples/html/widget
$(CP_P) $(SAMPDIR)/html/zip/*.htm $(DISTDIR)/samples/html/zip
$(CP_P) $(SAMPDIR)/html/zip/*.zip $(DISTDIR)/samples/html/zip
$(CP_P) $(SAMPDIR)/image/horse*.* $(DISTDIR)/samples/image
$(CP_P) $(SAMPDIR)/image/smile.xbm $(DISTDIR)/samples/image
$(CP_P) $(SAMPDIR)/internat/readme.txt $(DISTDIR)/samples/internat
for f in `(cd $(SAMPDIR); find internat -name '*.[mp]o' -print)`; do \
mkdir -p $(DISTDIR)/samples/`dirname $$f`; \
$(CP_P) $(SAMPDIR)/$$f $(DISTDIR)/samples/$$f; \
done
$(CP_P) $(SAMPDIR)/joytest/*.wav $(DISTDIR)/samples/joytest
$(CP_P) $(SAMPDIR)/opengl/penguin/trackball.c $(DISTDIR)/samples/opengl/penguin
$(CP_P) $(SAMPDIR)/opengl/penguin/*.dxf.gz $(DISTDIR)/samples/opengl/penguin
$(CP_P) $(SAMPDIR)/opengl/isosurf/*.gz $(DISTDIR)/samples/opengl/isosurf
$(CP_P) $(SAMPDIR)/richtext/readme.txt $(DISTDIR)/samples/richtext
$(CP_P) $(SAMPDIR)/richtext/todo.txt $(DISTDIR)/samples/richtext
$(CP_P) $(SAMPDIR)/sound/*.wav $(DISTDIR)/samples/sound
$(CP_P) $(SAMPDIR)/splash/*.mpg $(DISTDIR)/samples/splash
mkdir $(DISTDIR)/samples/xrc/rc
$(CP_P) $(SAMPDIR)/xrc/rc/*.xpm $(DISTDIR)/samples/xrc/rc
$(CP_P) $(SAMPDIR)/xrc/rc/*.xrc $(DISTDIR)/samples/xrc/rc
$(CP_P) $(SAMPDIR)/xrc/rc/*.gif $(DISTDIR)/samples/xrc/rc
UTILS_DIST: ALL_GUI_DIST
mkdir $(DISTDIR)/utils
$(CP_P) $(UTILSDIR)/Makefile.in $(DISTDIR)/utils
mkdir $(DISTDIR)/utils/screenshotgen
mkdir $(DISTDIR)/utils/screenshotgen/src
mkdir $(DISTDIR)/utils/screenshotgen/src/bitmaps
$(CP_P) $(UTILSDIR)/screenshotgen/README.txt $(DISTDIR)/utils/screenshotgen
$(CP_P) $(UTILSDIR)/screenshotgen/*.in $(DISTDIR)/utils/screenshotgen
$(CP_P) $(UTILSDIR)/screenshotgen/src/*.* $(DISTDIR)/utils/screenshotgen/src
$(CP_P) $(UTILSDIR)/screenshotgen/src/bitmaps/*.* $(DISTDIR)/utils/screenshotgen/src/bitmaps
mkdir $(DISTDIR)/utils/ifacecheck
mkdir $(DISTDIR)/utils/ifacecheck/src
$(CP_P) $(UTILSDIR)/ifacecheck/README.txt $(DISTDIR)/utils/ifacecheck
$(CP_P) $(UTILSDIR)/ifacecheck/*.dtd $(DISTDIR)/utils/ifacecheck
$(CP_P) $(UTILSDIR)/ifacecheck/*.xsl $(DISTDIR)/utils/ifacecheck
$(CP_P) $(UTILSDIR)/ifacecheck/*.in $(DISTDIR)/utils/ifacecheck
$(CP_P) $(UTILSDIR)/ifacecheck/src/* $(DISTDIR)/utils/ifacecheck/src
mkdir $(DISTDIR)/utils/emulator
mkdir $(DISTDIR)/utils/emulator/src
mkdir $(DISTDIR)/utils/emulator/docs
$(CP_P) $(UTILSDIR)/emulator/*.in $(DISTDIR)/utils/emulator
$(CP_P) $(UTILSDIR)/emulator/src/*.h $(DISTDIR)/utils/emulator/src
$(CP_P) $(UTILSDIR)/emulator/src/*.in $(DISTDIR)/utils/emulator/src
$(CP_P) $(UTILSDIR)/emulator/src/*.cpp $(DISTDIR)/utils/emulator/src
$(CP_P) $(UTILSDIR)/emulator/src/*.jpg $(DISTDIR)/utils/emulator/src
$(CP_P) $(UTILSDIR)/emulator/src/*.wxe $(DISTDIR)/utils/emulator/src
$(CP_P) $(UTILSDIR)/emulator/src/*.xpm $(DISTDIR)/utils/emulator/src
$(CP_P) $(UTILSDIR)/emulator/docs/*.txt $(DISTDIR)/utils/emulator/docs
$(CP_P) $(UTILSDIR)/emulator/docs/*.jpg $(DISTDIR)/utils/emulator/docs
mkdir $(DISTDIR)/utils/hhp2cached
$(CP_P) $(UTILSDIR)/hhp2cached/Makefile.in $(DISTDIR)/utils/hhp2cached
$(CP_P) $(UTILSDIR)/hhp2cached/*.cpp $(DISTDIR)/utils/hhp2cached
$(CP_P) $(UTILSDIR)/hhp2cached/*.rc $(DISTDIR)/utils/hhp2cached
mkdir $(DISTDIR)/utils/helpview
mkdir $(DISTDIR)/utils/helpview/src
mkdir $(DISTDIR)/utils/helpview/src/bitmaps
$(CP_P) $(UTILSDIR)/helpview/Makefile.in $(DISTDIR)/utils/helpview
$(CP_P) $(UTILSDIR)/helpview/src/*.h $(DISTDIR)/utils/helpview/src
$(CP_P) $(UTILSDIR)/helpview/src/*.cpp $(DISTDIR)/utils/helpview/src
$(CP_P) $(UTILSDIR)/helpview/src/*.rc $(DISTDIR)/utils/helpview/src
$(CP_P) $(UTILSDIR)/helpview/src/*.ico $(DISTDIR)/utils/helpview/src
$(CP_P) $(UTILSDIR)/helpview/src/readme.txt $(DISTDIR)/utils/helpview/src
$(CP_P) $(UTILSDIR)/helpview/src/Makefile.in $(DISTDIR)/utils/helpview/src
$(CP_P) $(UTILSDIR)/helpview/src/test.zip $(DISTDIR)/utils/helpview/src
$(CP_P) $(UTILSDIR)/helpview/src/bitmaps/*.xpm $(DISTDIR)/utils/helpview/src/bitmaps
mkdir $(DISTDIR)/utils/wxrc
$(CP_P) $(UTILSDIR)/wxrc/Makefile.in $(DISTDIR)/utils/wxrc
$(CP_P) $(UTILSDIR)/wxrc/*.cpp $(DISTDIR)/utils/wxrc
$(CP_P) $(UTILSDIR)/wxrc/*.rc $(DISTDIR)/utils/wxrc
MISC_DIST: ALL_GUI_DIST
INTL_DIST:
mkdir $(DISTDIR)/locale
$(CP_P) $(INTLDIR)/Makefile $(DISTDIR)/locale
$(CP_P) $(INTLDIR)/*.po $(DISTDIR)/locale
subdirs=`cd $(INTLDIR) && ls */*.po | sed 's|/.*||' | uniq`; \
for dir in "$$subdirs"; do \
mkdir $(DISTDIR)/locale/$$dir; \
$(CP_P) $(INTLDIR)/$$dir/*.[pm]o $(DISTDIR)/locale/$$dir; \
done
MANUAL_DIST:
mkdir $(DISTDIR)/docs
mkdir $(DISTDIR)/docs/doxygen
mkdir $(DISTDIR)/docs/doxygen/groups
mkdir $(DISTDIR)/docs/doxygen/images
mkdir $(DISTDIR)/docs/doxygen/images/stock
mkdir $(DISTDIR)/docs/doxygen/images/wxgtk
mkdir $(DISTDIR)/docs/doxygen/images/wxmac
mkdir $(DISTDIR)/docs/doxygen/images/wxmsw
mkdir $(DISTDIR)/docs/doxygen/mainpages
mkdir $(DISTDIR)/docs/doxygen/overviews
$(CP_P) $(DOCDIR)/doxygen/* $(DISTDIR)/docs/doxygen
$(CP_P) $(DOCDIR)/doxygen/groups/*.h $(DISTDIR)/docs/doxygen/groups
$(CP_P) $(DOCDIR)/doxygen/mainpages/*.h $(DISTDIR)/docs/doxygen/mainpages
$(CP_P) $(DOCDIR)/doxygen/overviews/*.h $(DISTDIR)/docs/doxygen/overviews
$(CP_P) $(DOCDIR)/doxygen/images/*.??? $(DISTDIR)/docs/doxygen/images
$(CP_P) $(DOCDIR)/doxygen/images/wxgtk/*.??? $(DISTDIR)/docs/doxygen/images/stock
$(CP_P) $(DOCDIR)/doxygen/images/wxgtk/*.??? $(DISTDIR)/docs/doxygen/images/wxgtk
$(CP_P) $(DOCDIR)/doxygen/images/wxmac/*.??? $(DISTDIR)/docs/doxygen/images/wxmac
$(CP_P) $(DOCDIR)/doxygen/images/wxmsw/*.??? $(DISTDIR)/docs/doxygen/images/wxmsw
mkdir $(DISTDIR)/interface
mkdir $(DISTDIR)/interface/wx
mkdir $(DISTDIR)/interface/wx/aui
mkdir $(DISTDIR)/interface/wx/ribbon
mkdir $(DISTDIR)/interface/wx/generic
mkdir $(DISTDIR)/interface/wx/html
mkdir $(DISTDIR)/interface/wx/msw
mkdir $(DISTDIR)/interface/wx/msw/ole
mkdir $(DISTDIR)/interface/wx/persist
mkdir $(DISTDIR)/interface/wx/protocol
mkdir $(DISTDIR)/interface/wx/propgrid
mkdir $(DISTDIR)/interface/wx/richtext
mkdir $(DISTDIR)/interface/wx/stc
mkdir $(DISTDIR)/interface/wx/xml
mkdir $(DISTDIR)/interface/wx/xrc
$(CP_P) $(IFACEDIR)/wx/*.h $(DISTDIR)/interface/wx
$(CP_P) $(IFACEDIR)/wx/aui/*.h $(DISTDIR)/interface/wx/aui
$(CP_P) $(IFACEDIR)/wx/ribbon/*.h $(DISTDIR)/interface/wx/ribbon
$(CP_P) $(IFACEDIR)/wx/generic/*.h $(DISTDIR)/interface/wx/generic
$(CP_P) $(IFACEDIR)/wx/html/*.h $(DISTDIR)/interface/wx/html
$(CP_P) $(IFACEDIR)/wx/msw/*.h $(DISTDIR)/interface/wx/msw
$(CP_P) $(IFACEDIR)/wx/msw/ole/*.h $(DISTDIR)/interface/wx/msw/ole
$(CP_P) $(IFACEDIR)/wx/persist/*.h $(DISTDIR)/interface/wx/persist
$(CP_P) $(IFACEDIR)/wx/protocol/*.h $(DISTDIR)/interface/wx/protocol
$(CP_P) $(IFACEDIR)/wx/propgrid/*.h $(DISTDIR)/interface/wx/propgrid
$(CP_P) $(IFACEDIR)/wx/richtext/*.h $(DISTDIR)/interface/wx/richtext
$(CP_P) $(IFACEDIR)/wx/stc/*.h $(DISTDIR)/interface/wx/stc
$(CP_P) $(IFACEDIR)/wx/xml/*.h $(DISTDIR)/interface/wx/xml
$(CP_P) $(IFACEDIR)/wx/xrc/*.h $(DISTDIR)/interface/wx/xrc
# Copy all the files from wxPython needed for the Debian source package,
# and then remove some that are not needed.
PYTHON_DIST:
for dir in `grep -v '#' $(WXDIR)/wxPython/distrib/DIRLIST`; do \
echo "Copying dir: $$dir..."; \
mkdir $(DISTDIR)/$$dir; \
$(CP_P) $(WXDIR)/$$dir/* $(DISTDIR)/$$dir > /dev/null 2>&1; \
done; \
\
find $(DISTDIR)/wxPython -name "*~" > RM_FILES; \
find $(DISTDIR)/wxPython -name "*.pyc" >> RM_FILES; \
find $(DISTDIR)/wxPython -name "*.bat" >> RM_FILES; \
find $(DISTDIR)/wxPython -name "core" >> RM_FILES; \
find $(DISTDIR)/wxPython -name "core.[0-9]*" >> RM_FILES; \
find $(DISTDIR)/wxPython -name "*.orig" >> RM_FILES; \
find $(DISTDIR)/wxPython -name "*.rej" >> RM_FILES; \
for f in `cat RM_FILES`; do rm $$f; done; \
rm RM_FILES
distrib_clean:
$(RM) -r _dist_dir
# VZ: the -only targets allow to do "make dist bzip-dist-only" without copying
# the files twice
dist-only:
@echo "*** Creating wxWidgets distribution in $(DISTDIR)..."
@cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE);
@if test "$(USE_GUI)" = 1; then \
cd $(DISTDIR); \
mv samples wxSamples-$(WX_VERSION); \
echo "*** Creating wxSamples archive..."; \
tar ch wxSamples-$(WX_VERSION) | gzip -f9 > ../../$(WXSAMPLES); \
mv wxSamples-$(WX_VERSION) samples; \
mv demos wxDemos-$(WX_VERSION); \
echo "*** Creating wxDemos archive..."; \
tar ch wxDemos-$(WX_VERSION) | gzip -f9 > ../../$(WXDEMOS); \
mv wxDemos-$(WX_VERSION) demos; \
fi
distdir: @GUIDIST@
@echo "*** Creating wxWidgets distribution in $(DISTDIR)..."
@# now prune away a lot of the crap included by using cp -R
@# in other dist targets.
find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \
\( -name "makefile.*" -a ! -name "makefile.gcc" -a ! -name "makefile.unx" \) \) \
-print | grep -vE '/samples/.*\.hh.$$' | xargs rm -rf
dist: distdir
@cd _dist_dir && tar ch $(DISTDIRNAME) | gzip -f9 > ../$(WXARCHIVE);
@if test "$(USE_GUI)" = 1; then \
cd $(DISTDIR); \
mv samples wxSamples-$(WX_VERSION); \
echo "*** Creating wxSamples archive..."; \
tar ch wxSamples-$(WX_VERSION) | gzip -f9 > ../../$(WXSAMPLES); \
mv wxSamples-$(WX_VERSION) samples; \
mv demos wxDemos-$(WX_VERSION); \
echo "*** Creating wxDemos archive..."; \
tar ch wxDemos-$(WX_VERSION) | gzip -f9 > ../../$(WXDEMOS); \
mv wxDemos-$(WX_VERSION) demos; \
fi
bzip-dist-only:
@echo "*** Creating wxWidgets distribution in $(DISTDIR)..."
@cd _dist_dir && tar ch $(DISTDIRNAME) | bzip2 -f9 > ../$(WXARCHIVE_BZIP);
@if test "$(USE_GUI)" = 1; then \
cd $(DISTDIR); \
mv samples wxSamples-${WX_VERSION}; \
echo "*** Creating wxSamples archive..."; \
tar ch wxSamples-${WX_VERSION} | bzip2 -f9 > ../../$(WXSAMPLES_BZIP); \
mv wxSamples-${WX_VERSION} samples; \
mv demos wxDemos-${WX_VERSION}; \
echo "*** Creating wxDemos archive..."; \
tar ch wxDemos-${WX_VERSION} | bzip2 -f9 > ../../$(WXDEMOS_BZIP); \
mv wxDemos-${WX_VERSION} demos; \
fi
bzip-dist: @GUIDIST@
@echo "*** Creating wxWidgets distribution in $(DISTDIR)..."
@cd _dist_dir && tar ch $(DISTDIRNAME) | bzip2 -f9 > ../$(WXARCHIVE_BZIP)
@if test "$(USE_GUI)" = 1; then \
cd $(DISTDIR); \
mv samples wxSamples; \
tar ch wxSamples | bzip2 -f9 > ../../$(WXSAMPLES_BZIP); \
mv wxSamples samples; \
mv demos wxDemos; \
tar ch wxDemos | bzip2 -f9 > ../../$(WXDEMOS_BZIP); \
mv wxDemos demos; \
fi
win-dist: MSW_ZIP_TEXT_DIST SAMPLES_DIST DEMOS_DIST UTILS_DIST MISC_DIST INTL_DIST
for s in `find $(SAMPDIR) $(SAMPDIR)/html $(SAMPDIR)/opengl \
-mindepth 1 -maxdepth 1 -type d -not -name CVS`; do \
t="$(DISTDIR)/samples/`echo $$s | sed 's@$(SAMPDIR)/@@'`"; \
$(CP_P) \
`find $$s -maxdepth 1 -name '*.dsp' -o -name '*.vcproj'` $$t; \
done
# RR: Copy text and binary data separately
@echo "*** Creating wxWidgets ZIP distribution in $(DISTDIR)..."
@cd _dist_dir && mv $(DISTDIRNAME) wxMSW
@cd _dist_dir && zip -r -l ../$(WXARCHIVE_ZIP) *
$(CP_P) $(INCDIR)/wx/msw/*.cur _dist_dir/wxMSW/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.ico _dist_dir/wxMSW/include/wx/msw
$(CP_P) $(INCDIR)/wx/msw/*.bmp _dist_dir/wxMSW/include/wx/msw
@cd _dist_dir && zip -r ../$(WXARCHIVE_ZIP) wxMSW/include/wx/msw/*.cur
@cd _dist_dir && zip -r ../$(WXARCHIVE_ZIP) wxMSW/include/wx/msw/*.ico
@cd _dist_dir && zip -r ../$(WXARCHIVE_ZIP) wxMSW/include/wx/msw/*.bmp

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" ?>
<makefile>
<set var="MONOLIB_STC_SRC">
<if cond="USE_STC=='1'">
$(STC_SRC)
</if>
</set>
<set var="MONOLIB_GUI_SRC">
<if cond="USE_GUI=='1'">
$(CORE_SRC) $(MEDIA_SRC) $(HTML_SRC) $(WEBVIEW_SRC)
$(QA_SRC) $(XRC_SRC) $(AUI_SRC) $(PROPGRID_SRC) $(RIBBON_SRC)
$(RICHTEXT_SRC) $(MONOLIB_STC_SRC)
</if>
</set>
<set var="MONOLIB_SRC">
$(BASE_SRC) $(BASE_AND_GUI_SRC) $(NET_SRC) $(MONOLIB_GUI_SRC) $(XML_SRC)
</set>
<!-- settings common to mono{dll,lib} below -->
<template id="wx_monolib_or_dll" template="wxscintilla_cppflags,wxlexilla_cppflags,webview_additional">
<define>wxUSE_BASE=1</define>
<sources>$(MONOLIB_SRC) $(PLUGIN_MONOLIB_SRC)</sources>
<msvc-headers>$(ALL_HEADERS)</msvc-headers>
</template>
<dll id="monodll" template="wx_dll,wx_monolib_or_dll"
cond="SHARED=='1' and MONOLITHIC=='1'">
<define>WXMAKINGDLL</define>
<ldlibs>$(EXTRALIBS_XML)</ldlibs>
<ldlibs>$(EXTRALIBS_HTML)</ldlibs>
<ldlibs>$(EXTRALIBS_MEDIA)</ldlibs>
<ldlibs>$(EXTRALIBS_STC)</ldlibs>
<ldlibs>$(PLUGIN_MONOLIB_EXTRALIBS)</ldlibs>
<ldflags>$(EXTRALDFLAGS_WEBVIEW)</ldflags>
<ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
<library>$(wxscintilla_library_link)</library>
<library>$(wxlexilla_library_link)</library>
</dll>
<lib id="monolib" template="wx_lib,wx_monolib_or_dll"
cond="SHARED=='0' and MONOLITHIC=='1'">
<if cond="FORMAT=='watcom'">
<set var="LIB_PAGESIZE" overwrite="1">8192</set>
</if>
</lib>
<set var="MSVC6PRJ_MERGED_TARGETS_MONOLIB" append="1">mono=monolib+monodll</set>
<!-- included by wx.bkl from opengl.bkl -->
<set var="MSVC6PRJ_MERGED_TARGETS_MONOLIB" append="1">gl=gllib+gldll</set>
</makefile>

View File

@@ -0,0 +1,413 @@
<?xml version="1.0" ?>
<makefile>
<define-rule name="wxshortcut" extends="phony">
<template>
<set var="name">$(id.replace('wx',''))</set>
<set var="namedll">
<if cond="SHARED=='1'">$(name)dll</if>
</set>
<set var="namelib">
<if cond="SHARED=='0'">$(name)lib</if>
</set>
<depends>$(namedll)</depends>
<depends>$(namelib)</depends>
</template>
</define-rule>
<!-- ================================================================= -->
<!-- wxBase library -->
<!-- ================================================================= -->
<dll id="basedll" template="wx_base_dll"
cond="SHARED=='1' and MONOLITHIC=='0'">
<define>WXMAKINGDLL_BASE</define>
<define>wxUSE_BASE=1</define>
<sources>$(BASE_SRC) $(BASE_AND_GUI_SRC)</sources>
<msvc-headers>$(BASE_CMN_HDR) $(BASE_PLATFORM_HDR)</msvc-headers>
</dll>
<lib id="baselib" template="wx_base_lib"
cond="SHARED=='0' and MONOLITHIC=='0'">
<define>wxUSE_BASE=1</define>
<sources>$(BASE_SRC) $(BASE_AND_GUI_SRC)</sources>
<msvc-headers>$(BASE_CMN_HDR) $(BASE_PLATFORM_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxbase" cond="MONOLITHIC=='0'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">base=baselib+basedll</set>
<!-- ================================================================= -->
<!-- wxNet library -->
<!-- ================================================================= -->
<dll id="netdll" template="wx_base_dll"
cond="SHARED=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_NET</define>
<sources>$(NET_SRC)</sources>
<msvc-headers>$(NET_CMN_HDR)</msvc-headers>
<library>basedll</library>
</dll>
<lib id="netlib" template="wx_base_lib"
cond="SHARED=='0' and MONOLITHIC=='0'">
<sources>$(NET_SRC)</sources>
<msvc-headers>$(NET_CMN_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxnet" cond="MONOLITHIC=='0'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">net=netlib+netdll</set>
<!-- ================================================================= -->
<!-- Main GUI library -->
<!-- ================================================================= -->
<dll id="coredll" template="wx_dll"
cond="SHARED=='1' and USE_GUI=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_CORE</define>
<define>wxUSE_BASE=0</define>
<sources>$(BASE_AND_GUI_SRC) $(CORE_SRC) $(PLUGIN_SRC)</sources>
<msvc-headers>$(ALL_GUI_HEADERS)</msvc-headers>
<library>basedll</library>
</dll>
<lib id="corelib" template="wx_lib"
cond="SHARED=='0' and USE_GUI=='1' and MONOLITHIC=='0'">
<define>wxUSE_BASE=0</define>
<sources>$(BASE_AND_GUI_SRC) $(CORE_SRC) $(PLUGIN_SRC)</sources>
<msvc-headers>$(ALL_GUI_HEADERS)</msvc-headers>
</lib>
<wxshortcut id="wxcore" cond="MONOLITHIC=='0' and USE_GUI=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">core=corelib+coredll</set>
<!-- ================================================================= -->
<!-- "Advanced" controls library -->
<!-- ================================================================= -->
<dll id="advdll" template="wx_dll"
cond="SHARED=='1' and USE_GUI=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_ADV</define>
<sources>$(ADVANCED_SRC)</sources>
<msvc-headers>$(ADVANCED_HDR)</msvc-headers>
<library>coredll</library>
<library>basedll</library>
<ldlibs>$(PLUGIN_ADV_EXTRALIBS)</ldlibs>
</dll>
<lib id="advlib" template="wx_lib"
cond="SHARED=='0' and USE_GUI=='1' and MONOLITHIC=='0'">
<sources>$(ADVANCED_SRC)</sources>
<msvc-headers>$(ADVANCED_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxadv" cond="MONOLITHIC=='0' and USE_GUI=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">adv=advlib+advdll</set>
<!-- ================================================================= -->
<!-- wxMedia classes library -->
<!-- ================================================================= -->
<dll id="mediadll" template="wx_dll"
cond="SHARED=='1' and USE_MEDIA=='1' and USE_GUI=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_MEDIA</define>
<sources>$(MEDIA_SRC)</sources>
<msvc-headers>$(MEDIA_HDR)</msvc-headers>
<library>coredll</library>
<library>basedll</library>
<ldlibs>$(EXTRALIBS_MEDIA)</ldlibs>
</dll>
<lib id="medialib" template="wx_lib"
cond="SHARED=='0' and USE_MEDIA=='1' and USE_GUI=='1' and MONOLITHIC=='0'">
<sources>$(MEDIA_SRC)</sources>
<msvc-headers>$(MEDIA_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxmedia" cond="MONOLITHIC=='0' and USE_GUI=='1' and USE_MEDIA=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">media=medialib+mediadll</set>
<!-- ================================================================ -->
<!-- wxHTML -->
<!-- ================================================================ -->
<dll id="htmldll" template="wx_dll"
cond="SHARED=='1' and USE_GUI=='1' and USE_HTML=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_HTML</define>
<sources>$(HTML_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<ldlibs>$(EXTRALIBS_HTML)</ldlibs>
<msvc-headers>$(HTML_HDR)</msvc-headers>
</dll>
<!-- use this to conditonally link against htmldll with <library>: -->
<set var="htmldll_library_link">
<if cond="SHARED=='1' and USE_GUI=='1' and USE_HTML=='1' and MONOLITHIC=='0'">htmldll</if>
</set>
<lib id="htmllib" template="wx_lib"
cond="SHARED=='0' and USE_GUI=='1' and USE_HTML=='1' and MONOLITHIC=='0'">
<sources>$(HTML_SRC)</sources>
<msvc-headers>$(HTML_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxhtml" cond="MONOLITHIC=='0' and USE_HTML=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">html=htmllib+htmldll</set>
<!-- ================================================================ -->
<!-- wxWEBVIEW -->
<!-- ================================================================ -->
<dll id="webviewdll" template="wx_dll,webview_additional"
cond="SHARED=='1' and USE_GUI=='1' and USE_WEBVIEW=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_WEBVIEW</define>
<sources>$(WEBVIEW_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<ldflags>$(EXTRALDFLAGS_WEBVIEW)</ldflags>
<ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
<msvc-headers>$(WEBVIEW_HDR)</msvc-headers>
<include>$(CEF_DIR)</include>
</dll>
<lib id="webviewlib" template="wx_lib,webview_additional"
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>$(CEF_DIR)</include>
</lib>
<wxshortcut id="wxwebview" cond="MONOLITHIC=='0' and USE_WEBVIEW=='1'"/>
<!-- ================================================================ -->
<!-- OpenGL -->
<!-- ================================================================ -->
<!-- included by wx.bkl from opengl.bkl -->
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">gl=gllib+gldll</set>
<!-- ================================================================ -->
<!-- QA -->
<!-- ================================================================ -->
<dll id="qadll" template="wx_dll"
cond="SHARED=='1' and USE_GUI=='1' and USE_QA=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_QA</define>
<sources>$(QA_SRC)</sources>
<msvc-headers>$(QA_HDR)</msvc-headers>
<library>coredll</library>
<library>basedll</library>
<library>xmldll</library>
</dll>
<lib id="qalib" template="wx_lib"
cond="SHARED=='0' and USE_GUI=='1' and USE_QA=='1' and MONOLITHIC=='0'">
<sources>$(QA_SRC)</sources>
<msvc-headers>$(QA_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxqa" cond="MONOLITHIC=='0' and USE_QA=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">qa=qalib+qadll</set>
<!-- ================================================================ -->
<!-- XML -->
<!-- ================================================================ -->
<dll id="xmldll" template="wx_base_dll"
cond="SHARED=='1' and USE_XML=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_XML</define>
<sources>$(XML_SRC)</sources>
<msvc-headers>$(XML_HDR)</msvc-headers>
<library>basedll</library>
<ldlibs>$(EXTRALIBS_XML)</ldlibs>
</dll>
<lib id="xmllib" template="wx_base_lib"
cond="SHARED=='0' and USE_XML=='1' and MONOLITHIC=='0'">
<sources>$(XML_SRC)</sources>
<msvc-headers>$(XML_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxxml" cond="USE_XML=='1' and MONOLITHIC=='0'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">xml=xmllib+xmldll</set>
<!-- ================================================================ -->
<!-- XRC -->
<!-- ================================================================ -->
<dll id="xrcdll" template="wx_dll"
cond="SHARED=='1' and USE_XML=='1' and USE_XRC=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_XRC</define>
<sources>$(XRC_SRC)</sources>
<library>$(htmldll_library_link)</library>
<library>coredll</library>
<library>xmldll</library>
<library>basedll</library>
<msvc-headers>$(XRC_HDR)</msvc-headers>
</dll>
<lib id="xrclib" template="wx_lib"
cond="SHARED=='0' and USE_XRC=='1' and MONOLITHIC=='0'">
<sources>$(XRC_SRC)</sources>
<msvc-headers>$(XRC_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxxrc" cond="MONOLITHIC=='0' and USE_XRC=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">xrc=xrclib+xrcdll</set>
<!-- ================================================================ -->
<!-- AUI -->
<!-- ================================================================ -->
<dll id="auidll" template="wx_dll"
cond="SHARED=='1' and USE_AUI=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_AUI</define>
<sources>$(AUI_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<msvc-headers>$(AUI_HDR)</msvc-headers>
</dll>
<lib id="auilib" template="wx_lib"
cond="SHARED=='0' and USE_AUI=='1' and MONOLITHIC=='0'">
<sources>$(AUI_SRC)</sources>
<msvc-headers>$(AUI_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxaui" cond="MONOLITHIC=='0' and USE_AUI=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">aui=auilib+auidll</set>
<!-- ================================================================ -->
<!-- RIBBON -->
<!-- ================================================================ -->
<dll id="ribbondll" template="wx_dll"
cond="SHARED=='1' and USE_RIBBON=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_RIBBON</define>
<sources>$(RIBBON_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<msvc-headers>$(RIBBON_HDR)</msvc-headers>
</dll>
<lib id="ribbonlib" template="wx_lib"
cond="SHARED=='0' and USE_RIBBON=='1' and MONOLITHIC=='0'">
<sources>$(RIBBON_SRC)</sources>
<msvc-headers>$(RIBBON_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxribbon" cond="MONOLITHIC=='0' and USE_RIBBON=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">ribbon=ribbonlib+ribbondll</set>
<!-- ================================================================ -->
<!-- PROPGRID -->
<!-- ================================================================ -->
<dll id="propgriddll" template="wx_dll"
cond="SHARED=='1' and USE_PROPGRID=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_PROPGRID</define>
<sources>$(PROPGRID_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<msvc-headers>$(PROPGRID_HDR)</msvc-headers>
</dll>
<lib id="propgridlib" template="wx_lib"
cond="SHARED=='0' and USE_PROPGRID=='1' and MONOLITHIC=='0'">
<sources>$(PROPGRID_SRC)</sources>
<msvc-headers>$(PROPGRID_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxpropgrid" cond="MONOLITHIC=='0' and USE_PROPGRID=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">propgrid=propgridlib+propgriddll</set>
<!-- ================================================================ -->
<!-- RICHTEXT -->
<!-- ================================================================ -->
<dll id="richtextdll" template="wx_dll"
cond="SHARED=='1' and USE_RICHTEXT=='1' and USE_XML=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_RICHTEXT</define>
<sources>$(RICHTEXT_SRC)</sources>
<library>$(htmldll_library_link)</library>
<library>xmldll</library>
<library>coredll</library>
<library>basedll</library>
<msvc-headers>$(RICHTEXT_HDR)</msvc-headers>
</dll>
<lib id="richtextlib" template="wx_lib"
cond="SHARED=='0' and USE_RICHTEXT=='1' and MONOLITHIC=='0'">
<sources>$(RICHTEXT_SRC)</sources>
<msvc-headers>$(RICHTEXT_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxrichtext" cond="MONOLITHIC=='0' and USE_RICHTEXT=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">richtext=richtextlib+richtextdll</set>
<!-- ================================================================ -->
<!-- STC -->
<!-- ================================================================ -->
<template id="stc_base" template="wxscintilla_cppflags,wxlexilla_cppflags">
<library>wxscintilla</library>
<library>wxlexilla</library>
</template>
<dll id="stcdll" template="wx_dll,stc_base"
cond="SHARED=='1' and USE_STC=='1' and MONOLITHIC=='0'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_STC</define>
<sources>$(STC_SRC)</sources>
<library>coredll</library>
<library>basedll</library>
<ldlibs>$(EXTRALIBS_STC)</ldlibs>
<msvc-headers>$(STC_HDR)</msvc-headers>
</dll>
<lib id="stclib" template="wx_lib,stc_base"
cond="SHARED=='0' and USE_STC=='1' and MONOLITHIC=='0'">
<sources>$(STC_SRC)</sources>
<msvc-headers>$(STC_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxstc" cond="MONOLITHIC=='0' and USE_STC=='1'"/>
<set var="MSVC6PRJ_MERGED_TARGETS_MULTILIB" append="1">stc=stclib+stcdll</set>
</makefile>

View File

@@ -0,0 +1,43 @@
<?xml version="1.0" ?>
<makefile>
<!-- ================================================================= -->
<!-- OpenGL canvas library -->
<!-- ================================================================= -->
<set var="WXLIBGLDEP_CORE">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
</set>
<set var="WXLIBGLDEP_BASE">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
</set>
<dll id="gldll" template="wx_dll"
cond="SHARED=='1' and USE_GUI=='1' and USE_OPENGL=='1'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_GL</define>
<sources>$(OPENGL_SRC)</sources>
<msvc-headers>$(OPENGL_HDR)</msvc-headers>
<!-- link against base and core libs in multilib build: -->
<sys-lib>$(WXLIBGLDEP_CORE)</sys-lib>
<sys-lib>$(WXLIBGLDEP_BASE)</sys-lib>
<depends>basedll</depends>
<depends>coredll</depends>
<!-- link against the wxWin library in monolithic build: -->
<sys-lib>$(WXLIB_MONO)</sys-lib>
<depends>monodll</depends>
<ldlibs>$(EXTRALIBS_OPENGL)</ldlibs>
</dll>
<lib id="gllib" template="wx_lib"
cond="SHARED=='0' and USE_GUI=='1' and USE_OPENGL=='1'">
<sources>$(OPENGL_SRC)</sources>
<msvc-headers>$(OPENGL_HDR)</msvc-headers>
</lib>
<wxshortcut id="wxgl" cond="USE_GUI=='1' and USE_OPENGL=='1'"/>
</makefile>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" ?>
<makefile>
<!-- ================================================================ -->
<!-- Unix audio plugins -->
<!-- ================================================================ -->
<wx-base-plugin id="sound_sdl" cond="WITH_PLUGIN_SDL=='1'">
<sources>$(UNIX_SOUND_SDL_SRC)</sources>
<ldlibs>$(EXTRALIBS_SDL)</ldlibs>
</wx-base-plugin>
<if cond="FORMAT=='autoconf'">
<wx-base-plugin id="webkit2_ext" cond="USE_WEBVIEW_WEBKIT2=='1'">
<sources>$(WEBVIEW_WEBKIT2_EXTENSION_SRC)</sources>
<ldlibs>$(EXTRALIBS_WEBVIEW)</ldlibs>
<install-to>$(PLUGINS_INST_DIR)/web-extensions</install-to>
</wx-base-plugin>
</if>
</makefile>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" ?>
<makefile>
<!-- Additional dependencies of core libraries if plugins are
disabled (these would be deps of the plugins if they were
enabled): -->
<set var="PLUGIN_ADV_EXTRALIBS">
<if cond="USE_PLUGINS=='0'">
$(EXTRALIBS_SDL)
</if>
</set>
<!-- monolithic library must link against all this: -->
<set var="PLUGIN_MONOLIB_EXTRALIBS">$(PLUGIN_ADV_EXTRALIBS)</set>
</makefile>

View File

@@ -0,0 +1,63 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<option name="wxUSE_LIBPNG"/>
<set var="LIB_PNG">
<if cond="wxUSE_LIBPNG=='builtin' and USE_GUI=='1'">
wxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="wxUSE_LIBPNG">builtin</set>
<set var="LIB_PNG">
<if cond="wxUSE_LIBPNG=='builtin' and USE_GUI=='1'">
wxpng$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<set var="INC_PNG">
<if cond="wxUSE_LIBPNG=='builtin'">$(TOP_SRCDIR)src/png</if>
</set>
<lib id="wxpng" template_append="3rdparty_lib"
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>
src/png/png.c
src/png/pngerror.c
src/png/pngget.c
src/png/pngmem.c
src/png/pngpread.c
src/png/pngread.c
src/png/pngrio.c
src/png/pngrtran.c
src/png/pngrutil.c
src/png/pngset.c
src/png/pngtrans.c
src/png/pngwio.c
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

@@ -0,0 +1,75 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<option name="wxUSE_REGEX"/>
<option name="wxPCRE2_CODE_UNIT_WIDTH"/>
<set var="LIB_REGEX">
<if cond="wxUSE_REGEX=='builtin'">
wxregexu$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
<set var="INC_REGEX_BUILD">
$(wx_top_builddir)/3rdparty/pcre/src
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="wxUSE_REGEX">builtin</set>
<set var="LIB_REGEX">
<if cond="wxUSE_REGEX=='builtin'">
wxregexu$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<set var="INC_REGEX">
<if cond="wxUSE_REGEX=='builtin'">
$(TOP_SRCDIR)3rdparty/pcre/src/wx
</if>
</set>
<lib id="wxregex" template_append="msvc_setup_h,3rdparty_lib_u"
cond="wxUSE_REGEX=='builtin' and BUILDING_LIB=='1'">
<include cond="FORMAT!='autoconf'">$(TOP_SRCDIR)include</include>
<include cond="FORMAT!='autoconf'">$(SETUPHDIR)</include>
<include cond="FORMAT!='autoconf'">$(INC_REGEX)</include>
<include cond="FORMAT=='autoconf'">$(INC_REGEX_BUILD)</include>
<define>__WX__</define>
<define>HAVE_CONFIG_H</define>
<define cond="FORMAT=='autoconf'">PCRE2_CODE_UNIT_WIDTH=$(wxPCRE2_CODE_UNIT_WIDTH)</define>
<dirname>$(LIBDIRNAME)</dirname>
<sources>
3rdparty/pcre/src/pcre2_auto_possess.c
3rdparty/pcre/src/pcre2_chkdint.c
3rdparty/pcre/src/pcre2_compile.c
3rdparty/pcre/src/pcre2_compile_class.c
3rdparty/pcre/src/pcre2_config.c
3rdparty/pcre/src/pcre2_context.c
3rdparty/pcre/src/pcre2_convert.c
3rdparty/pcre/src/pcre2_dfa_match.c
3rdparty/pcre/src/pcre2_error.c
3rdparty/pcre/src/pcre2_extuni.c
3rdparty/pcre/src/pcre2_find_bracket.c
3rdparty/pcre/src/pcre2_jit_compile.c
3rdparty/pcre/src/pcre2_maketables.c
3rdparty/pcre/src/pcre2_match.c
3rdparty/pcre/src/pcre2_match_data.c
3rdparty/pcre/src/pcre2_newline.c
3rdparty/pcre/src/pcre2_ord2utf.c
3rdparty/pcre/src/pcre2_pattern_info.c
3rdparty/pcre/src/pcre2_script_run.c
3rdparty/pcre/src/pcre2_serialize.c
3rdparty/pcre/src/pcre2_string_utils.c
3rdparty/pcre/src/pcre2_study.c
3rdparty/pcre/src/pcre2_substitute.c
3rdparty/pcre/src/pcre2_substring.c
3rdparty/pcre/src/pcre2_tables.c
3rdparty/pcre/src/pcre2_ucd.c
3rdparty/pcre/src/pcre2_valid_utf.c
3rdparty/pcre/src/pcre2_xclass.c
3rdparty/pcre/src/pcre2_chartables.c
</sources>
</lib>
</makefile>

View File

@@ -0,0 +1,92 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<set var="LIB_SCINTILLA">
<if cond="USE_STC=='1'">
wxscintilla$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="LIB_SCINTILLA">
wxscintilla$(WXDEBUGFLAG)$(HOST_SUFFIX)
</set>
</if>
<!-- automatically update generated files when building the library -->
<if cond="BUILDING_LIB=='1'">
<fragment format='autoconf'>
@COND_PYTHON@@COND_USE_STC_1@$(srcdir)/include/wx/stc/stc.h: \
@COND_PYTHON@@COND_USE_STC_1@$(srcdir)/src/stc/scintilla/include/Scintilla.iface \
@COND_PYTHON@@COND_USE_STC_1@$(srcdir)/src/stc/lexilla/include/LexicalStyles.iface \
@COND_PYTHON@@COND_USE_STC_1@$(srcdir)/src/stc/stc.cpp.in \
@COND_PYTHON@@COND_USE_STC_1@$(srcdir)/src/stc/stc.h.in \
@COND_PYTHON@@COND_USE_STC_1@$(srcdir)/src/stc/gen_iface.py
@COND_PYTHON@@COND_USE_STC_1@ cd $(srcdir)/src/stc &amp;&amp; ./gen_iface.py
@COND_PYTHON@@COND_USE_STC_1@monolib_stc.o monodll_stc.o stcdll_stc.o stclib_stc.o: \
@COND_PYTHON@@COND_USE_STC_1@ $(srcdir)/include/wx/stc/stc.h
</fragment>
</if>
<template id="wxscintilla_cppflags">
<include>$(TOP_SRCDIR)src/stc/scintilla/include</include>
<include>$(TOP_SRCDIR)src/stc/scintilla/src</include>
<define>__WX__</define>
</template>
<set var="wxscintilla_usingdll">
<if cond="SHARED=='1' and MONOLITHIC=='0'">WXUSINGDLL</if>
</set>
<lib id="wxscintilla" template_append="3rdparty_lib,wxscintilla_cppflags,msvc_setup_h"
cond="USE_STC=='1' and BUILDING_LIB=='1'">
<if cond="FORMAT!='autoconf'">
<include>$(SETUPHDIR)</include>
<include>$(TOP_SRCDIR)include</include>
</if>
<define>$(wxscintilla_usingdll)</define>
<define>__WX$(TOOLKIT)__</define>
<define>$(WXUNIV_DEFINE)</define>
<define>$(DEBUG_DEFINE)</define>
<dirname>$(LIBDIRNAME)</dirname>
<sources>
src/stc/scintilla/src/AutoComplete.cxx
src/stc/scintilla/src/CallTip.cxx
src/stc/scintilla/src/CaseConvert.cxx
src/stc/scintilla/src/CaseFolder.cxx
src/stc/scintilla/src/CellBuffer.cxx
src/stc/scintilla/src/CharClassify.cxx
src/stc/scintilla/src/CharacterCategory.cxx
src/stc/scintilla/src/CharacterSet.cxx
src/stc/scintilla/src/ContractionState.cxx
src/stc/scintilla/src/DBCS.cxx
src/stc/scintilla/src/Decoration.cxx
src/stc/scintilla/src/Document.cxx
src/stc/scintilla/src/EditModel.cxx
src/stc/scintilla/src/EditView.cxx
src/stc/scintilla/src/Editor.cxx
src/stc/scintilla/src/Indicator.cxx
src/stc/scintilla/src/KeyMap.cxx
src/stc/scintilla/src/LineMarker.cxx
src/stc/scintilla/src/MarginView.cxx
src/stc/scintilla/src/PerLine.cxx
src/stc/scintilla/src/PositionCache.cxx
src/stc/scintilla/src/RESearch.cxx
src/stc/scintilla/src/RunStyles.cxx
src/stc/scintilla/src/ScintillaBase.cxx
src/stc/scintilla/src/Selection.cxx
src/stc/scintilla/src/Style.cxx
src/stc/scintilla/src/UniConversion.cxx
src/stc/scintilla/src/UniqueString.cxx
src/stc/scintilla/src/ViewStyle.cxx
src/stc/scintilla/src/XPM.cxx
</sources>
</lib>
<!-- used to conditionally link against wxscintilla only if it's enabled -->
<set var="wxscintilla_library_link">
<if cond="USE_STC=='1' and BUILDING_LIB=='1'">wxscintilla</if>
</set>
</makefile>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<option name="wxUSE_LIBTIFF"/>
<set var="LIB_TIFF">
<if cond="wxUSE_LIBTIFF=='builtin' and USE_GUI=='1'">
wxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="wxUSE_LIBTIFF">builtin</set>
<set var="LIB_TIFF">
<if cond="wxUSE_LIBTIFF=='builtin' and USE_GUI=='1'">
wxtiff$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<set var="INC_TIFF_BUILD"></set>
<if cond="FORMAT=='autoconf'">
<set var="INC_TIFF_BUILD">
<if cond="wxUSE_LIBTIFF=='builtin'">$(wx_top_builddir)/src/tiff/libtiff</if>
</set>
</if>
<set var="INC_TIFF">
<if cond="wxUSE_LIBTIFF=='builtin'">$(TOP_SRCDIR)src/tiff/libtiff</if>
</set>
<set var="TIFF_PLATFORM_SRC">
<if cond="PLATFORM_UNIX=='1'">src/tiff/libtiff/tif_unix.c</if>
<if cond="PLATFORM_MACOSX=='1'">src/tiff/libtiff/tif_unix.c</if>
<if cond="PLATFORM_WIN32=='1'">src/tiff/libtiff/tif_win32.c</if>
</set>
<lib id="wxtiff" template_append="3rdparty_lib"
cond="wxUSE_LIBTIFF=='builtin' and USE_GUI=='1' and BUILDING_LIB=='1'">
<dirname>$(LIBDIRNAME)</dirname>
<include>$(INC_ZLIB)</include>
<include>$(INC_JPEG)</include>
<include>$(INC_TIFF_BUILD)</include>
<include>$(INC_TIFF)</include>
<cflags-borland>-w-8004 -w-8012 -w-8057 -w-8060 -w-8066</cflags-borland>
<cflags-dmars>-w2</cflags-dmars>
<cflags-watcom>-wcd=124</cflags-watcom>
<if cond="IS_MSVC">
<!--
define this to get rid of a warning about using POSIX lfind():
confusingly enough, we do define lfind as _lfind for MSVC but
doing this results in a just more confusing warning, see:
http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101278
-->
<define>_CRT_NONSTDC_NO_WARNINGS</define>
</if>
<sources>
$(TIFF_PLATFORM_SRC)
src/tiff/libtiff/tif_aux.c
src/tiff/libtiff/tif_close.c
src/tiff/libtiff/tif_codec.c
src/tiff/libtiff/tif_color.c
src/tiff/libtiff/tif_compress.c
src/tiff/libtiff/tif_dir.c
src/tiff/libtiff/tif_dirinfo.c
src/tiff/libtiff/tif_dirread.c
src/tiff/libtiff/tif_dirwrite.c
src/tiff/libtiff/tif_dumpmode.c
src/tiff/libtiff/tif_error.c
src/tiff/libtiff/tif_extension.c
src/tiff/libtiff/tif_fax3.c
src/tiff/libtiff/tif_fax3sm.c
src/tiff/libtiff/tif_flush.c
src/tiff/libtiff/tif_getimage.c
src/tiff/libtiff/tif_hash_set.c
src/tiff/libtiff/tif_jbig.c
src/tiff/libtiff/tif_jpeg.c
src/tiff/libtiff/tif_jpeg_12.c
src/tiff/libtiff/tif_lerc.c
src/tiff/libtiff/tif_luv.c
src/tiff/libtiff/tif_lzma.c
src/tiff/libtiff/tif_lzw.c
src/tiff/libtiff/tif_next.c
src/tiff/libtiff/tif_ojpeg.c
src/tiff/libtiff/tif_open.c
src/tiff/libtiff/tif_packbits.c
src/tiff/libtiff/tif_pixarlog.c
src/tiff/libtiff/tif_predict.c
<!--
Exclude this file because it contains only TIFFPrintDirectory()
function that we never use, but compiling which generates tons
of warnings when using MinGW (e.g. when cross-compiling) and it
seems simpler to just not compile it at all than to fix them.
src/tiff/libtiff/tif_print.c
-->
src/tiff/libtiff/tif_read.c
src/tiff/libtiff/tif_strip.c
src/tiff/libtiff/tif_swab.c
src/tiff/libtiff/tif_thunder.c
src/tiff/libtiff/tif_tile.c
src/tiff/libtiff/tif_version.c
src/tiff/libtiff/tif_warning.c
src/tiff/libtiff/tif_webp.c
src/tiff/libtiff/tif_write.c
src/tiff/libtiff/tif_zip.c
src/tiff/libtiff/tif_zstd.c
</sources>
</lib>
</makefile>

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" ?>
<makefile>
<!-- ================================================================== -->
<!-- Handling of binary compatiblity: -->
<!-- ================================================================== -->
<!--
We use libtool CURRENT:REVISION:AGE versioning scheme. Here are the
rules for updating the values below, this should be done whenever wx
version (wx/version.h) changes (we abbreviate WX_CURRENT:REVISION:AGE
as C:R:A respectively):
0. Set C:R:A = 0:0:0 if major or minor version has changed.
1. If any API has been removed or otherwise changed in backwards
incompatible way, then change C:R:A to C+1:0:0
2. Else, if any API has been added, change C:R:A to C+1:0:A+1
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">1</set>
<set var="WX_REVISION">0</set>
<set var="WX_AGE">0</set>
<!-- ================================================================== -->
<!-- Library version number: -->
<!-- ================================================================== -->
<!-- extract wx version number from wx/version.h: -->
<set var="WXVER_MAJOR">$(wxwin.getVersionMajor())</set>
<set var="WXVER_MINOR">$(wxwin.getVersionMinor())</set>
<set var="WXVER_RELEASE">$(wxwin.getVersionRelease())</set>
<!-- ================================================================== -->
<!-- Derived variables: -->
<!-- ================================================================== -->
<!-- set misc helper variables: -->
<set var="WX_RELEASE" make_var="1">
$(WXVER_MAJOR).$(WXVER_MINOR)
</set>
<set var="WX_RELEASE_NODOT" make_var="1">
$(WXVER_MAJOR)$(WXVER_MINOR)
</set>
<set var="WX_VERSION" make_var="1">
$(WX_RELEASE).$(WXVER_RELEASE)
</set>
<set var="WX_VERSION_NODOT" make_var="1">
$(WX_RELEASE_NODOT)$(WXVER_RELEASE)
</set>
<set var="WX_STABLE_BRANCH">$(int(int(WXVER_MINOR) % 2 == 0))</set>
<!-- in unstable branch, binary compat. changes with every release, check
for it: -->
<if cond="WX_STABLE_BRANCH=='0' and int(WX_CURRENT)!=int(WXVER_RELEASE)">
<error>Forgot to update WX_CURRENT/WX_REVISION/WX_AGE?</error>
</if>
<set var="WXSOVERSION">
$(int(WX_CURRENT)-int(WX_AGE)).$(WX_AGE).$(WX_REVISION)
</set>
<!-- FIXME: until libtool scheme is implemented in bakefile -->
<set var="WXMACVERSION_CMD">
<if cond="PLATFORM_MACOSX=='1'">
<!-- Version can't be 0, so add 1 to it to force it to be non null -->
-compatibility_version $(int(WX_AGE)+1).0 -current_version $(int(WX_AGE)+1).$(WX_REVISION)
</if>
</set>
<set var="WXWIN32DLLVERSION">
<if cond="WX_STABLE_BRANCH=='1'">$(WX_RELEASE_NODOT)</if>
<if cond="WX_STABLE_BRANCH=='0'">$(WX_VERSION_NODOT)</if>
</set>
</makefile>

View File

@@ -0,0 +1,154 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<option name="wxUSE_LIBWEBP"/>
<set var="LIB_WEBP">
<if cond="wxUSE_LIBWEBP=='builtin' and USE_GUI=='1'">
wxwebp$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="wxUSE_LIBWEBP">builtin</set>
<set var="LIB_WEBP">
<if cond="wxUSE_LIBWEBP=='builtin' and USE_GUI=='1'">
wxwebp$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<set var="INC_WEBP">
<if cond="wxUSE_LIBWEBP=='builtin'">$(TOP_SRCDIR)3rdparty/libwebp/src</if>
</set>
<set var="INC_WEBP_BUILD">
<if cond="wxUSE_LIBWEBP=='builtin'">$(TOP_SRCDIR)3rdparty/libwebp</if>
</set>
<lib id="wxwebp" template_append="3rdparty_lib"
cond="wxUSE_LIBWEBP=='builtin' and USE_GUI=='1' and BUILDING_LIB=='1'">
<dirname>$(LIBDIRNAME)</dirname>
<include>$(INC_WEBP_BUILD)</include>
<sources>
3rdparty/libwebp/sharpyuv/sharpyuv.c
3rdparty/libwebp/sharpyuv/sharpyuv_cpu.c
3rdparty/libwebp/sharpyuv/sharpyuv_csp.c
3rdparty/libwebp/sharpyuv/sharpyuv_dsp.c
3rdparty/libwebp/sharpyuv/sharpyuv_gamma.c
3rdparty/libwebp/sharpyuv/sharpyuv_neon.c
3rdparty/libwebp/sharpyuv/sharpyuv_sse2.c
3rdparty/libwebp/src/dec/alpha_dec.c
3rdparty/libwebp/src/dec/buffer_dec.c
3rdparty/libwebp/src/dec/frame_dec.c
3rdparty/libwebp/src/dec/idec_dec.c
3rdparty/libwebp/src/dec/io_dec.c
3rdparty/libwebp/src/dec/quant_dec.c
3rdparty/libwebp/src/dec/tree_dec.c
3rdparty/libwebp/src/dec/vp8l_dec.c
3rdparty/libwebp/src/dec/vp8_dec.c
3rdparty/libwebp/src/dec/webp_dec.c
3rdparty/libwebp/src/demux/anim_decode.c
3rdparty/libwebp/src/demux/demux.c
3rdparty/libwebp/src/dsp/alpha_processing.c
3rdparty/libwebp/src/dsp/alpha_processing_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/alpha_processing_neon.c
3rdparty/libwebp/src/dsp/alpha_processing_sse2.c
3rdparty/libwebp/src/dsp/alpha_processing_sse41.c
3rdparty/libwebp/src/dsp/cost.c
3rdparty/libwebp/src/dsp/cost_mips32.c
3rdparty/libwebp/src/dsp/cost_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/cost_neon.c
3rdparty/libwebp/src/dsp/cost_sse2.c
3rdparty/libwebp/src/dsp/cpu.c
3rdparty/libwebp/src/dsp/dec.c
3rdparty/libwebp/src/dsp/dec_clip_tables.c
3rdparty/libwebp/src/dsp/dec_mips32.c
3rdparty/libwebp/src/dsp/dec_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/dec_msa.c
3rdparty/libwebp/src/dsp/dec_neon.c
3rdparty/libwebp/src/dsp/dec_sse2.c
3rdparty/libwebp/src/dsp/dec_sse41.c
3rdparty/libwebp/src/dsp/enc.c
3rdparty/libwebp/src/dsp/enc_mips32.c
3rdparty/libwebp/src/dsp/enc_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/enc_msa.c
3rdparty/libwebp/src/dsp/enc_neon.c
3rdparty/libwebp/src/dsp/enc_sse2.c
3rdparty/libwebp/src/dsp/enc_sse41.c
3rdparty/libwebp/src/dsp/filters.c
3rdparty/libwebp/src/dsp/filters_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/filters_msa.c
3rdparty/libwebp/src/dsp/filters_neon.c
3rdparty/libwebp/src/dsp/filters_sse2.c
3rdparty/libwebp/src/dsp/lossless.c
3rdparty/libwebp/src/dsp/lossless_enc.c
3rdparty/libwebp/src/dsp/lossless_enc_mips32.c
3rdparty/libwebp/src/dsp/lossless_enc_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/lossless_enc_msa.c
3rdparty/libwebp/src/dsp/lossless_enc_neon.c
3rdparty/libwebp/src/dsp/lossless_enc_sse2.c
3rdparty/libwebp/src/dsp/lossless_enc_sse41.c
3rdparty/libwebp/src/dsp/lossless_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/lossless_msa.c
3rdparty/libwebp/src/dsp/lossless_neon.c
3rdparty/libwebp/src/dsp/lossless_sse2.c
3rdparty/libwebp/src/dsp/lossless_sse41.c
3rdparty/libwebp/src/dsp/rescaler.c
3rdparty/libwebp/src/dsp/rescaler_mips32.c
3rdparty/libwebp/src/dsp/rescaler_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/rescaler_msa.c
3rdparty/libwebp/src/dsp/rescaler_neon.c
3rdparty/libwebp/src/dsp/rescaler_sse2.c
3rdparty/libwebp/src/dsp/ssim.c
3rdparty/libwebp/src/dsp/ssim_sse2.c
3rdparty/libwebp/src/dsp/upsampling.c
3rdparty/libwebp/src/dsp/upsampling_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/upsampling_msa.c
3rdparty/libwebp/src/dsp/upsampling_neon.c
3rdparty/libwebp/src/dsp/upsampling_sse2.c
3rdparty/libwebp/src/dsp/upsampling_sse41.c
3rdparty/libwebp/src/dsp/yuv.c
3rdparty/libwebp/src/dsp/yuv_mips32.c
3rdparty/libwebp/src/dsp/yuv_mips_dsp_r2.c
3rdparty/libwebp/src/dsp/yuv_neon.c
3rdparty/libwebp/src/dsp/yuv_sse2.c
3rdparty/libwebp/src/dsp/yuv_sse41.c
3rdparty/libwebp/src/enc/alpha_enc.c
3rdparty/libwebp/src/enc/analysis_enc.c
3rdparty/libwebp/src/enc/backward_references_cost_enc.c
3rdparty/libwebp/src/enc/backward_references_enc.c
3rdparty/libwebp/src/enc/config_enc.c
3rdparty/libwebp/src/enc/cost_enc.c
3rdparty/libwebp/src/enc/filter_enc.c
3rdparty/libwebp/src/enc/frame_enc.c
3rdparty/libwebp/src/enc/histogram_enc.c
3rdparty/libwebp/src/enc/iterator_enc.c
3rdparty/libwebp/src/enc/near_lossless_enc.c
3rdparty/libwebp/src/enc/picture_csp_enc.c
3rdparty/libwebp/src/enc/picture_enc.c
3rdparty/libwebp/src/enc/picture_psnr_enc.c
3rdparty/libwebp/src/enc/picture_rescale_enc.c
3rdparty/libwebp/src/enc/picture_tools_enc.c
3rdparty/libwebp/src/enc/predictor_enc.c
3rdparty/libwebp/src/enc/quant_enc.c
3rdparty/libwebp/src/enc/syntax_enc.c
3rdparty/libwebp/src/enc/token_enc.c
3rdparty/libwebp/src/enc/tree_enc.c
3rdparty/libwebp/src/enc/vp8l_enc.c
3rdparty/libwebp/src/enc/webp_enc.c
3rdparty/libwebp/src/utils/bit_reader_utils.c
3rdparty/libwebp/src/utils/bit_writer_utils.c
3rdparty/libwebp/src/utils/color_cache_utils.c
3rdparty/libwebp/src/utils/filters_utils.c
3rdparty/libwebp/src/utils/huffman_encode_utils.c
3rdparty/libwebp/src/utils/huffman_utils.c
3rdparty/libwebp/src/utils/palette.c
3rdparty/libwebp/src/utils/quant_levels_dec_utils.c
3rdparty/libwebp/src/utils/quant_levels_utils.c
3rdparty/libwebp/src/utils/random_utils.c
3rdparty/libwebp/src/utils/rescaler_utils.c
3rdparty/libwebp/src/utils/thread_utils.c
3rdparty/libwebp/src/utils/utils.c
</sources>
</lib>
</makefile>

View File

@@ -0,0 +1,240 @@
<?xml version="1.0" ?>
<!-- Master bakefile for wxWidgets -->
<makefile>
<!-- make sure setup.h is created as soon as possible: -->
<phony id="setup_h" cond="FORMAT!='autoconf'">
<dependency-of>all</dependency-of>
</phony>
<set var="BUILDING_LIB">1</set>
<!-- common rules, names etc. for wx: -->
<include file="common.bkl"/>
<!-- list of files sorted into categories: -->
<include file="files.bkl"/>
<!-- wxWidgets variant where everything is in one library: -->
<include file="monolithic.bkl"/>
<!-- ...and when there are multiple libraries: -->
<include file="multilib.bkl"/>
<if cond="IS_MSVC_PRJ">
<set var="MSVC6PRJ_MERGED_TARGETS">
<if cond="MONOLITHIC=='0'">$(MSVC6PRJ_MERGED_TARGETS_MULTILIB)</if>
<if cond="MONOLITHIC=='1'">$(MSVC6PRJ_MERGED_TARGETS_MONOLIB)</if>
</set>
</if>
<!-- OpenGL canvas is built as separate library in both cases: -->
<include file="opengl.bkl"/>
<!-- Dynamically loadable plugins: -->
<include file="plugins.bkl"/>
<!-- Samples target (not dependency of 'all'): -->
<subproject id="samples">
<installable>no</installable>
<dir cond="FORMAT=='autoconf'">samples</dir>
<dir cond="FORMAT!='autoconf'">../../samples</dir>
</subproject>
<if cond="FORMAT=='autoconf'">
<!-- WXRC compiler is built by default: -->
<!-- FIXME: this is dirty hack, better bakefile support for
conditional and optional subprojects is needed -->
<action id="wxrc" cond="USE_XML=='1'">
<dependency-of>all</dependency-of>
<!-- some of these are not built in all configurations, <depends>
takes care of ignoring the disabled ones: -->
<depends>monodll</depends>
<depends>monolib</depends>
<depends>basedll</depends>
<depends>baselib</depends>
<depends>xmldll</depends>
<depends>xmllib</depends>
<command>
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) all ; fi)
</command>
</action>
<action id="clean-wxrc" cond="USE_XML=='1'">
<dependency-of>clean</dependency-of>
<command>
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) clean ; fi)
</command>
</action>
<action id="install-wxrc" cond="USE_XML=='1'">
<dependency-of>install</dependency-of>
<depends>wxrc</depends>
<command>
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) install ; fi)
</command>
</action>
<!-- "make install": -->
<data-files>
<files>wxwin.m4</files>
<install-to>$(DATADIR)/aclocal</install-to>
</data-files>
<data-files>
<srcdir>$(SRCDIR)/build/bakefiles/wxpresets/presets</srcdir>
<files>wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py</files>
<install-to>$(DATADIR)/bakefile/presets</install-to>
</data-files>
<action id="install-wxconfig">
<dependency-of>install</dependency-of>
<command>
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/wx/config
$(INSTALL_SCRIPT) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(LIBDIR)/wx/config
# Warning! If the --relative symlink fails (e.g. *BSD), then we'd create an absolute symlink, which will be broken if DESTDIR is moved
(cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx-config &amp;&amp; $(LN_S) --relative $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || $(LN_S) $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
</command>
</action>
<modify-target target="install">
<command>
$(DYLIB_RPATH_INSTALL)
</command>
</modify-target>
<set var="RCDEFS_H">
<if cond="TOOLKIT=='MSW'">msw/rcdefs.h</if>
</set>
<data-files-tree>
<srcdir>
$(BUILDDIR)/lib/wx/include/$(TOOLCHAIN_FULLNAME)/wx
</srcdir>
<files>
setup.h $(RCDEFS_H)
</files>
<install-to>
$(LIBDIR)/wx/include/$(TOOLCHAIN_FULLNAME)/wx
</install-to>
</data-files-tree>
<!-- FIXME: make this use per-target <headers> once it supports
prefix removal -->
<data-files-tree>
<srcdir>$(SRCDIR)/include</srcdir>
<files>$(ALL_HEADERS)</files>
<install-to>
$(INCLUDEDIR)/wx-$(WX_RELEASE)$(WX_FLAVOUR)
</install-to>
</data-files-tree>
<!-- Locales: -->
<using module="gettext"/>
<gettext-catalogs id="locale">
<srcdir>$(SRCDIR)/locale</srcdir>
<catalog-name>wxstd-$(WX_RELEASE)</catalog-name>
<linguas>
af an ar ca ca@valencia co cs da de el es eu fa_IR fi fr
gl_ES hi hr hu id it ja ka ko_KR lt lv ms nb ne nl pl pt
pt_BR ro ru sk sl sq sr sv ta tr uk vi zh_CN zh_TW
</linguas>
<install-to>$(LOCALEDIR)</install-to>
</gettext-catalogs>
</if>
<!-- copy setup.h on DOS/Windows if the format supports it: -->
<if cond="FORMAT!='autoconf' and IS_MSVC_PRJ=='0'">
<mkdir id="libdir">
<dir>$(LIBDIRNAME)</dir>
</mkdir>
<mkdir id="libdir_setup">
<depends>libdir</depends>
<dir>$(SETUPHDIR)</dir>
</mkdir>
<mkdir id="libdir_setup_wx">
<depends>libdir_setup</depends>
<dependency-of>setup_h</dependency-of>
<dir>$(SETUPHDIR)/wx</dir>
</mkdir>
<set var="SETUP_H_SUBDIR">
<if cond="WXUNIV=='1'">univ</if>
<if cond="WXUNIV=='0'">$(TOOLKIT_LOWERCASE)</if>
</set>
<copy-file-to-file-if-not-exist id="setup.h">
<dependency-of>setup_h</dependency-of>
<src>$(SRCDIR)/include/wx/$(SETUP_H_SUBDIR)/setup.h</src>
<dst>$(SETUPHDIR)/wx/setup.h</dst>
</copy-file-to-file-if-not-exist>
</if>
<!-- create rcdefs.h on Windows: -->
<if cond="FORMAT in ['borland','mingw','msvc','watcom']">
<mkdir id="libdir_setup_wx_msw">
<depends>libdir_setup_wx</depends>
<dir>$(SETUPHDIR)/wx/msw</dir>
</mkdir>
<action id="rcdefs.h">
<!-- Can't seem to set id to a name with a dollar sign
so use __targetname as a temporary work around -->
<set var="__targetname">$(SETUPHDIR)\wx\msw\rcdefs.h</set>
<dependency-of>setup_h</dependency-of>
<depends>libdir_setup_wx_msw</depends>
<depends-on-file>$(SRCDIR)/include/wx/msw/genrcdefs.h</depends-on-file>
<command>
$(DOLLAR)(CPP) $(DOLLAR)(CPPFLAGS) "$(nativePaths(SRCDIR))\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
</command>
</action>
</if>
<if cond="FORMAT=='autoconf'">
<!-- Show this banner after installation: -->
<modify-target target="install">
<command>
@echo " "
@echo " ------------------------------------------------------"
@echo " "
@echo " The installation of wxWidgets is finished. On certain"
@echo " platforms (e.g. Linux) you'll now have to run ldconfig"
@echo " if you installed a shared library and also modify the"
@echo " LD_LIBRARY_PATH (or equivalent) environment variable."
@echo " "
@echo " wxWidgets comes with no guarantees and doesn't claim"
@echo " to be suitable for any purpose."
@echo " "
@echo " Read the wxWindows Licence on licencing conditions."
@echo " "
@echo " ------------------------------------------------------"
@echo " "
</command>
</modify-target>
<!-- add "make dist" target to autoconf: -->
<set var="VARS_DONT_ELIMINATE" append="1">
ALL_PORTS_BASE_HEADERS ALL_BASE_SOURCES WX_VERSION
</set>
<fragment format="autoconf" file="make_dist.mk"/>
</if>
<include file="build_cfg.bkl"/>
</makefile>

View File

@@ -0,0 +1,266 @@
-----------------------------------------------------------------------
Creating a Cross-Platform Build System Using Bakefile
The 10-minute, do-it-yourself wx project baking guide (with free sample recipes!)
Status: DRAFT
Author: Kevin Ollivier
Date: 2/13/04
Licence: wxWindows Licence
-----------------------------------------------------------------------
Supporting many different platforms can be a difficult challenge. The
challenge for wxWidgets is especially great, because it supports a variety of
different compilers and development environments, including MSVC, Borland C++,
MinGW, DevCPP, GNU make/automake, among others. Maintaining such a large
number of different project files and formats can quickly become overwhelming.
To simplify the maintenance of these formats, one of the wxWidgets developers,
Vaclav Slavik, created Bakefile, a XML-based makefile wrapper that generates
all the native project files for wxWidgets. So now, even though wxWidgets
supports all these formats, wxWidgets developers need only update one file -
the Bakefile, and it handles the rest. But Bakefile isn't specific to
wxWidgets in any way - you can use Bakefile for your own projects, too. This
brief tutorial will take a look at how to do that.
Note that this tutorial assumes that you are familiar with how to build
software using one of the supported Bakefile makefile systems, that you have
some basic familiarity with how makefiles work, and that you are capable of
setting environment variables on your platform. Also note that the terms Unix
and Unix-based refers to all operating systems that share a Unix heritage,
including FreeBSD, Linux, Mac OS X, and various other operating systems.
-- Getting Started --
First, you'll need to install Bakefile. You can always find the latest version
for download online at http://www.bakefile.org. A binary installer is provided
for Windows users, while users of Unix-based operating systems (OS) will need
to unpack the tarball and run configure && make && make install. (binary
packages for some Linux distributions are also available, check
http://www.bakefile.org/download.html for details).
-- Setting Up Your wx Build Environment --
Before you can build wxWidgets software using Bakefile or any other build
system, you need to make sure that wxWidgets is built and that wxWidgets
projects can find the wxWidgets includes and library files. wxWidgets build
instructions can be found by going to the docs subfolder, then looking for the
subfolder that corresponds to your platform (i.e. msw, gtk, mac) and reading
"install.txt" there. Once you've done that, here are some extra steps you
should take to make sure your Bakefile projects work with wxWidgets:
On Windows
----------
Once you've built wxWidgets, you should create an environment variable named
WXWIN and set it to the home folder of your wxWidgets source tree. (If you use
the command line to build, you can also set or override WXWIN at build time by
passing it in as an option to your makefile.)
On Unix
-------
In a standard install, you need not do anything so long as wx-config is on
your PATH. wx-config is all you need. (See the section of the book on using
wx-config for more information.)
-- A Sample wx Project Bakefile --
Now that everything is setup, it's time to take Bakefile for a test run. I
recommend that you use the wx sample Bakefile to get you started. It can be
found in the 'build/bakefiles/wxpresets/sample' directory in the wxWidgets
source tree. Here is the minimal.bkl Bakefile used in the sample:
minimal.bkl
-------------------------------------------------------------
<?xml version="1.0" ?>
<makefile>
<include file="presets/wx.bkl"/>
<exe id="minimal" template="wxgui">
<debug-info>on</debug-info>
<runtime-libs>dynamic</runtime-libs>
<sources>minimal.cpp</sources>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
</exe>
</makefile>
---------------------------------------------------------------
It's a complete sample ready to be baked, so go into the directory mentioned
above and run the following command:
On Windows:
bakefile -f msvc -I.. minimal.bkl
On Unix:
bakefile -f gnu -I.. minimal.bkl
It should generate a makefile (makefile.vc or GNUmakefile, respectively) which
you can use to build the software. Just build the software using the command
"nmake -f makefile.vc" or "make -f GNUmakefile" respectively. Now let's take a
look at some of the basic Bakefile concepts that you'll need to know to move
on from here.
-- Project Types --
As mentioned earlier, Bakefile builds makefiles for many different
development environments. The -f option accepts a list of formats that you
would like to build, separated by commas. Valid values are:
autoconf GNU autoconf Makefile.in files
borland Borland C/C++ makefiles
gnu GNU toolchain makefiles (Unix)
mingw MinGW makefiles (mingw32-make)
msvc MS Visual C++ nmake makefiles
TIP: autoconf Project Type
---------------------------
You may notice that in the sample folder, there is also a file called
configure.ac. That file is the input for autoconf, which creates the configure
scripts that you often see when you build software from source on Unix-based
platforms. People use configure scripts because they make your Unix makefiles
more portable by automatically detecting the right libraries and commands to
use on the user's machine and OS. This is necessary because there are many
Unix-based operating systems and they all are slightly different in various
small ways.
Bakefile does not generate a configure or configure.ac script, so if you want
to use configure scripts with your Unix-based software, you will need to learn
how to use autoconf. Unfortunately, this topic deserves a book all its own and
is beyond the scope of this tutorial, but a book on the subject can be found
online at: http://sources.redhat.com/autobook/. Note that you do not need to
use automake when you are using Bakefile, just autoconf, as Bakefile
essentially does the same thing as automake.
----------------------------
-- Targets --
Every project needs to have a target or targets, specifying what is to be
built. In Bakefile, you specify the target by creating a tag named with the
target type. The possible names for targets are:
exe create an executable file
dll create a shared library
lib create a static library
module create a library that is loaded at runtime (i.e. a plugin)
Note the sample above is an "exe" target. Once you create the target, all the
build settings, including flags and linker options, should be placed inside
the target tag, as they are in the sample above.
-- Adding Sources and Includes --
Obviously, you need to be able to add source and include files to your
project. You add sources using the "<sources>" tag (as shown above), and add
include directories using the "<include>" tag. You can add multiple <sources>
and <include> tags to add multiple source files, or you can also add multiple
sources and includes into one tag by separating them with a space, like so:
<sources>minimal.cpp minimal2.cpp minimal3.cpp</sources>
If your sources are in a subfolder of your Bakefile, you use the slash "/"
character to denote directories, even on Windows. (i.e. src/minimal.cpp) For
more options and flags, please consult the Bakefile documentation in the 'doc'
subfolder of Bakefile, or you can also find it on the Bakefile web site.
-- Build Options --
What if you want to offer a DEBUG and a RELEASE build?
You can do this in Bakefile by creating options. To create an option,
use the "<option>" tag. A typical option has three important parts: a name, a
default value, and a comma-separated list of values. For example, here is how
to create a DEBUG option which builds debug by default:
<option name="DEBUG">
<default-value>1</default-value>
<values>0 1</values>
</option>
You can then test the value of this option and conditionally set build
settings, flags, etc. For more information on both options and conditional
statements, please refer to the Bakefile documentation.
-- Bakefile Presets/Templates and Includes --
It is common that most projects will reuse certain settings, or options, in
their makefiles. (i.e. DEBUG or static/dynamic library options) Also, it is
common to have to use settings from another project; for example, any project
that uses wxWidgets will need to build using the same flags and options that
wxWidgets was built with. Bakefile makes these things easier by allowing users
to create Bakefile templates, where you can store common settings.
Bakefile ships with a couple of templates, found in the 'presets' subfolder of
your Bakefile installation. The "simple.bkl" template adds a DEBUG option to
makefiles so you can build in release or debug mode. To add this template to
your project, simply add the tag "<include file="presets/simple.bkl"/>" to the
top of your Bakefile. Then, when creating your target, add the
"template="simple"" attribute to it. Now, once you build the makefile, your
users can write commands like:
nmake -f makefile.vc DEBUG=1
or
make -f GNUmakefile DEBUG=1
In order to build the software in debug mode.
To simplify the building of wxWidgets-based projects, wxWidgets contains a
set of Bakefiles that automatically configure your build system to be
compatible with wxWidgets. As you'll notice in the sample above, the sample
project uses the "wxgui" template. Once you've included the template, your software
will now build as a GUI application with wxWidgets support.
There's also "wxconsole" template for building console-based wxWidgets applications
and "wx" template that doesn't specify application type (GUI or console) and can be
used e.g. for building libraries that use wxWidgets.
But since the wx presets don't exist in the Bakefile presets subfolder,
Bakefile needs to know where to find these presets. The "-I" command adds the
wxpresets folder to Bakefile's search path.
If you regularly include Bakefile presets in places other than the Bakefile
presets folder, then you can set the BAKEFILE_PATHS environment variable so
that Bakefile can find these Bakefiles and include them in your project. This
way you no longer need to specify the -I flag each time you build.
Lastly, it's important to note that the Win 32 wx project Bakefiles come with
some common build options that users can use when building the software. These
options are:
Option Values Description
------ ------ -------------
WX_MONOLITHIC 0(default),1 Set this to 1 if you built wx
as a monolithic library
WX_SHARED 0(default),1 Specify static or dynamic wx libs
WX_DEBUG 0,1(default) Use release or debug wx libs
*WX_VERSION 25,26(default) Specify version of wx libs
*Note: Any version of wx past 2.5 will be allowed here, so 25/26 is not a
complete list of values.
These options are not needed under Unix as wx-config can be used to specify
these options.
-- bakefile_gen - Automated Bakefile Scripts --
If you have a large project, you can imagine that the calls to Bakefile would
get more and more complex and unwieldy to manage. For this reason, a script
called bakefile_gen was created, which reads in a .bkgen file that provides
all the commands needed to build all the makefiles your project supports. A
discussion of how to use bakefile_gen is beyond the scope of this tutorial,
but it deserves mention because it can be invaluable to large projects.
Documentation on bakefile_gen can be found in the Bakefile documentation.
-- Conclusion --
This concludes our basic tutorial of the cross-platform Bakefile build system
management tool. From here, please be sure to take a good look at the Bakefile
documentation to see what else it is capable of. Please post questions to the
bakefile-devel@lists.sourceforge.net list, or if you have questions specific
to the wx template Bakefile, send an email to the wxWidgets users mailing list:
https://www.wxwidgets.org/support/mailing-lists/
Enjoy using Bakefile!

View File

@@ -0,0 +1,63 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([libsample],[1.2.5],[vslavik@fastmail.fm])
AC_CONFIG_SRCDIR([libsample.cpp])
dnl ---------------------------------------------------------------------------
dnl DEFINE CONFIGURE OPTIONS
dnl ---------------------------------------------------------------------------
dnl define all the wx-config related options
dnl (i.e. --with-wxdir, --with-wx-config, --with-wx-prefix, --with-wx-exec-prefix)
WX_CONFIG_OPTIONS
dnl define all the wxpresets related options
WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared])
dnl ---------------------------------------------------------------------------
dnl CONFIGURE CHECKS
dnl ---------------------------------------------------------------------------
dnl these checks are required by bakefile:
AC_CANONICAL_SYSTEM
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CXXCPP
dnl we want to always have DEBUG==WX_DEBUG
WX_DEBUG=$DEBUG
dnl the following macros will search for the best matching wxWidgets build
dnl (taking in count the values of the --enable-debug|unicode|shared and of
dnl the --with-toolkit|wxshared options) and then set appropriately all the
dnl WX_* options
WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS
WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[core,base],[$WXCONFIG_FLAGS])
WX_DETECT_STANDARD_OPTION_VALUES
dnl here all WX_* option values are available for your own processing...
dnl ---------------------------------------------------------------------------
dnl CONFIGURE END
dnl ---------------------------------------------------------------------------
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
dnl show a nice summary of the chosen build settings to the user
WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN
WX_STANDARD_OPTIONS_SUMMARY_MSG_END

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" ?>
<makefile>
<!-- a typical nice feature which wxpresets make available to wx-based programs
is to allow the user to build with different configurations those programs;
this is achieved in few fundamental steps:
1) set a different BUILDDIR for different build configurations
2) set different output dirs for the libraries built with a
different shared/static setting
3) set different output names for the libraries built with
different unicode/ansi and release/debug settings
-->
<include file="presets/wx.bkl"/>
<!-- the following line implements step #1: -->
<set-wxlike-builddir/>
<!-- through the use of the 'wx-lib' and 'wxlike' templates, we'll get
the ability to compile against any wxWidgets build using, for our
program, the same configuration of the selected wxWidgets build.
-->
<template id="my" template="wx-lib,wxlike">
<!-- wxlike-dirname implements step #2 (see initial comment) -->
<wxlike-dirname>lib</wxlike-dirname>
<sources>libsample.cpp</sources>
</template>
<lib id="static" template="my" cond="WX_SHARED=='0'">
<!-- wxlike-libname implements step #3 (see initial comment) -->
<wxlike-libname prefix='sample'>test</wxlike-libname>
</lib>
<dll id="shared" template="my" cond="WX_SHARED=='1'">
<!-- wxlike-dllname does step #3 (see initial comment) -->
<wxlike-dllname prefix='sample'>test</wxlike-dllname>
<define>WXMAKINGDLL_LIBSAMPLE</define>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
</dll>
</makefile>

View File

@@ -0,0 +1,36 @@
/////////////////////////////////////////////////////////////////////////////
// Name: libsample.cpp
// Purpose: The source of a dummy sample wx-based library
// Author: Francesco Montorsi
// Created: 26/11/06
// Copyright: (c) Francesco Montorsi
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// ============================================================================
// implementation
// ============================================================================
void MyUtilityFunction()
{
wxPrintf(wxT("Hello world!\n"));
fflush(stdout);
}

View File

@@ -0,0 +1,533 @@
<?xml version="1.0" ?>
<!--
Presets for building wxWidgets applications.
These presets provide the following "public" interface:
OPTIONS:
- WX_* : used to let the user of the generated makefile choose a wxWidgets
build among those available; you can use them in your project to
e.g. build a target only if WX_SHARED is 0 or if WX_PORT is "msw".
VARIABLES:
- WXLIBPOSTFIX: contains the [u][d] string which is typically useful when
defining names of directories/files which should coexist
with other builds using different wxWidgets configurations.
TEMPLATES:
- wx, wx-lib: templates to be used respectively for <dll>/<exe> and <lib>
targets; they add all the wxWidgets-related settings (e.g. the
include and library search paths, the necessary preprocessor
symbols, etc).
- wxgui: to be used when building GUI-mode applications.
- wxconsole: to be used when building console-only applications
(NOTE: it doesn't add the wxUSE_GUI=0 define since you don't
need it when compiling wxBase-only code).
- wxlike: this template should be combined with "wx" or "wx-lib" and will
make your project build with the same Unicode & shared
config as the wxWidgets build selected using the WX_* options.
TARGET TAGS:
- <wx-lib>: to define which wxWidgets libraries to link with;
please note that you should use them in the right order or
linking under Unix would result in errors, e.g.
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
is correct, but the reverse is not (if lib A depends on lib B, then
lib A must be listed before B). So <wx-lib>base</wx-lib>
(which must always be present) should be the last wx-lib tag.
- <wxlike-libname>,
<wxlike-dllname>: useful if you want to have a build logic similar to the
wxWidgets build logic which allows different builds to
coexist without conflicts. These tags helps you to name
libraries using the same wxWidgets rules and thus avoid
conflicts between libraries compiled in e.g. Unicode,
shared mode and those compiled in ANSI, shared mode &c.
- <wxlike-lib>: if your library/application needs to link with both
wxWidgets and some other wx-based library, which in turn
follows the wxWidgets naming conventions, then this tag is
what you need to reference the wx-based additional library.
- <wxlike-dirname>: sets the output directory for the current target to $(value)
when on Unix and to e.g. $(value)/vc_lib when on Windows,
i.e. acts like <dirname> just following wxWidgets naming rules.
Useful to allow multiple builds of the
- <wxlike-paths>: if your library/application needs to compile & link with both
wxWidgets and some other wx-based library, which in turn
follows the wxWidgets naming conventions, then this tag is
what you need to add to the compiler and linker flags the paths
of the "include" and "lib" folders of the wx-based additional library.
GLOBAL TAGS:
- <set-wxlike-builddir>: sets BUILDDIR using wxWidgets naming rules to help
to keep object files compiled with different
settings separate.
- <set-wxlike>: sets a variable with the name of a library named with the same
wxWidgets rules.
NOTE: as a reference here is a list of all wxWidgets libraries satisfying
the dependency constraints mentioned in <wx-lib> description:
<wx-lib>webview</wx-lib>
<wx-lib>richtext</wx-lib>
<wx-lib>aui</wx-lib>
<wx-lib>ribbon</wx-lib>
<wx-lib>propgrid</wx-lib>
<wx-lib>stc</wx-lib>
<wx-lib>qa</wx-lib>
<wx-lib>gl</wx-lib>
<wx-lib>xrc</wx-lib>
<wx-lib>html</wx-lib>
<wx-lib>media</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>xml</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
-->
<makefile>
<requires version="0.2.2"/>
<using module="wx_presets"/>
<!-- this variable identifies the version of the wx presets.
this is changed only when major changes to wxpresets take place.
-->
<set var="WX_PRESETS_VERSION">4</set>
<!-- list of known libraries used by wx-lib tag defined in wx_unix.bkl and wx_win32.bkl
VERY IMPORTANT: when updating this list also update the <wx-lib> and <wx-all-libs>
tag definitions.
-->
<set var="WX_LIB_LIST">
base core net xml xrc html adv media gl qa aui ribbon propgrid richtext stc webview
</set>
<!-- if you define this variable to 0 before including wx presets, the
"test_for_selected_wxbuild" target which is added by default in win32 and GNU
makefiles, won't be added.
This is useful when e.g. you want to have wxWidgets as an optional
dependency and thus you don't want to perform that check unconditionally.
-->
<set var="WX_TEST_FOR_SELECTED_WXBUILD" overwrite="0">
1
</set>
<!-- OPTIONS -->
<!-- -->
<!-- These are essentially the configurations you -->
<!-- want in bakefile. -->
<!-- -->
<!-- In MSVC these are the different build -->
<!-- configurations you can have (in the build menu), -->
<!-- and in autoconf is enabled with enable-xxx=xx. -->
<!-- For other compilers a separate configuration -->
<!-- file is created (such as config.gcc on gcc) -->
<!-- which has several options a user can modify. -->
<!-- -->
<!-- Note that the above only happens if an option -->
<!-- is not constant, i.e. if it cannot be determined -->
<!-- by bakefile itself. -->
<!-- Also note that for 'autoconf' format these options -->
<!-- are only useful when used together with wxpresets.m4 -->
<!-- macro file which contains macros for detecting the -->
<!-- option values for wx-based projects. See wxpresets.m4 -->
<!-- comments for more info. -->
<!-- 'gnu' format needs to redefine the following options later in wx_unix.bkl -->
<if cond="FORMAT=='gnu'">
<set var="WX_UNICODE"/>
<set var="WX_SHARED"/>
<set var="WX_PORT"/>
<set var="WX_VERSION"/>
</if>
<!-- This is a standard option that determines -->
<!-- whether the user wants to build this library as -->
<!-- a dll or as a static library. -->
<if cond="not isdefined('WX_SHARED')">
<set var="WX_SHARED_DEFAULT" overwrite="0">0</set>
<option name="WX_SHARED">
<values>0,1</values>
<values-description>Static,DLL</values-description>
<default-value>$(WX_SHARED_DEFAULT)</default-value>
<description>
Use DLL build of wx library?
</description>
</option>
</if>
<!-- Configuration for building the bakefile with -->
<!-- unicode strings or not (unicode or ansi). -->
<if cond="not isdefined('WX_UNICODE')">
<set var="WX_UNICODE_DEFAULT" overwrite="0">1</set>
<option name="WX_UNICODE">
<values>0,1</values>
<values-description>ANSI,Unicode</values-description>
<default-value>$(WX_UNICODE_DEFAULT)</default-value>
<description>
Use Unicode build of wxWidgets?
</description>
</option>
</if>
<if cond="not isdefined('WX_DEBUG')">
<set var="WX_DEBUG_DEFAULT" overwrite="0">1</set>
<option name="WX_DEBUG">
<values>0,1</values>
<values-description>Release,Debug</values-description>
<default-value>$(WX_DEBUG_DEFAULT)</default-value>
<description>
Use debug build of wxWidgets (linked with debug CRT)?
</description>
</option>
</if>
<if cond="not isdefined('WX_VERSION')">
<set var="WX_VERSION_DEFAULT" overwrite="0">31</set>
<option name="WX_VERSION">
<default-value>$(WX_VERSION_DEFAULT)</default-value>
<description>
Version of the wx library to build against.
</description>
</option>
</if>
<if cond="not isdefined('WX_MONOLITHIC')">
<set var="WX_MONOLITHIC_DEFAULT" overwrite="0">0</set>
<option name="WX_MONOLITHIC">
<values>0,1</values>
<values-description>Multilib,Monolithic</values-description>
<default-value>$(WX_MONOLITHIC_DEFAULT)</default-value>
<description>
Use monolithic build of wxWidgets?
</description>
</option>
</if>
<!-- The directory where wxWidgets is installed: -->
<if cond="not isdefined('WX_DIR')">
<set var="WX_DIR_DEFAULT" overwrite="0">$(DOLLAR)(WXWIN)</set>
<option name="WX_DIR" category="path" never_empty="1">
<default-value>$(WX_DIR_DEFAULT)</default-value>
<description>
The directory where wxWidgets library is installed
</description>
</option>
</if>
<!-- HELPER VARIABLES -->
<!-- -->
<!-- These are handy ways of dealing with the -->
<!-- extensions in the library names of the -->
<!-- wxWindows library. -->
<set var="WXLIBPOSTFIX">
<if cond="WX_DEBUG=='1' and WX_UNICODE=='1'">ud</if>
<if cond="WX_DEBUG=='1' and WX_UNICODE=='0'">d</if>
<if cond="WX_DEBUG=='0' and WX_UNICODE=='1'">u</if>
</set>
<if cond="FORMAT!='autoconf'">
<set var="COMPILER_PREFIX" make_var="1">$(COMPILER)</set>
</if>
<!-- REAL IMPLEMENTATION -->
<!-- -->
<set var="__wx_included_impl">0</set>
<if cond="FORMAT in ['autoconf','gnu']">
<include file="wx_unix.bkl"/>
<set var="__wx_included_impl">1</set>
</if>
<if cond="FORMAT!='autoconf' and PLATFORM_WIN32=='1'">
<include file="wx_win32.bkl"/>
<set var="__wx_included_impl">1</set>
</if>
<if cond="FORMAT=='xcode2'">
<!-- xCode2 is an IDE and thus reuses almost nothing from unix part of wxpresets;
better use the win32 part! -->
<include file="wx_win32.bkl"/>
<set var="__wx_included_impl">1</set>
</if>
<if cond="__wx_included_impl=='0'">
<error>This format is not (yet) supported by wx preset.</error>
</if>
<!-- HIGH-LEVEL TEMPLATE -->
<!-- -->
<!-- Combine 'wxlike' with 'wx' or 'wx-lib' templates to have your
project build in the same configuration used by the selected
wxWidgets build -->
<template id="wxlike">
<!-- WX_DEBUG-dependent -->
<set var="_OPT">
<if cond="WX_DEBUG=='1'">off</if>
<if cond="WX_DEBUG=='0'">speed</if>
</set>
<set var="_DEBUGINFO">
<if cond="WX_DEBUG=='1'">on</if>
<if cond="WX_DEBUG=='0'">off</if>
</set>
<if cond="FORMAT!='autoconf'">
<optimize>$(_OPT)</optimize>
<debug-info>$(_DEBUGINFO)</debug-info>
</if>
</template>
<!-- Template for building wx-based GUI applications -->
<template id="wxgui" template="wx">
<app-type>gui</app-type>
</template>
<!-- Template for building wx-based console applications -->
<template id="wxconsole" template="wx">
<app-type>console</app-type>
</template>
<!-- UTILITY TAGS -->
<!-- -->
<!-- private helper tag: does the same thing as for <set-wxlike> except that:
- the variable created is always named "__temp"
- can be used (only) inside targets as this is a non-global tag
-->
<define-tag name="__setlibname" rules="lib,dll,module,exe">
<set var="__temp">
<if cond="FORMAT!='autoconf' and FORMAT!='gnu'">
$(attributes['prefix'])_$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)
</if>
<if cond="FORMAT=='autoconf' or FORMAT=='gnu'">
$(attributes['prefix'])_$(WX_PORT)$(WXLIBPOSTFIX)_$(value)-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
</if>
</set>
</define-tag>
<!-- A simple tag which helps you to define a library name using the same rules used
by wxWidgets. Use the 'prefix' attribute to add your lib's prefix.
E.g.:
<wxlike-libname prefix='mylib'>module1</wxlike-libname>
<wxlike-libname prefix='mylib'>module2</wxlike-libname>
-->
<define-tag name="wxlike-libname" rules="lib">
<__setlibname prefix="$(attributes['prefix'])">$(value)</__setlibname>
<libname>$(__temp)</libname>
</define-tag>
<!-- exactly like <wxlike-libname> but this one sets the DLL name (and the DLL lib import name)
and thus must be used only inside a <dll> target...
-->
<define-tag name="wxlike-dllname" rules="dll,module">
<__setlibname prefix="$(attributes['prefix'])">$(value)</__setlibname>
<libname>$(__temp)</libname>
<dllname>$(__temp)</dllname>
</define-tag>
<!-- Links against a library which uses the same wxWidgets conventions.
-->
<define-tag name="wxlike-lib" rules="exe,lib,dll,module">
<__setlibname prefix="$(attributes['prefix'])">$(value)</__setlibname>
<sys-lib>$(__temp)</sys-lib>
</define-tag>
<!-- Sets as output folder for the current target a directory
called "$(value)/$(COMPILER_PREFIX)_lib|dll", just like wxWidgets does.
This makes it possible to keep separated the libraries/exes compiled with
different compilers and with a different value for WX_SHARED.
-->
<define-tag name="wxlike-dirname" rules="lib,dll,exe,module">
<if cond="FORMAT!='autoconf'">
<set var="_DIRNAME_SHARED_SUFFIX">
<if cond="WX_SHARED=='0'">lib</if>
<if cond="WX_SHARED=='1'">dll</if>
</set>
<set var="_DIRNAME">
$(value)/$(COMPILER_PREFIX)_$(_DIRNAME_SHARED_SUFFIX)
</set>
<dirname>$(_DIRNAME)</dirname>
<if cond="FORMAT_SUPPORTS_ACTIONS=='1'">
<set var="__mkdir_tgt">make_dir_$(id)</set>
<add-target target="$(__mkdir_tgt)" type="action"/>
<modify-target target="$(__mkdir_tgt)">
<command cond="TOOLSET=='unix'">
@mkdir -p $(_DIRNAME)
</command>
<command cond="TOOLSET in ['win32','dos']">
if not exist $(nativePaths(_DIRNAME)) mkdir $(nativePaths(_DIRNAME))
</command>
</modify-target>
<!-- the following code is mostly equivalent to a:
<dependency-of>$(id)</dependency-of>
put into the __mkdir_tgt target, except that it does _prepend_
the __mkdir_tgt dependency instead of appending it.
This is required because some compilers (e.g. MSVC) need to store in the
output folder some files (e.g. the PDB file) while compiling and thus
the library output folder must have been created before _any_ source file
is compiled, not just before the library is linked.
-->
<modify-target target="$(id)">
<set var="__deps" prepend="1">
$(substitute(__mkdir_tgt, lambda x: ref('__depname', x), 'DEP'))
</set>
</modify-target>
</if>
</if>
<if cond="FORMAT=='autoconf'">
<set var="_DIRNAME">$(value)</set>
<dirname>$(_DIRNAME)</dirname>
</if>
</define-tag>
<!-- Adds to the compiler & linker flags the path for the "include" and the
"lib" folders of a library following wxWidgets conventions which is
located in $(value).
-->
<define-tag name="wxlike-paths" rules="exe,lib,dll,module">
<if cond="FORMAT!='autoconf' and FORMAT!='gnu'">
<!-- WXLIBPATH is a path like "/lib/vc_lib"
NOTE: even if this template is going to be used for a "lib"
target (which does not uses lib-paths at all), we can still
use the <lib-path> target: it will just be discarded
-->
<lib-path>$(value)$(WXLIBPATH)</lib-path>
<!-- no special include paths for a lib following wxWidgets naming
conventions -->
<include>$(value)/include</include>
</if>
<!-- for autoconf format the user should use CPPFLAGS and LDFLAGS to
specify non-system paths since the wx-based library should have
been installed in standard paths
-->
</define-tag>
<!-- UTILITY GLOBAL TAGS -->
<!-- -->
<!-- Sets the BUILDDIR variable using the same rules used by wxWidgets itself.
This makes it possible to keep separated the object files compiled with
different configuration settings.
-->
<define-global-tag name="set-wxlike-builddir">
<!-- note that the builddir for autoconf should always be '.' -->
<if cond="FORMAT!='autoconf'">
<set var="_BUILDDIR_SHARED_SUFFIX">
<if cond="WX_SHARED=='0'"></if>
<if cond="WX_SHARED=='1'">_dll</if>
</set>
<set var="BUILDDIR">
$(COMPILER_PREFIX)$(WX_PORT)$(WXLIBPOSTFIX)$(_BUILDDIR_SHARED_SUFFIX)
</set>
</if>
</define-global-tag>
<!-- Sets a variable with the name of the 'var' attribute value using the
same rules used for wxWidgets library naming.
E.g.
<set-wxlike var='MYMODULE_LIBNAME' prefix='mylib'>
mymodule
</set-wxlike>
This tag also supports a 'cond' attribute making it very powerful
for conditional linking a wx-based library:
<option name="USE_MYMODULE">
<values>0,1</values>
</option>
<set-wxlike var='MYMODULE_DEP'
prefix='mylib'
cond="USE_MYMODULE=='1'">
mymodule
</set-wxlike>
...
<exe id="myexe">
<sys-lib>$(MYMODULE_DEP)</sys-lib>
</exe>
-->
<define-global-tag name="set-wxlike">
<if cond="FORMAT!='autoconf' and FORMAT!='gnu'">
<if cond="'cond' not in attributes">
<set var="$(attributes['var'])">
$(attributes['prefix'])_$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)
</set>
</if>
<if cond="'cond' in attributes">
<set var="$(attributes['var'])">
<if cond="$(attributes['cond'])">
$(attributes['prefix'])_$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)
</if>
</set>
</if>
</if>
<if cond="FORMAT=='autoconf' or FORMAT=='gnu'">
<if cond="'cond' not in attributes">
<set var="$(attributes['var'])">
$(attributes['prefix'])_$(WX_PORT)$(WXLIBPOSTFIX)_$(value)-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
</set>
</if>
<if cond="'cond' in attributes">
<set var="$(attributes['var'])">
<if cond="$(attributes['cond'])">
$(attributes['prefix'])_$(WX_PORT)$(WXLIBPOSTFIX)_$(value)-$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
</if>
</set>
</if>
</if>
</define-global-tag>
<include file="wx_xrc.bkl"/>
</makefile>

View File

@@ -0,0 +1,11 @@
# We use 'COMPILER_PREFIX' option in places where bakefile doesn't like it, so
# we must register a substitution function for it that provides additional
# knowledge about the option (in this case that it does not contain dir
# separators and so utils.nativePaths() doesn't have to do anything with it):
from utils import addSubstituteCallback
def __noopSubst(name, func, caller):
return '$(%s)' % name
addSubstituteCallback('COMPILER_PREFIX', __noopSubst)

View File

@@ -0,0 +1,251 @@
<?xml version="1.0" ?>
<!--
Presents for building wxWidgets applications using Autoconf or GNU toosets.
See wx.bkl for platform-independent notes.
Format-specific notes:
* autoconf:
Beware that you have to use WX_CONFIG_OPTIONS and
WX_CONFIG_CHECK in your configure.ac to get at least the
WX_CPPFLAGS, WX_CFLAGS, WX_CXXFLAGS, WX_LIBS option values defined.
To detect the WX_* option values typically you also want to use
the WX_STANDARD_OPTIONS, WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS,
WX_CONFIG_CHECK and finally WX_DETECT_STANDARD_OPTION_VALUES macros
(see wxwin.m4 for more info).
-->
<makefile>
<!-- ============================================================== -->
<!-- Autoconf -->
<!-- ============================================================== -->
<if cond="FORMAT=='autoconf'">
<option name="WX_CFLAGS"/>
<option name="WX_CXXFLAGS"/>
<option name="WX_CPPFLAGS"/>
<option name="WX_LIBS"/>
<option name="WX_RESCOMP"/>
<option name="WX_VERSION_MAJOR"/>
<option name="WX_VERSION_MINOR"/>
<option name="WX_PORT"/>
<!-- wxwin.m4 macros will detect all WX_* options defined above -->
<!-- VERY IMPORTANT: <wx-lib>base</wx-lib> must be the last wx-lib tag
in all your bakefiles !!
-->
<define-tag name="wx-lib" rules="exe,dll,module">
<if cond="value=='base'">
<!-- all wx-dependent libraries should have been already listed
thus we can now add WX_LIBS to the linker line -->
<ldlibs>$(WX_LIBS)</ldlibs>
</if>
<if cond="value not in WX_LIB_LIST.split()">
<error>Unknown wxWidgets library given in the wx-lib tag</error>
</if>
</define-tag>
</if>
<!-- ============================================================== -->
<!-- GNU makefiles for Unix -->
<!-- ============================================================== -->
<if cond="FORMAT=='gnu'">
<!-- remove those WX_* vars which were created just to avoid the definition
of the WX_* options in wx.bkl -->
<unset var="WX_SHARED"/>
<unset var="WX_UNICODE"/>
<unset var="WX_PORT"/>
<unset var="WX_VERSION"/>
<set var="WX_CONFIG_DEFAULT" overwrite="0">wx-config</set>
<option name="WX_CONFIG">
<default-value>$(WX_CONFIG_DEFAULT)</default-value>
<description>Location and arguments of wx-config script</description>
</option>
<set var="WX_PORT_DEFAULT" overwrite="0">
$(DOLLAR)(shell $(WX_CONFIG) --query-toolkit)
</set>
<option name="WX_PORT">
<values>gtk2,msw,x11,osx_cocoa,osx_carbon,dfb</values>
<default-value force="1">$(WX_PORT_DEFAULT)</default-value>
<description>
Port of the wx library to build against
</description>
</option>
<set var="WX_SHARED_DEFAULT" overwrite="0">
$(DOLLAR)(shell if test -z `$(WX_CONFIG) --query-linkage`; then echo 1; else echo 0; fi)
</set>
<option name="WX_SHARED">
<values>0,1</values>
<values-description>Static,DLL</values-description>
<default-value force="1">$(WX_SHARED_DEFAULT)</default-value>
<description>
Use DLL build of wx library to use?
</description>
</option>
<set var="WX_UNICODE_DEFAULT" overwrite="0">
$(DOLLAR)(shell $(WX_CONFIG) --query-chartype | sed 's/unicode/1/;s/ansi/0/')
</set>
<option name="WX_UNICODE">
<values>0,1</values>
<values-description>ANSI,Unicode</values-description>
<default-value force="1">$(WX_UNICODE_DEFAULT)</default-value>
<description>
Compile Unicode build of wxWidgets?
</description>
</option>
<set var="WX_VERSION_DEFAULT" overwrite="0">
$(DOLLAR)(shell $(WX_CONFIG) --query-version | sed -e 's/\([0-9]*\)\.\([0-9]*\)/\1\2/')
</set>
<option name="WX_VERSION">
<default-value>$(WX_VERSION_DEFAULT)</default-value>
<description>
Version of the wx library to build against.
</description>
</option>
<!-- Get MAJOR and MINOR version numbers -->
<set var="WX_VERSION_MAJOR" make_var="1">
$(DOLLAR)(shell echo $(DOLLAR)(WX_VERSION) | cut -c1,1)
</set>
<set var="WX_VERSION_MINOR" make_var="1">
$(DOLLAR)(shell echo $(DOLLAR)(WX_VERSION) | cut -c2,2)
</set>
<!--
Using the GNU format creates a configurable makefile just like
a win32 makefile: i.e. a makefile where you can select the wanted
wxWidgets build using the WX_* options.
The difference with win32 makefiles is that WX_PORT, WX_UNICODE and
WX_SHARED options have a smart default value which is created using
the installed wx-config or the wx-config given using WX_CONFIG option
-->
<set var="WX_CONFIG_UNICODE_FLAG">
<if cond="WX_UNICODE=='0'">--unicode=no</if>
<if cond="WX_UNICODE=='1'">--unicode=yes</if>
</set>
<set var="WX_CONFIG_SHARED_FLAG">
<if cond="WX_SHARED=='0'">--static=yes</if>
<if cond="WX_SHARED=='1'">--static=no</if>
</set>
<set var="WX_CONFIG_PORT_FLAG">
--toolkit=$(WX_PORT)
</set>
<set var="WX_CONFIG_VERSION_FLAG">
--version=$(WX_VERSION_MAJOR).$(WX_VERSION_MINOR)
</set>
<set var="WX_CONFIG_FLAGS" make_var="1">
$(WX_CONFIG_UNICODE_FLAG) $(WX_CONFIG_SHARED_FLAG)
$(WX_CONFIG_PORT_FLAG) $(WX_CONFIG_VERSION_FLAG)
</set>
<set var="DEFAULT_CXX">`$(DOLLAR)(WX_CONFIG) --cxx`</set>
<set var="WX_CFLAGS">`$(DOLLAR)(WX_CONFIG) --cflags $(WX_CONFIG_FLAGS)`</set>
<set var="WX_CXXFLAGS">`$(DOLLAR)(WX_CONFIG) --cxxflags $(WX_CONFIG_FLAGS)`</set>
<set var="WX_CPPFLAGS">`$(DOLLAR)(WX_CONFIG) --cppflags $(WX_CONFIG_FLAGS)`</set>
<set var="WX_RESCOMP">`$(DOLLAR)(WX_CONFIG) --rescomp $(WX_CONFIG_FLAGS)`</set>
<!--
VERY IMPORTANT: before starting to build all targets of the generated makefile,
we need to check if the selected wxWidgets build exists; we do
that simply creating the following target; if it fails the make
program will halt with the wx-config error message...
-->
<if cond="WX_TEST_FOR_SELECTED_WXBUILD=='1'">
<action id="test_for_selected_wxbuild">
<dependency-of>all</dependency-of>
<!-- Use @ to hide to the user that we're running wx-config... -->
<command>@$(DOLLAR)(WX_CONFIG) $(WX_CONFIG_FLAGS)</command>
</action>
</if>
<!-- we need these vars but the trick used in the default values above
prevents bakefile from detecting it: -->
<set var="FORMAT_OUTPUT_VARIABLES" append="1">WX_CONFIG WX_VERSION</set>
<!-- VERY IMPORTANT: <wx-lib>base</wx-lib> must be the last wx-lib tag
in all your bakefiles !!
-->
<define-tag name="wx-lib" rules="exe,dll,module">
<if cond="value=='base'">
<!-- all wx libraries should have been already specified, thus
$(__liblist) should contain the full list of required wxlibs... -->
<set var="__liblist" append="1">base</set>
<ldlibs>`$(WX_CONFIG) $(WX_CONFIG_FLAGS) --libs $(','.join(__liblist.split()))`</ldlibs>
</if>
<if cond="value!='base'">
<set var="__liblist" append="1">$(value)</set>
</if>
<if cond="value not in WX_LIB_LIST.split()">
<error>Unknown wxWidgets library given in the wx-lib tag</error>
</if>
</define-tag>
</if>
<!-- ============================================================== -->
<!-- Common code -->
<!-- ============================================================== -->
<if cond="FORMAT not in ['gnu','autoconf']">
<error>
Don't include presets/wx_unix.bkl directly, use presets/wx.bkl.
</error>
</if>
<!--
We need to re-define the WINDRES resource compiler name to the resource compiler
returned by 'wx-config - -rescomp' since this option returns both the name of the
resource compiler to use (windres) and the flags required for that compiler.
This line typically does something *only* when the Makefile.in generated
using this bakefile, is used on Windows with MSYS (when using Cygwin, resources
are not compiled at all).
Without this line, in fact, when compiling with MSYS on Windows, the - -include-dir
option which tells windres to look in wxWidgets\include folder would be missing and
then windres would fail to find the wxMSW resources.
NOTE: overwriting the WINDRES variable we add wxWidgets resource flags to
all targets which include this bakefile; this could be useless to those
targets which are not wx-based eventually present in that bakefile but
in any case it shouldn't do any harm.
-->
<set var="WINDRES">$(WX_RESCOMP)</set>
<template id="wx-lib">
<cxxflags>$(WX_CXXFLAGS)</cxxflags>
<cflags>$(WX_CFLAGS)</cflags>
</template>
<template id="wx" template="wx-lib">
<!--
Don't include the $(WX_LIBS) variable in linker options here since
it would make impossible for the user to obtain the right library
order when he needs to specify, *before* WX_LIBS, its own libraries
that depend on wxWidgets libraries; to avoid this, we include
$(WX_LIBS) as soon as we found the <wx-lib>base</wx-lib> tag which
the user should always put *after* all other wx-dependent libraries
-->
</template>
</makefile>

View File

@@ -0,0 +1,342 @@
<?xml version="1.0" ?>
<!-- Original source: https://wiki.wxwidgets.org/Bakefile -->
<!-- Modified by: Francesco Montorsi <frm@users.sourceforge.net> -->
<!-- Vaclav Slavik <vslavik@fastmail.fm> to better fit
into Bakefile's presets -->
<!-- Creation date: 6/9/2004 -->
<!-- Last revision: 22/1/2005 off-CVS -->
<makefile>
<!-- -->
<!-- OPTIONS -->
<!-- -->
<set var="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL">
<!-- 'NORMAL' here refers to the fact that the formats for which
FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL==1 only need
additional compiler and/or linker flags (see e.g. WXMACHINE_FLAG)
-->
<if cond="FORMAT in ['msvc']">1</if>
<if cond="FORMAT not in ['msvc']">0</if>
</set>
<set var="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS">
<!-- the formats for which FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS==1
need special handling: see the docs of the MSVS_PLATFORMS variable in Bakefile docs.
-->
<if cond="FORMAT in ['msvs2005prj','msvs2008prj']">1</if>
<if cond="FORMAT not in ['msvs2005prj','msvs2008prj']">0</if>
</set>
<set var="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES">
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1'">1</if>
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='1'">1</if>
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='0' and FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='0'">0</if>
</set>
<!-- This is a standard option that determines -->
<!-- the architecture for which the lib/exe/dll later -->
<!-- declared are meant. -->
<if cond="not isdefined('TARGET_CPU') and FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1'">
<set var="TARGET_CPU_DEFAULT" overwrite="0">X86</set>
<option name="TARGET_CPU">
<values>X86,AMD64,IA64</values>
<values-description>i386-compatible,AMD 64 bit,Itanium 64 bit</values-description>
<default-value>$(TARGET_CPU_DEFAULT)</default-value>
<description>
Architecture of the CPU for which to build the executables and libraries
</description>
</option>
</if>
<if cond="not isdefined('TARGET_CPU') and FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_VIA_MSVS_PLATFORMS=='1'">
<!-- defining TARGET_CPU also for the formats using the MSVS_PLATFORM variable allows to write
easier tests in user bakefiles; e.g.:
<set var="MY_ARCH_DEPENDENT_VARIABLE">
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='0'">value1</if>
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='X86'">value2</if>
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='AMD64'">value3</if>
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='IA64'">value4</if>
</set>
-->
<set var="TARGET_CPU">
<if cond="MSVS_PLATFORM=='win32'">X86</if>
<if cond="MSVS_PLATFORM=='win64'">AMD64</if>
<if cond="MSVS_PLATFORM=='ia64'">IA64</if>
<!-- MSVS_PLATFORM currently does not support ia64 but this line is still needed by bakefile
to correctly set the TARGET_CPU variable -->
</set>
</if>
<!-- HELPER VARIABLES -->
<!-- -->
<!-- The debug define we need with win32 compilers -->
<!-- (on Linux, the wx-config program is used). -->
<set var="WXDEBUG_DEFINE">
<if cond="WX_DEBUG=='1'">__WXDEBUG__</if>
</set>
<!-- These are handy ways of dealing with the -->
<!-- extensions in the library names of the -->
<!-- wxWindows library. -->
<set var="WX3RDPARTYLIBPOSTFIX">
<if cond="WX_DEBUG=='1'">d</if>
</set>
<set var="WXCPU">
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='AMD64'">_x64</if>
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES=='1' and TARGET_CPU=='IA64'">_ia64</if>
</set>
<set var="WXMACHINE_FLAG">
<!-- add the /MACHINE linker flag to formats with "normal" multiple-arch support when building in 64bit mode
(formats using the MSVS_PLATFORM variable don't need the /MACHINE linker flag!): -->
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='AMD64'">/MACHINE:AMD64</if>
<if cond="FORMAT_SUPPORTS_MULTIPLE_ARCHITECTURES_NORMAL=='1' and TARGET_CPU=='IA64'">/MACHINE:IA64</if>
</set>
<set var="WXLIBPATH">
<if cond="WX_SHARED=='0'">$(DIRSEP)lib$(DIRSEP)$(COMPILER_PREFIX)$(WXCPU)_lib</if>
<if cond="WX_SHARED=='1'">$(DIRSEP)lib$(DIRSEP)$(COMPILER_PREFIX)$(WXCPU)_dll</if>
</set>
<!-- under Unix this is an option (detected at configure-time);
under Windows this is not an user option! -->
<set var="WX_PORT">msw</set>
<set var="WXLIBINCLUDE">$(WXLIBPATH)$(DIRSEP)$(WX_PORT)$(WXLIBPOSTFIX)</set>
<!-- All the possible mixes for the wx library names -->
<set var="WXLIB_BASE_NAME">
<if cond="WX_MONOLITHIC=='0'">wxbase$(WX_VERSION)$(WXLIBPOSTFIX)</if>
<!--
the trick used to support monolithic builds is here: when the
<wx-lib>base</wx-lib> tag is found, and user selected
WX_MONOLITHIC=1, then the base library is translated to the
monolithic library
-->
<if cond="WX_MONOLITHIC=='1'">wx$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)</if>
</set>
<!-- Libraries whose name is prefixed with 'wxbase' -->
<define-global-tag name="define-wxbase-lib-name">
<set var="WXLIB_$(value.upper())_NAME">
<if cond="WX_MONOLITHIC=='0'">
wxbase$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)
</if>
</set>
</define-global-tag>
<define-wxbase-lib-name>net</define-wxbase-lib-name>
<define-wxbase-lib-name>xml</define-wxbase-lib-name>
<!-- Libraries whose name is prefixed with 'wx' only -->
<define-global-tag name="define-wxlib-name">
<set var="WXLIB_$(value.upper())_NAME">
<if cond="WX_MONOLITHIC=='0'">
wx$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)
</if>
</set>
</define-global-tag>
<define-wxlib-name>core</define-wxlib-name>
<define-wxlib-name>media</define-wxlib-name>
<define-wxlib-name>xrc</define-wxlib-name>
<define-wxlib-name>html</define-wxlib-name>
<define-wxlib-name>adv</define-wxlib-name>
<define-wxlib-name>qa</define-wxlib-name>
<define-wxlib-name>aui</define-wxlib-name>
<define-wxlib-name>ribbon</define-wxlib-name>
<define-wxlib-name>propgrid</define-wxlib-name>
<define-wxlib-name>stc</define-wxlib-name>
<define-wxlib-name>richtext</define-wxlib-name>
<define-wxlib-name>webview</define-wxlib-name>
<!-- NOTE: The GL lib is not part of the monolithic build; treat it as a contrib! -->
<!-- WX TEMPLATE -->
<!-- -->
<!-- -->
<!-- While not required, templates make your -->
<!-- bakefiles much more readable. Templates, in -->
<!-- essence, are abstract classes like c++. -->
<!-- -->
<!-- Your build targets "inherit" the template, -->
<!-- along with the info associated with the template -->
<!-- -->
<!-- wxWidgets LIBRARY/APP TEMPLATE -->
<!-- -->
<!-- The "base class" of all our build targets -->
<!-- This links with the appropriate native -->
<!-- libraries required by the platform, the libraries -->
<!-- we want for our stuff, and the wxWindows libs. -->
<!-- this tag is used to include wx libraries: -->
<define-tag name="wx-lib" rules="exe,dll,module">
<if cond="value=='base'"><sys-lib>$(WXLIB_BASE_NAME)</sys-lib></if>
<if cond="value=='core'"><sys-lib>$(WXLIB_CORE_NAME)</sys-lib></if>
<if cond="value=='net'"><sys-lib>$(WXLIB_NET_NAME)</sys-lib></if>
<if cond="value=='xml'"><sys-lib>$(WXLIB_XML_NAME)</sys-lib></if>
<if cond="value=='media'"><sys-lib>$(WXLIB_MEDIA_NAME)</sys-lib></if>
<if cond="value=='xrc'"><sys-lib>$(WXLIB_XRC_NAME)</sys-lib></if>
<if cond="value=='html'"><sys-lib>$(WXLIB_HTML_NAME)</sys-lib></if>
<if cond="value=='adv'"><sys-lib>$(WXLIB_ADV_NAME)</sys-lib></if>
<if cond="value=='qa'"><sys-lib>$(WXLIB_QA_NAME)</sys-lib></if>
<if cond="value=='aui'"><sys-lib>$(WXLIB_AUI_NAME)</sys-lib></if>
<if cond="value=='ribbon'"><sys-lib>$(WXLIB_RIBBON_NAME)</sys-lib></if>
<if cond="value=='propgrid'"><sys-lib>$(WXLIB_PROPGRID_NAME)</sys-lib></if>
<if cond="value=='richtext'"><sys-lib>$(WXLIB_RICHTEXT_NAME)</sys-lib></if>
<if cond="value=='webview'"><sys-lib>$(WXLIB_WEBVIEW_NAME)</sys-lib></if>
<!-- The GL lib isn't part of the monolithic build, treat it as a contrib: -->
<if cond="value=='gl'">
<sys-lib>wx$(WX_PORT)$(WX_VERSION)$(WXLIBPOSTFIX)_$(value)</sys-lib>
</if>
<if cond="value=='stc'">
<!-- wxSTC requires also the basic scintilla and lexilla libraries
which are built as a separate 3rd party libraries -->
<sys-lib>$(WXLIB_STC_NAME)</sys-lib>
<sys-lib>wxscintilla$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
<sys-lib>wxlexilla$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
</if>
<if cond="value not in WX_LIB_LIST.split()">
<error>Unknown wxWidgets library given in the wx-lib tag</error>
</if>
</define-tag>
<!-- just a placeholder to mark the place where <wx-lib> will be placed,
thanks to the order precedence declaration below it: -->
<define-tag name="__wx-libs-point" rules="exe,dll,module"/>
<tag-info name="wx-lib"
position="before:__wx-libs-point"/>
<tag-info name="__wx-syslibs"
position="after:__wx-libs-point"/>
<!-- template for static wx libraries: -->
<template id="wx-lib">
<!-- MISCELLANEOUS -->
<if cond="FORMAT=='mingw'">
<ldflags>-mthreads</ldflags>
</if>
<define>$(substituteFromDict(WX_SHARED,{'1':'WXUSINGDLL','0':''}))</define>
<define>$(WXDEBUG_DEFINE)</define>
<define>__WXMSW__</define>
<if cond="FORMAT!='xcode2'">
<include>$(WX_DIR)$(WXLIBINCLUDE)</include>
<include>$(WX_DIR)/include</include>
</if>
</template>
<!-- this ugly tag contains all sys-lib tags used by "wx" template,
in order to make sure they are not reorder when wx-lib is moved
after __wx-libs-point: -->
<define-tag name="__wx-syslibs" rules="exe,dll,module">
<!-- wx 3rd party libs, always use them: -->
<sys-lib>wxtiff$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
<sys-lib>wxjpeg$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
<sys-lib>wxpng$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
<sys-lib>wxwebp$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
<sys-lib>wxzlib$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
<!-- For regex we won't use the WX3RDPARTYLIBPOSTIX postfix:
unliked tiff, jpeg, png, webp, zlib, expat, when building
in Unicode mode, the "u" suffix is appended to regex -->
<sys-lib>wxregex$(WXLIBPOSTFIX)</sys-lib>
<sys-lib>wxexpat$(WX3RDPARTYLIBPOSTFIX)</sys-lib>
<!-- link-in system libs that wx depends on: -->
<!-- If on borland, we don't need to do much -->
<if cond="FORMAT=='borland'">
<sys-lib>ole2w32</sys-lib>
</if>
<!-- Non-borland, on the other hand... -->
<if cond="FORMAT!='borland'">
<sys-lib>kernel32</sys-lib>
<sys-lib>user32</sys-lib>
<sys-lib>gdi32</sys-lib>
<sys-lib>gdiplus</sys-lib>
<sys-lib>msimg32</sys-lib>
<sys-lib>comdlg32</sys-lib>
<sys-lib>winspool</sys-lib>
<sys-lib>winmm</sys-lib>
<sys-lib>shell32</sys-lib>
<sys-lib>comctl32</sys-lib>
<sys-lib>ole32</sys-lib>
<sys-lib>oleaut32</sys-lib>
<sys-lib>uuid</sys-lib>
<sys-lib>rpcrt4</sys-lib>
<sys-lib>advapi32</sys-lib>
<sys-lib>ws2_32</sys-lib>
</if>
<!-- Libs common to both borland and MSVC -->
<if cond="FORMAT=='msvc' or FORMAT=='borland'">
<sys-lib>oleacc</sys-lib>
</if>
</define-tag>
<!-- template for wx executables/dlls: -->
<template id="wx" template="wx-lib">
<if cond="FORMAT!='xcode2'">
<lib-path>$(WX_DIR)$(WXLIBPATH)</lib-path>
</if>
<ldflags>$(WXMACHINE_FLAG)</ldflags>
<!-- wx libs must come before 3rd party and sys libs, this is
the place where the hack explained above is carried on: -->
<__wx-libs-point/>
<__wx-syslibs/>
</template>
<if cond="FORMAT_SUPPORTS_ACTIONS=='1' and WX_TEST_FOR_SELECTED_WXBUILD=='1'">
<!--
VERY IMPORTANT: before starting to build all targets of the generated makefile,
we need to check if the selected wxWidgets build exists; we do
that simply creating the following target; if it fails the make
program will halt printing the following nice error message...
(much better than the 'could not find wx/*.h file')
-->
<action id="test_for_selected_wxbuild">
<dependency-of>all</dependency-of>
<!-- the @ is to hide these actions from the user -->
<command>
@if not exist $(WX_DIR)$(WXLIBINCLUDE)$(DIRSEP)wx$(DIRSEP)setup.h \
echo ----------------------------------------------------------------------------
@if not exist $(WX_DIR)$(WXLIBINCLUDE)$(DIRSEP)wx$(DIRSEP)setup.h \
echo The selected wxWidgets build is not available!
@if not exist $(WX_DIR)$(WXLIBINCLUDE)$(DIRSEP)wx$(DIRSEP)setup.h \
echo Please use the options prefixed with WX_ to select another wxWidgets build.
@if not exist $(WX_DIR)$(WXLIBINCLUDE)$(DIRSEP)wx$(DIRSEP)setup.h \
echo ----------------------------------------------------------------------------
@if not exist $(WX_DIR)$(WXLIBINCLUDE)$(DIRSEP)wx$(DIRSEP)setup.h \
exit 1
</command>
</action>
</if>
</makefile>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" ?>
<!--
Bakefile XRC support; included by wx.bkl, do not include directly.
Usage:
<exe id="myapp" template="wxgui,simple">
...
<sources>...</sources>
...
<xrc-file>myapp.xrc</xrc-file>
<xrc-file>file2.xrc</xrc-file>
</exe>
Then in application code, you have to call initialization for every XRC
file:
InitXMLResource_myapp();
InitXMLResource_file2();
-->
<makefile>
<!-- XRC section -->
<option name="WXRC" category="path">
<description>Path to find the wxrc executable.</description>
<default-value>wxrc</default-value>
</option>
<define-tag name="xrc-file" rules="exe,dll,lib">
<set var="_xrc_file">$(value)</set>
<set var="_xrc_cpp">$(value.replace('.xrc', '_xrc.cpp'))</set>
<set var="_xrc_base">$(value[value.rfind('/')+1:value.rfind('.')])</set>
<set var="_wxrc_options">-c -n InitXMLResource_$(_xrc_base)</set>
<sources>$(_xrc_cpp)</sources>
<if cond="FORMAT not in ['msvs2003prj','msvs2005prj']">
<clean-files>$(_xrc_cpp)</clean-files>
<add-target target="$(_xrc_cpp)" type="action"/>
<modify-target target="$(_xrc_cpp)">
<set var="_xrc">$(_xrc_file)</set>
<depends-on-file>$(SRCDIR)/$(_xrc)</depends-on-file>
<command>
$(WXRC) $(_wxrc_options) -o $(_xrc_cpp) $(_xrc)
</command>
</modify-target>
</if>
<if cond="FORMAT in ['msvs2003prj','msvs2005prj']">
<sources>$(_xrc_file)</sources>
<!--
A hack to add XRC compilation step to MSVC projects.
NB: it's important to use backslashes and not slashes here.
-->
<set var="_custom_build_files" append="1">$(_xrc_file.replace('/','\\'))</set>
<set var="_custom_build_$(_xrc_file.replace('/','_').replace('.','_'))">
Compiling XRC resources: $(_xrc_file)...
InputPath=$(_xrc_file)
"$(_xrc_cpp.replace('/','\\'))" : "$(DOLLAR)(INTDIR)"
$(TAB)$(WXRC) $(_wxrc_options) -o $(_xrc_cpp) $(_xrc_file)
</set>
</if>
</define-tag>
</makefile>

View File

@@ -0,0 +1,48 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([minimal],[1.2.5],[vslavik@fastmail.fm])
AC_CONFIG_SRCDIR([minimal.cpp])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_OPTIONS_WXCONFIG
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CXXCPP
AM_PATH_WXCONFIG(2.4.1, WXFOUND=1)
if test "$WXFOUND" != 1; then
AC_MSG_ERROR([
Please check that wx-config is in path, the directory
where wxWindows libraries are installed (returned by
'wx-config --libs' command) is in LD_LIBRARY_PATH or
equivalent variable and wxWindows is version 2.4.0 or above.
])
fi
AC_BAKEFILE([m4_include(autoconf_inc.m4)])
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" ?>
<makefile>
<include file="presets/wx.bkl"/>
<exe id="minimal" template="wxgui">
<!-- this sample builds always in debug mode; if you have
compiled wxWidgets in release mode, you'll get link errors! -->
<debug-info>on</debug-info>
<runtime-libs>dynamic</runtime-libs>
<sources>minimal.cpp</sources>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
</exe>
</makefile>

View File

@@ -0,0 +1,177 @@
/////////////////////////////////////////////////////////////////////////////
// Name: minimal.cpp
// Purpose: Minimal wxWidgets sample
// Author: Julian Smart
// Created: 04/01/98
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// ----------------------------------------------------------------------------
// resources
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
// Define a new application type, each program should derive a class from wxApp
class MyApp : public wxApp
{
public:
// override base class virtuals
// ----------------------------
// this one is called on application startup and is a good place for the app
// initialization (doing it here and not in the ctor allows to have an error
// return: if OnInit() returns false, the application terminates)
virtual bool OnInit();
};
// Define a new frame type: this is going to be our main frame
class MyFrame : public wxFrame
{
public:
// ctor(s)
MyFrame(const wxString& title);
// event handlers (these functions should _not_ be virtual)
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
private:
// any class wishing to process wxWindows events must use this macro
wxDECLARE_EVENT_TABLE();
};
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
// IDs for the controls and the menu commands
enum
{
// menu items
Minimal_Quit = wxID_EXIT,
// it is important for the id corresponding to the "About" command to have
// this standard value as otherwise it won't be handled properly under Mac
// (where it is special and put into the "Apple" menu)
Minimal_About = wxID_ABOUT
};
// ----------------------------------------------------------------------------
// event tables and other macros for wxWindows
// ----------------------------------------------------------------------------
// the event tables connect the wxWindows events with the functions (event
// handlers) which process them. It can be also done at run-time, but for the
// simple menu events like this the static method is much simpler.
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_Quit, MyFrame::OnQuit)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
wxEND_EVENT_TABLE()
// Create a new application object: this macro will allow wxWidgets to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also implements the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
// not wxApp)
wxIMPLEMENT_APP(MyApp);
// ============================================================================
// implementation
// ============================================================================
// ----------------------------------------------------------------------------
// the application class
// ----------------------------------------------------------------------------
// 'Main program' equivalent: the program execution "starts" here
bool MyApp::OnInit()
{
// create the main application window
MyFrame *frame = new MyFrame(wxT("Minimal wxWidgets App"));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
frame->Show(true);
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned false here, the
// application would exit immediately.
return true;
}
// ----------------------------------------------------------------------------
// main frame
// ----------------------------------------------------------------------------
// frame constructor
MyFrame::MyFrame(const wxString& title)
: wxFrame(nullptr, wxID_ANY, title)
{
// set the frame icon
#if wxUSE_MENUS
// create a menu bar
wxMenu *menuFile = new wxMenu;
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
helpMenu->Append(Minimal_About, wxT("&About\tF1"), wxT("Show about dialog"));
menuFile->Append(Minimal_Quit, wxT("E&xit\tAlt-X"), wxT("Quit this program"));
// now append the freshly created menu to the menu bar...
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(menuFile, wxT("&File"));
menuBar->Append(helpMenu, wxT("&Help"));
// ... and attach this menu bar to the frame
SetMenuBar(menuBar);
#endif // wxUSE_MENUS
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(wxT("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR
}
// event handlers
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
// true is to force the frame to close
Close(true);
}
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxString msg;
msg.Printf( wxT("This is the About dialog of the minimal sample.\n")
wxT("Welcome to %s"), wxVERSION_STRING);
wxMessageBox(msg, wxT("About Minimal"), wxOK | wxICON_INFORMATION, this);
}

View File

@@ -0,0 +1,165 @@
#
# Helper functions for wxWidgets bakefiles
#
#
import utils
# We use 'CFG' option in places where bakefile doesn't like it, so we must
# register a substitution function for it that provides additional knowledge
# about the option (in this case that it does not contain dir separators and
# so utils.nativePaths() doesn't have to do anything with it):
try:
# this fails in 0.1.4 and 0.1.5 has different subst.callbacks signature:
utils.checkBakefileVersion('0.1.5')
def __noopSubst(name, func, caller):
return '$(%s)' % name
except AttributeError:
def __noopSubst(func, name):
return '$(%s)' % name
utils.addSubstituteCallback('CFG', __noopSubst)
utils.addSubstituteCallback('LIBDIRNAME', __noopSubst)
utils.addSubstituteCallback('SETUPHDIR', __noopSubst)
utils.addSubstituteCallback('OBJS', __noopSubst)
def mk_wxid(id):
"""Creates wxWidgets library identifier from bakefile target ID that
follows this convention: DLLs end with 'dll', static libraries
end with 'lib'. If withPrefix=1, then _wxid is returned instead
of wxid."""
if id.endswith('dll') or id.endswith('lib'):
wxid = id[:-3]
else:
wxid = id
return wxid
# All libs that are part of the main library:
MAIN_LIBS = ['mono', 'base', 'core', 'adv', 'html', 'xml', 'net', 'webview',
'media', 'qa', 'xrc', 'aui', 'ribbon', 'propgrid', 'richtext', 'stc']
# List of library names/ids for categories with different names:
LIBS_NOGUI = ['xml', 'net']
LIBS_GUI = ['core', 'adv', 'html', 'gl', 'qa', 'xrc', 'media',
'aui', 'propgrid', 'richtext', 'stc', 'ribbon', 'webview']
# Additional ld flags
EXTRALDFLAGS = {
'webview' : '$(EXTRALDFLAGS_WEBVIEW)',
}
# Additional libraries that must be linked in:
EXTRALIBS = {
'gl' : '$(EXTRALIBS_OPENGL)',
'xml' : '$(EXTRALIBS_XML)',
'html' : '$(EXTRALIBS_HTML)',
'adv' : '$(PLUGIN_ADV_EXTRALIBS)',
'media' : '$(EXTRALIBS_MEDIA)',
'stc' : '$(EXTRALIBS_STC)',
'webview' : '$(EXTRALIBS_WEBVIEW)',
}
def mkLibName(wxid):
"""Returns string that can be used as library name, including name
suffixes, prefixes, version tags etc. This must be kept in sync
with variables defined in common.bkl!"""
if wxid == 'mono':
return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXVERSIONTAG)$(HOST_SUFFIX)'
if wxid == 'base':
return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)$(WXVERSIONTAG)$(HOST_SUFFIX)'
if wxid in LIBS_NOGUI:
return '$(WXNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXVERSIONTAG)$(HOST_SUFFIX)' % wxid
return '$(WXNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXVERSIONTAG)$(HOST_SUFFIX)' % wxid
def mkDllName(wxid):
"""Returns string that can be used as DLL name, including name
suffixes, prefixes, version tags etc. This must be kept in sync
with variables defined in common.bkl!"""
if wxid == 'mono':
return '$(WXDLLNAMEPREFIXGUI)$(WXNAMESUFFIX)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)'
if wxid == 'base':
return '$(WXDLLNAMEPREFIX)$(WXNAMESUFFIX)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)'
if wxid in LIBS_NOGUI:
return '$(WXDLLNAMEPREFIX)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' % wxid
return '$(WXDLLNAMEPREFIXGUI)$(WXNAMESUFFIX)_%s$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)' % wxid
def libToLink(wxlibname):
"""Returns string to pass to <sys-lib> when linking against 'wxlibname'.
For one of main libraries, libToLink('foo') returns '$(WXLIB_FOO)' which
must be defined in common.bkl as either nothing (in monolithic build) or
mkLibName('foo') (otherwise).
"""
if wxlibname in MAIN_LIBS:
return '$(WXLIB_%s)' % wxlibname.upper()
else:
return mkLibName(wxlibname)
def extraLdflags(wxlibname):
if wxlibname in EXTRALDFLAGS:
return EXTRALDFLAGS[wxlibname]
else:
return ''
def extraLdlibs(wxlibname):
if wxlibname in EXTRALIBS:
return EXTRALIBS[wxlibname]
else:
return ''
wxVersion = None
VERSION_FILE = '../../include/wx/version.h'
def getVersion():
"""Returns wxWidgets version as a tuple: (major,minor,release)."""
global wxVersion
if wxVersion == None:
f = open(VERSION_FILE, 'rt')
lines = f.readlines()
f.close()
major = minor = release = None
for l in lines:
if not l.startswith('#define'): continue
splitline = l.strip().split()
if splitline[0] != '#define': continue
if len(splitline) < 3: continue
name = splitline[1]
value = splitline[2]
if value == None: continue
if name == 'wxMAJOR_VERSION': major = int(value)
if name == 'wxMINOR_VERSION': minor = int(value)
if name == 'wxRELEASE_NUMBER': release = int(value)
if major != None and minor != None and release != None:
break
wxVersion = (major, minor, release)
return wxVersion
def getVersionMajor():
return getVersion()[0]
def getVersionMinor():
return getVersion()[1]
def getVersionRelease():
return getVersion()[2]
def headersOnly(files):
"""Filters 'files' so that only headers are left. Used with
<msvc-project-files> to add headers to VC++ projects but not files such
as arrimpl.cpp."""
def callback(cond, sources):
prf = suf = ''
if sources[0].isspace(): prf=' '
if sources[-1].isspace(): suf=' '
retval = []
for s in sources.split():
if s.endswith('.h'):
retval.append(s)
return '%s%s%s' % (prf, ' '.join(retval), suf)
return utils.substitute2(files, callback)
def makeDspDependency(lib):
"""Returns suitable entry for <depends-on-dsp> for main libs."""
return '%s:$(nativePaths(WXTOPDIR))build\\msw\\wx_%s.dsp' % (lib,lib)

View File

@@ -0,0 +1,57 @@
<?xml version="1.0" ?>
<makefile>
<if cond="FORMAT=='autoconf'">
<option name="wxUSE_ZLIB"/>
<set var="LIB_ZLIB">
<if cond="wxUSE_ZLIB=='builtin'">
wxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
</if>
</set>
</if>
<if cond="FORMAT!='autoconf'">
<set var="wxUSE_ZLIB">builtin</set>
<set var="LIB_ZLIB">
<if cond="wxUSE_ZLIB=='builtin'">
wxzlib$(WXDEBUGFLAG)$(HOST_SUFFIX)
</if>
</set>
</if>
<set var="INC_ZLIB">
<if cond="wxUSE_ZLIB=='builtin'">$(TOP_SRCDIR)src/zlib</if>
</set>
<lib id="wxzlib" template_append="3rdparty_lib"
cond="wxUSE_ZLIB=='builtin' and BUILDING_LIB=='1'">
<dirname>$(LIBDIRNAME)</dirname>
<cflags-borland>
-w-8004 -w-8008 -w-8012 -w-8057 -w-8066
</cflags-borland>
<if cond="IS_MSVC">
<!--
Define this to get rid of many warnings about using open(),
read() and other POSIX functions in zlib code. This is much
more convenient than having to modify it to avoid them.
-->
<define>_CRT_NONSTDC_NO_WARNINGS</define>
</if>
<sources>
src/zlib/adler32.c
src/zlib/compress.c
src/zlib/crc32.c
src/zlib/deflate.c
src/zlib/gzclose.c
src/zlib/gzlib.c
src/zlib/gzread.c
src/zlib/gzwrite.c
src/zlib/infback.c
src/zlib/inffast.c
src/zlib/inflate.c
src/zlib/inftrees.c
src/zlib/trees.c
src/zlib/uncompr.c
src/zlib/zutil.c
</sources>
</lib>
</makefile>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,164 @@
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
use autodie;
use File::Spec;
use File::Temp::Rename;
use Getopt::Long;
use IO::Handle;
use UUID::Tiny qw(:std);
my $force = 0;
my $verbose = 0;
GetOptions(
'force|f' => \$force,
'verbose|v' => \$verbose,
) and (@ARGV == 1 or @ARGV == 2) or die <<EOF
Usage: $0 [options] <new-project.vcxproj> [<new-project-source-file-name>]
Create a new project by copying the minimal sample .vcxproj file to the given
new file and replacing the minimal.cpp with the specified new source file name
(defaults to the project file name).
Options:
-f, --force Overwrite the file with the new name even if it exists.
-v, --verbose Show more details about what the program is doing.
EOF
;
# Show progress messages immediately.
STDOUT->autoflush(1) if $verbose;
# Returns just the name of the project, i.e. the part without any path nor
# extension and the full path to it, which will always have .vcxproj extension
# whether it is already present in input or not.
sub get_name_and_project
{
my ($file) = @_;
# If a .filters file was passed on input by mistake, accept it as if the
# project itself was given.
$file =~ s/\.filters$//;
my ($volume, $dir, $name) = File::Spec->splitpath($file);
if ($file !~ /\.vcxproj$/) {
$file .= '.vcxproj';
} else {
$name =~ s/\.vcxproj$//;
}
return ($name, $file)
}
my ($orig_name, $orig_project) = ('minimal', 'samples/minimal/minimal.vcxproj');
my ($new_name, $new_project) = get_name_and_project(shift @ARGV);
my $new_source_name = @ARGV ? shift @ARGV : $new_name;
if (!$force && -e $new_project) {
die qq{File "$new_project" already exists, not overwriting without -f.\n}
}
open my $fh_in, '<', $orig_project;
open my $fh_out, '>', $new_project;
say "Cloning $orig_project to $new_project" if $verbose;
my $new_uuid = uc(create_uuid_as_string(UUID_RANDOM));
# Don't bother with parsing XML, just mangle the text directly.
while (<$fh_in>) {
# Note: don't use chomp to preserve the same kind of EOLs.
if (m|
^
(?<leading_space>\s*)
<ProjectGuid>
\{
(?<orig_uuid>[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12})
\}
</ProjectGuid>
(?<trailing_space>\s*)
$
|x) {
say qq(Replacing old GUID "$+{orig_uuid}" with "$new_uuid".);
$_ = "$+{leading_space}<ProjectGuid>{$new_uuid}</ProjectGuid>$+{trailing_space}"
} else {
# Replace the project name for the tags that use it.
s@
^
(\s*)
\K
<(?<tag>ProjectName|IntDir|\w+File(?:Name)?)>
(?<before>.*)\Q$orig_name\E(?<after>.*)
</\g{tag}>
(?<trailing_space>\s*)
$
@<$+{tag}>$+{before}$new_name$+{after}</$+{tag}>$+{trailing_space}@ix;
# And replace the source file name.
s@<ClCompile Include="$orig_name.cpp" />@<ClCompile Include="$new_source_name.cpp" />@;
}
print $fh_out $_;
}
close $fh_out;
close $fh_in;
say "Copying $orig_project.filters to $new_project.filters" if $verbose;
open $fh_in, '<', "$orig_project.filters";
open $fh_out, '>', "$new_project.filters";
while (<$fh_in>) {
s@<ClCompile Include="$orig_name.cpp">@<ClCompile Include="$new_source_name.cpp">@;
print $fh_out $_;
}
close $fh_out;
close $fh_in;
say "Adding $new_project to the solution file" if $verbose;
my $solution_file = 'samples/samples_vc17.sln';
my $solution_new = File::Temp::Rename->new(FILE => $solution_file, CLOBBER => 1);
open $fh_in, '<', $solution_file;
open $fh_out, '>', $solution_new;
(my $new_project_relative = $new_project) =~ s@^samples/@@;
while (<$fh_in>) {
if (/^Global\s*/) {
print $fh_out <<EOF;
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "$new_name", "$new_project_relative", "{$new_uuid}"\r
\tProjectSection(ProjectDependencies) = postProject\r
\t\t{01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {01F4CE10-2CFB-41A8-B41F-E54337868A1D}\r
\t\t{3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {3FCC50C2-81E9-5DB2-B8D8-2129427568B1}\r
\t\t{56A4B526-BB81-5D01-AAA9-16D23BBB169D} = {56A4B526-BB81-5D01-AAA9-16D23BBB169D}\r
\t\t{6053CC38-CDEE-584C-8BC8-4B000D800FC7} = {6053CC38-CDEE-584C-8BC8-4B000D800FC7}\r
\t\t{6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75}\r
\t\t{75596CE6-5AE7-55C9-B890-C07B0A657A83} = {75596CE6-5AE7-55C9-B890-C07B0A657A83}\r
\t\t{8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0} = {8ACC122A-CA6A-5AA6-9C97-9CDD2E533DB0}\r
\t\t{8B867186-A0B5-5479-B824-E176EDD27C40} = {8B867186-A0B5-5479-B824-E176EDD27C40}\r
\t\t{A1A8355B-0988-528E-9CC2-B971D6266669} = {A1A8355B-0988-528E-9CC2-B971D6266669}\r
\tEndProjectSection\r
EndProject\r
EOF
}
print $fh_out $_;
}
close $fh_out;
close $fh_in;
exit 0

View File

@@ -0,0 +1,84 @@
This directory contains [CMake][1] files needed to build
native build files for wxWidgets.
For building wxWidgets or using wxWidgets in your CMake project please see
the [CMake overview](../../docs/doxygen/overviews/cmake.md) in the wxWidgets
documentation.
CMake files organization
========================
All CMake files are located in _$(wx)/build/cmake_ additionally there is a
_CMakeLists.txt_ in the root directory.
Files
-----
* $(wx)/CMakeLists.txt
* This should only contain commands and definitions which need to be
contained in the top level and includes _main.cmake_
* config.cmake
* Generates config files used to find wxWidgets by other build systems
* Creates wx-config
* files.cmake
* List of source files generated by _$(wx)build/upmake_ from _$(wx)build/files_
* This file should usually **never** be edited manually
* However if a new group of files is added it needs to be edited manually
* functions.cmake
* contains various wxWidgets specific functions and macros used throughout
the CMake files
* Every function should contain a short description of its parameters as
a comment before the function/macro
* install.cmake
* Handles definitions for the `install` and `uninstall` target
* init.cmake
* Initializes various variables used during the build process and for
generation of setup.h and configuration files
* main.cmake
* Includes all other cmake files
* options.cmake
* All user selectable build options should be defined in this file via
calls to `wx_option()`
* policies.cmake
* [CMake policies][2] for wxWidgets should be defined in this file
* setup.cmake
* Handles all tests required to create the _setup.h_ header based
platform and user settings
* setup.h.in
* Template for _setup.h_ updated automatically by _$(wx)/build/update-setup-h_
* source_groups.cmake
* Define source groups used in supported IDEs
* toolkit.cmake
* Define toolkit specific options and detection to this file
* uninstall.cmake.in
* Used by _install.cmake_ when creating the `uninstall` target
Sub directories
---------------
Each sub directory contains a _CMakeLists.txt_ and might contain various other
_.cmake_ files.
* demos
* Defines build targets for demos via `wx_add_demo()`
* lib
* Defines build targets for all libraries and bundle third party libraries
* Each library is contained in a separate directory and uses
`wx_add_library()` to define the library target
* Bundled third party library without upstream CMake support are defined in
a _.cmake_ file using `wx_add_builtin_library()` to define static library
targets
* modules
* Includes CMake modules used to find third party packages via [find_package()][3]
* Includes the [cotire module][4] used to for precompiled header generation
* samples
* Defines build targets for all samples via `wx_add_sample()`
* Definitions for trivial samples are included in _CMakeLists.txt_ more
complex samples might have a separate .cmake file
* tests
* Defines build targets for all tests
* utils
* Defines build targets for all utilities
[1]: https://cmake.org
[2]: https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html
[3]: https://cmake.org/cmake/help/latest/command/find_package.html
[4]: https://github.com/sakra/cotire/

View File

@@ -0,0 +1,12 @@
#############################################################################
# Name: build/cmake/benchmarks/CMakeLists.txt
# Purpose: CMake file for benchmarks
# Author: Maarten Bent
# Created: 2021-02-07
# Copyright: (c) 2021 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
add_subdirectory(bench)
add_subdirectory(bench_graphics)
add_subdirectory(bench_gui)

View File

@@ -0,0 +1,34 @@
#############################################################################
# Name: build/cmake/benchmarks/bench/CMakeLists.txt
# Purpose: CMake file for benchmarks
# Author: Maarten Bent
# Created: 2021-02-07
# Copyright: (c) 2021 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
set(BENCH_SRC
bench.cpp
bench.h
datetime.cpp
htmlparser/htmlpars.cpp
htmlparser/htmlpars.h
htmlparser/htmltag.cpp
htmlparser/htmltag.h
ipcclient.cpp
log.cpp
mbconv.cpp
printfbench.cpp
strings.cpp
tls.cpp
)
set(BENCH_DATA
htmltest.html
)
wx_add_benchmark(bench CONSOLE ${BENCH_SRC} DATA ${BENCH_DATA})
if(wxUSE_SOCKETS)
wx_exe_link_libraries(bench wxnet)
endif()

View File

@@ -0,0 +1,18 @@
#############################################################################
# Name: build/cmake/benchmarks/bench_graphics/CMakeLists.txt
# Purpose: CMake file for benchmarks
# Author: Maarten Bent
# Created: 2021-02-07
# Copyright: (c) 2021 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
set(BENCH_GRAPGICS_SRC
graphics.cpp
)
wx_add_benchmark(bench_graphics CONSOLE_GUI ${BENCH_GRAPGICS_SRC})
if(wxUSE_OPENGL)
wx_exe_link_libraries(bench_graphics wxgl)
endif()

View File

@@ -0,0 +1,24 @@
#############################################################################
# Name: build/cmake/benchmarks/bench_gui/CMakeLists.txt
# Purpose: CMake file for benchmarks
# Author: Maarten Bent
# Created: 2021-02-07
# Copyright: (c) 2021 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
set(BENCH_GUI_SRC
bench.cpp
bench.h
display.cpp
image.cpp
)
set(IMAGE_DATA
../../samples/image/horse.bmp:horse.bmp
../../samples/image/horse.jpg:horse.jpg
../../samples/image/horse.png:horse.png
../../samples/image/horse.tif:horse.tif
)
wx_add_benchmark(bench_gui CONSOLE_GUI ${BENCH_GUI_SRC} DATA ${IMAGE_DATA})

View File

@@ -0,0 +1,39 @@
WXVER_MAJOR=@wxMAJOR_VERSION@
WXVER_MINOR=@wxMINOR_VERSION@
WXVER_RELEASE=@wxRELEASE_NUMBER@
BUILD=@wxBUILD@
MONOLITHIC=@wxBUILD_MONOLITHIC_bf@
SHARED=@wxBUILD_SHARED_bf@
UNICODE=1
TOOLKIT=@wxBUILD_TOOLKIT_UPPER@
TOOLKIT_VERSION=@wxTOOLKIT_VERSION@
WXUNIV=@wxUNIV@
CFG=@wxCFG@
VENDOR=@wxBUILD_VENDOR@
OFFICIAL_BUILD=@wxOFFICIAL_BUILD@
DEBUG_FLAG=@wxDEBUG_FLAG@
DEBUG_INFO=@wxDEBUG_INFO@
RUNTIME_LIBS=@wxRUNTIME_LIBS@
USE_EXCEPTIONS=@wxUSE_EXCEPTIONS_bf@
USE_RTTI=@wxUSE_RTTI@
USE_THREADS=@wxUSE_THREADS_bf@
USE_AUI=@wxUSE_AUI_bf@
USE_GUI=@wxUSE_GUI_bf@
USE_HTML=@wxUSE_HTML_bf@
USE_MEDIA=@wxUSE_MEDIA_bf@
USE_OPENGL=@wxUSE_OPENGL_bf@
USE_QA=@wxUSE_DEBUGREPORT_bf@
USE_PROPGRID=@wxUSE_PROPGRID_bf@
USE_RIBBON=@wxUSE_RIBBON_bf@
USE_RICHTEXT=@wxUSE_RICHTEXT_bf@
USE_STC=@wxUSE_STC_bf@
USE_WEBVIEW=@wxUSE_WEBVIEW_bf@
USE_XRC=@wxUSE_XRC_bf@
COMPILER=@wxCOMPILER_PREFIX@
COMPILER_VERSION=@wxCOMPILER_VERSION@
CC=@wxCC@
CXX=@wxCXX@
CFLAGS=@wxCFLAGS@
CPPFLAGS=@wxCPPFLAGS@
CXXFLAGS=@wxCXXFLAGS@
LDFLAGS=@wxLDFLAGS@

View File

@@ -0,0 +1,70 @@
#############################################################################
# Name: build/cmake/build_cfg.cmake
# Purpose: Create and configure build.cfg
# Author: Maarten Bent
# Created: 2021-06-17
# Copyright: (c) 2021 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
macro(wx_buildfile_var var)
# convert TRUE/FALSE to 1/0, add _bf suffix for use in build.cfg
if(${var})
set(${var}_bf 1)
else()
set(${var}_bf 0)
endif()
endmacro()
wx_buildfile_var(wxBUILD_MONOLITHIC)
wx_buildfile_var(wxBUILD_SHARED)
wx_buildfile_var(wxUSE_EXCEPTIONS)
wx_buildfile_var(wxUSE_THREADS)
wx_buildfile_var(wxUSE_AUI)
wx_buildfile_var(wxUSE_GUI)
wx_buildfile_var(wxUSE_HTML)
wx_buildfile_var(wxUSE_MEDIACTRL)
wx_buildfile_var(wxUSE_OPENGL)
wx_buildfile_var(wxUSE_DEBUGREPORT)
wx_buildfile_var(wxUSE_PROPGRID)
wx_buildfile_var(wxUSE_RIBBON)
wx_buildfile_var(wxUSE_RICHTEXT)
wx_buildfile_var(wxUSE_STC)
wx_buildfile_var(wxUSE_WEBVIEW)
wx_buildfile_var(wxUSE_XRC)
if(wxUSE_NO_RTTI)
set(wxUSE_RTTI 0)
else()
set(wxUSE_RTTI 1)
endif()
if(wxBUILD_STRIPPED_RELEASE)
set(wxDEBUG_INFO 0)
else()
set(wxDEBUG_INFO 1)
endif()
if(wxBUILD_USE_STATIC_RUNTIME)
set(wxRUNTIME_LIBS "static")
else()
set(wxRUNTIME_LIBS "dynamic")
endif()
set(wxDEBUG_FLAG ${wxBUILD_DEBUG_LEVEL})
get_filename_component(wxCC ${CMAKE_C_COMPILER} NAME_WE)
get_filename_component(wxCXX ${CMAKE_CXX_COMPILER} NAME_WE)
set(wxCFLAGS ${CMAKE_C_FLAGS})
set(wxCPPFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
set(wxCXXFLAGS ${CMAKE_CXX_FLAGS})
set(wxLDFLAGS ${CMAKE_EXE_LINKER_FLAGS})
# These are currently not used by CMake
set(wxCFG "")
set(wxUNIV 0)
set(wxOFFICIAL_BUILD 0)
set(wxCOMPILER_VERSION "")
set(wxBUILD "release")
configure_file(build/cmake/build.cfg.in ${wxBUILD_FILE})
set(wxBUILD "debug")
configure_file(build/cmake/build.cfg.in ${wxBUILD_FILE_DEBUG})

View File

@@ -0,0 +1,209 @@
#############################################################################
# Name: build/cmake/config.cmake
# Purpose: Build wx-config script in build folder
# Author: Tobias Taschner
# Created: 2016-10-13
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
set(wxCONFIG_DIR ${wxOUTPUT_DIR}/wx/config)
file(MAKE_DIRECTORY ${wxCONFIG_DIR})
set(TOOLCHAIN_FULLNAME ${wxBUILD_FILE_ID})
macro(wx_configure_script input output)
# variables used in wx-config-inplace.in
set(abs_top_srcdir ${wxSOURCE_DIR})
set(abs_top_builddir ${wxBINARY_DIR})
configure_file(
${wxSOURCE_DIR}/${input}
${wxBINARY_DIR}${CMAKE_FILES_DIRECTORY}/${output}
ESCAPE_QUOTES @ONLY NEWLINE_STYLE UNIX)
file(COPY
${wxBINARY_DIR}${CMAKE_FILES_DIRECTORY}/${output}
DESTINATION ${wxCONFIG_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endmacro()
macro(wx_get_dependencies var lib)
set(${var})
if(TARGET wx${lib})
get_target_property(deps wx${lib} LINK_LIBRARIES)
foreach(dep IN LISTS deps)
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()
# imported target
if(CMAKE_VERSION VERSION_GREATER "3.18")
# CMake <= 3.18 only allows a few properties to be checked, not LOCATION, see
# https://cmake.org/cmake/help/v3.18/manual/cmake-buildsystem.7.html#interface-libraries
set(prop_suffix)
if (CMAKE_BUILD_TYPE)
string(TOUPPER "${CMAKE_BUILD_TYPE}" prop_suffix)
set(prop_suffix "_${prop_suffix}")
endif()
if(NOT dep_name AND prop_suffix)
get_target_property(dep_name ${dep} LOCATION${prop_suffix})
endif()
if(NOT dep_name)
get_target_property(dep_name ${dep} LOCATION)
endif()
endif()
if(NOT dep_name)
get_target_property(dep_name ${dep} IMPORTED_LIBNAME)
endif()
else()
# For the value like $<$<CONFIG:DEBUG>:LIB_PATH>
# Or $<$<NOT:$<CONFIG:DEBUG>>:LIB_PATH>
string(REGEX REPLACE "^.+>:(.+)>$" "\\1" dep_name ${dep})
if (NOT dep_name)
set(dep_name ${dep})
endif()
endif()
if(dep_name STREQUAL "libc.so")
# don't include this library
elseif(dep_name MATCHES "^-(.*)$") # -l, -framework, -weak_framework
wx_string_append(${var} "${dep_name} ")
elseif(dep_name MATCHES "^lib(.*)(.so|.dylib|.tbd|.a)$")
wx_string_append(${var} "-l${CMAKE_MATCH_1} ")
elseif(dep_name)
get_filename_component(abs_path ${dep_name} PATH)
if (abs_path) # value contains path
wx_string_append(${var} "${dep_name} ")
else()
wx_string_append(${var} "-l${dep_name} ")
endif()
endif()
endforeach()
string(STRIP ${${var}} ${var})
endif()
endmacro()
function(wx_write_config_inplace)
wx_configure_script(
"wx-config-inplace.in"
"inplace-${TOOLCHAIN_FULLNAME}"
)
if(WIN32_MSVC_NAMING)
set(COPY_CMD copy)
else()
set(COPY_CMD create_symlink)
endif()
execute_process(
COMMAND
"${CMAKE_COMMAND}" -E ${COPY_CMD}
"${wxBINARY_DIR}/lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}"
"${wxBINARY_DIR}/wx-config"
)
endfunction()
function(wx_write_config)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix "\${prefix}")
set(includedir "\${prefix}/include")
set(libdir "\${exec_prefix}/lib")
set(bindir "\${exec_prefix}/bin")
if(wxBUILD_MONOLITHIC)
set(MONOLITHIC 1)
else()
set(MONOLITHIC 0)
endif()
if(wxBUILD_SHARED)
set(SHARED 1)
else()
set(SHARED 0)
endif()
set(lib_unicode_suffix u)
if(CMAKE_CROSSCOMPILING)
set(cross_compiling yes)
set(host_alias ${CMAKE_SYSTEM_NAME})
else()
set(cross_compiling no)
endif()
set(BUILT_WX_LIBS)
set(STD_BASE_LIBS)
set(STD_GUI_LIBS)
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 (wx${lib} IN_LIST wxLIB_TARGETS)
wx_string_append(BUILT_WX_LIBS "${lib} ")
if (${lib} IN_LIST STD_BASE_LIBS_ALL)
wx_string_append(STD_BASE_LIBS "${lib} ")
endif()
if (${lib} IN_LIST STD_GUI_LIBS_ALL)
wx_string_append(STD_GUI_LIBS "${lib} ")
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)
set(WX_RELEASE ${wxMAJOR_VERSION}.${wxMINOR_VERSION})
set(WX_VERSION ${wxVERSION})
set(WX_SUBVERSION ${wxVERSION}.0)
wx_get_flavour(WX_FLAVOUR "-")
wx_get_flavour(lib_flavour "_")
set(TOOLKIT_DIR ${wxBUILD_TOOLKIT})
set(TOOLKIT_VERSION)
set(WIDGET_SET ${wxBUILD_WIDGETSET})
set(TOOLCHAIN_NAME "${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}-${WX_RELEASE}")
set(WX_LIBRARY_BASENAME_GUI "wx_${TOOLKIT_DIR}${TOOLKIT_VERSION}${WIDGET_SET}${lib_unicode_suffix}${lib_flavour}")
set(WX_LIBRARY_BASENAME_NOGUI "wx_base${lib_unicode_suffix}${lib_flavour}")
wx_get_dependencies(WXCONFIG_LIBS base)
wx_get_dependencies(EXTRALIBS_GUI core)
set(EXTRALIBS_SDL) # included in core libs when SDL is enabled
wx_get_dependencies(EXTRALIBS_HTML html)
wx_get_dependencies(EXTRALIBS_STC stc)
wx_get_dependencies(EXTRALIBS_WEBVIEW webview)
wx_get_dependencies(EXTRALIBS_XML xml)
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})
set(WXCONFIG_CFLAGS ${CMAKE_THREAD_LIBS_INIT})
set(WXCONFIG_LDFLAGS ${CMAKE_THREAD_LIBS_INIT})
set(WXCONFIG_CPPFLAGS)
if(wxBUILD_SHARED)
wx_string_append(WXCONFIG_CPPFLAGS " -DWXUSINGDLL")
endif()
foreach(flag IN LISTS wxTOOLKIT_DEFINITIONS)
wx_string_append(WXCONFIG_CPPFLAGS " -D${flag}")
endforeach()
if(wxBUILD_LARGEFILE_SUPPORT)
wx_string_append(WXCONFIG_CPPFLAGS " -D_FILE_OFFSET_BITS=64")
endif()
string(STRIP "${WXCONFIG_CPPFLAGS}" WXCONFIG_CPPFLAGS)
set(WXCONFIG_CXXFLAGS ${WXCONFIG_CFLAGS})
set(WXCONFIG_LDFLAGS_GUI)
set(WXCONFIG_RESFLAGS)
set(WXCONFIG_RPATH "-Wl,-rpath,\$libdir")
set(LDFLAGS_GL)
set(RESCOMP)
wx_configure_script(
"wx-config.in"
"${TOOLCHAIN_FULLNAME}"
)
endfunction()
wx_write_config_inplace()
wx_write_config()

View File

@@ -0,0 +1,67 @@
#############################################################################
# Name: build/cmake/demos/CMakeLists.txt
# Purpose: CMake script for demos
# Author: Tobias Taschner
# Created: 2016-10-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_add_demo(bombs
bombs.cpp
bombs.h
bombs1.cpp
game.cpp
game.h
)
wx_add_demo(forty
canvas.cpp
canvas.h
card.cpp
card.h
forty.cpp
forty.h
game.cpp
game.h
pile.cpp
pile.h
playerdg.cpp
playerdg.h
scoredg.cpp
scoredg.h
scorefil.cpp
scorefil.h
DATA
about.htm
LIBRARIES
wxhtml wxxml
)
wx_add_demo(fractal
fractal.cpp
)
wx_add_demo(life
dialogs.cpp
dialogs.h
game.cpp
game.h
life.cpp
life.h
reader.cpp
reader.h
DATA
breeder.lif
)
wx_add_demo(poem
wxpoem.cpp
wxpoem.h
DATA
wxpoem.txt wxpoem.dat wxpoem.idx
LIBRARIES
wxhtml
NAME
wxpoem
)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,793 @@
#############################################################################
# Name: build/cmake/init.cmake
# Purpose: Initialize variables based on user selection and system
# information before creating build targets
# Author: Tobias Taschner
# Created: 2016-09-24
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
function(checkCompilerDefaults)
include(CheckCXXSourceCompiles)
check_cxx_source_compiles("
#include <vector>
int main() {
std::vector<int> v{1,2,3};
for (auto& n : v)
--n;
return v[0];
}"
wxHAVE_CXX11)
check_cxx_source_compiles("
#if defined(_MSVC_LANG)
#if _MSVC_LANG < 201703L
#error C++17 support is required
#endif
#elif __cplusplus < 201703L
#error C++17 support is required
#endif
int main() {
[[maybe_unused]] auto unused = 17;
}"
wxHAVE_CXX17)
endfunction()
if(DEFINED CMAKE_CXX_STANDARD)
# User has explicitly set a CMAKE_CXX_STANDARD.
elseif(DEFINED wxBUILD_CXX_STANDARD AND NOT wxBUILD_CXX_STANDARD STREQUAL COMPILER_DEFAULT)
# Standard is set using wxBUILD_CXX_STANDARD.
set(CMAKE_CXX_STANDARD ${wxBUILD_CXX_STANDARD})
set(CMAKE_CXX_STANDARD_REQUIRED ON)
else()
# CMAKE_CXX_STANDARD not defined.
checkCompilerDefaults()
if(NOT wxHAVE_CXX11)
# If the standard is not set explicitly, and the default compiler settings
# do not support c++11, request it explicitly.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
endif()
if(MSVC)
if(CMAKE_VERSION VERSION_LESS "3.15")
# CMake 3.15 and later use MSVC_RUNTIME_LIBRARY property, see functions.cmake
# 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(c_flag_var CMAKE_C_FLAGS)
set(cxx_flag_var CMAKE_CXX_FLAGS)
if(cfg)
string(TOUPPER ${cfg} cfg_upper)
wx_string_append(c_flag_var "_${cfg_upper}")
wx_string_append(cxx_flag_var "_${cfg_upper}")
endif()
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()
endif()
if(wxBUILD_SHARED AND wxBUILD_USE_STATIC_RUNTIME AND wxUSE_STD_IOSTREAM)
# Objects like std::cout are defined as extern in <iostream> and implemented in libcpmt.
# This is statically linked into wxbase (stdstream.cpp).
# When building an application with both wxbase and libcpmt,
# the linker gives 'multiply defined symbols' error.
message(WARNING "wxUSE_STD_IOSTREAM combined with wxBUILD_USE_STATIC_RUNTIME will fail to link when using std::cout or similar functions")
endif()
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 AND NOT APPLE)
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(NOT wxBUILD_COMPATIBILITY STREQUAL "NONE")
set(WXWIN_COMPATIBILITY_3_2 ON)
if(wxBUILD_COMPATIBILITY VERSION_LESS 3.2)
set(WXWIN_COMPATIBILITY_3_0 ON)
endif()
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}-")
wx_string_append(wxBUILD_FILE_ID "unicode")
if(NOT wxBUILD_SHARED)
wx_string_append(wxBUILD_FILE_ID "-static")
endif()
wx_string_append(wxBUILD_FILE_ID "-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
wx_get_flavour(lib_flavour "-")
wx_string_append(wxBUILD_FILE_ID "${lib_flavour}")
set(wxPLATFORM_ARCH)
if(CMAKE_GENERATOR_PLATFORM)
if(NOT CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
string(TOLOWER ${CMAKE_GENERATOR_PLATFORM} wxPLATFORM_ARCH)
endif()
elseif(CMAKE_VS_PLATFORM_NAME)
if(NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Win32")
string(TOLOWER ${CMAKE_VS_PLATFORM_NAME} wxPLATFORM_ARCH)
endif()
else()
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(wxPLATFORM_ARCH "x64")
endif()
endif()
set(wxARCH_SUFFIX)
set(wxCOMPILER_PREFIX)
set(wxPLATFORM_LIB_DIR)
if(WIN32)
# TODO: include compiler version in wxCOMPILER_PREFIX for official builds
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(wxCOMPILER_PREFIX "vc")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(wxCOMPILER_PREFIX "gcc")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(wxCOMPILER_PREFIX "clang")
else()
message(FATAL_ERROR "Unknown WIN32 compiler type")
endif()
if(wxPLATFORM_ARCH)
set(wxARCH_SUFFIX "_${wxPLATFORM_ARCH}")
endif()
endif()
if(WIN32_MSVC_NAMING)
if(wxBUILD_SHARED)
set(lib_suffix "_dll")
else()
set(lib_suffix "_lib")
endif()
set(wxPLATFORM_LIB_DIR "${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}${lib_suffix}")
# Generator expression to not create different Debug and Release directories
set(GEN_EXPR_DIR "$<1:/>")
set(wxINSTALL_INCLUDE_DIR "include")
else()
set(GEN_EXPR_DIR "/")
wx_get_flavour(lib_flavour "-")
set(wxINSTALL_INCLUDE_DIR "include/wx-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${lib_flavour}")
endif()
if(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
if(NOT EXISTS "${wxBUILD_CUSTOM_SETUP_HEADER_PATH}/wx/setup.h")
message(FATAL_ERROR "wxBUILD_CUSTOM_SETUP_HEADER_PATH needs to contain a wx/setup.h file")
endif()
set(wxSETUP_HEADER_PATH ${wxBUILD_CUSTOM_SETUP_HEADER_PATH})
else()
# Set path where setup.h will be created
if(WIN32_MSVC_NAMING)
set(lib_unicode u)
set(wxSETUP_HEADER_PATH
${wxOUTPUT_DIR}/${wxPLATFORM_LIB_DIR}/${wxBUILD_TOOLKIT}${lib_unicode})
file(MAKE_DIRECTORY ${wxSETUP_HEADER_PATH}/wx)
file(MAKE_DIRECTORY ${wxSETUP_HEADER_PATH}d/wx)
set(wxSETUP_HEADER_FILE_DEBUG ${wxSETUP_HEADER_PATH}d/wx/setup.h)
else()
set(wxSETUP_HEADER_PATH
${wxOUTPUT_DIR}/wx/include/${wxBUILD_FILE_ID})
file(MAKE_DIRECTORY ${wxSETUP_HEADER_PATH}/wx)
endif()
endif()
set(wxSETUP_HEADER_FILE ${wxSETUP_HEADER_PATH}/wx/setup.h)
set(wxBUILD_FILE ${wxSETUP_HEADER_PATH}/build.cfg)
set(wxBUILD_FILE_DEBUG ${wxSETUP_HEADER_PATH}d/build.cfg)
if(DEFINED wxSETUP_HEADER_FILE_DEBUG)
# Append configuration specific suffix to setup header path
wx_string_append(wxSETUP_HEADER_PATH "$<$<CONFIG:Debug>:d>")
endif()
if(NOT wxBUILD_DEBUG_LEVEL STREQUAL "Default")
add_compile_options("-DwxDEBUG_LEVEL=${wxBUILD_DEBUG_LEVEL}")
endif()
# Constants for setup.h creation
if(NOT wxUSE_EXPAT)
set(wxUSE_XRC OFF)
endif()
set(wxUSE_XML ${wxUSE_XRC})
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 wxUSE_WEBVIEW_IE AND DEFINED wxUSE_ACTIVEX AND NOT wxUSE_ACTIVEX)
message(WARNING "wxWebViewIE requires wxActiveXContainer... disabled")
wx_option_force_value(wxUSE_WEBVIEW_IE 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)
if(ANDROID)
# Android has pthreads but FindThreads fails due to missing pthread_cancel
set(CMAKE_USE_PTHREADS_INIT 1)
set(CMAKE_THREAD_LIBS_INIT "")
set(Threads_FOUND TRUE)
else()
find_package(Threads REQUIRED)
endif()
endif()
if(wxUSE_LIBLZMA)
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 (wxUSE_WEBREQUEST)
if(wxUSE_WEBREQUEST_CURL)
find_package(CURL)
if(NOT CURL_FOUND)
message(WARNING "CURL not found, wxWebSessionBackendCURL won't be available")
wx_option_force_value(wxUSE_WEBREQUEST_CURL OFF)
endif()
endif()
include(CheckCSourceCompiles)
if(wxUSE_WEBREQUEST_WINHTTP)
check_c_source_compiles("#include <windows.h>
#include <winhttp.h>
int main(){return 0;}"
HAVE_WINHTTP_H)
if(NOT HAVE_WINHTTP_H)
message(WARNING "winhttp.h not found, wxWebSessionBackendWinHTTP won't be available")
wx_option_force_value(wxUSE_WEBREQUEST_WINHTTP OFF)
endif()
endif()
if (NOT(wxUSE_WEBREQUEST_WINHTTP OR wxUSE_WEBREQUEST_URLSESSION OR wxUSE_WEBREQUEST_CURL))
message(WARNING "wxUSE_WEBREQUEST requires at least one backend, it won't be available")
wx_option_force_value(wxUSE_WEBREQUEST OFF)
endif()
endif()
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)
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()
if(wxBUILD_LARGEFILE_SUPPORT)
set(HAVE_LARGEFILE_SUPPORT ON)
endif()
endif(UNIX)
if(wxUSE_GUI)
if(WXMSW AND wxUSE_METAFILE)
# this one should probably be made separately configurable
set(wxUSE_ENH_METAFILE ON)
endif()
# Direct2D check
if(WIN32 AND wxUSE_GRAPHICS_DIRECT2D)
check_include_file(d2d1.h HAVE_D2D1_H)
if (NOT HAVE_D2D1_H)
wx_option_force_value(wxUSE_GRAPHICS_DIRECT2D OFF)
endif()
endif()
if(MSVC) # match setup.h
wx_option_force_value(wxUSE_GRAPHICS_DIRECT2D ${wxUSE_GRAPHICS_CONTEXT})
endif()
# WXQT checks
if(WXQT)
wx_option_force_value(wxUSE_WEBVIEW OFF)
wx_option_force_value(wxUSE_METAFILE OFF)
if(WIN32)
wx_option_force_value(wxUSE_ACCESSIBILITY OFF)
wx_option_force_value(wxUSE_OWNER_DRAWN OFF)
endif()
endif()
# WXGTK checks, match include/wx/gtk/chkconf.h
if(WXGTK)
wx_option_force_value(wxUSE_METAFILE OFF)
if(WIN32)
wx_option_force_value(wxUSE_CAIRO ON)
wx_option_force_value(wxUSE_ACCESSIBILITY OFF)
wx_option_force_value(wxUSE_OWNER_DRAWN OFF)
endif()
if(NOT UNIX)
wx_option_force_value(wxUSE_WEBVIEW OFF)
wx_option_force_value(wxUSE_MEDIACTRL OFF)
wx_option_force_value(wxUSE_UIACTIONSIMULATOR OFF)
wx_option_force_value(wxUSE_OPENGL OFF)
set(wxUSE_GLCANVAS OFF)
endif()
endif()
# extra dependencies
if(wxUSE_OPENGL)
if(WXOSX_IPHONE)
set(OPENGL_FOUND TRUE)
set(OPENGL_INCLUDE_DIR "")
set(OPENGL_LIBRARIES "-framework OpenGLES" "-framework QuartzCore" "-framework GLKit")
else()
find_package(OpenGL)
if(OPENGL_FOUND)
foreach(gltarget OpenGL::GL OpenGL::OpenGL)
if(TARGET ${gltarget})
set(OPENGL_LIBRARIES ${gltarget} ${OPENGL_LIBRARIES})
endif()
endforeach()
endif()
if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL)
if(TARGET OpenGL::EGL)
set(OPENGL_LIBRARIES OpenGL::EGL ${OPENGL_LIBRARIES})
else()
# It's possible for OpenGL::EGL not to be set even when EGL
# is found, at least under Cygwin (see #23673), so use the
# library directly like this to avoid link problems.
set(OPENGL_LIBRARIES ${OPENGL_egl_LIBRARY} ${OPENGL_LIBRARIES})
endif()
set(OPENGL_INCLUDE_DIR ${OPENGL_INCLUDE_DIR} ${OPENGL_EGL_INCLUDE_DIRS})
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)
set(WEBKIT_LIBSOUP_VERSION 2.4)
if(WXGTK2)
find_package(WEBKIT 1.0)
elseif(WXGTK3)
find_package(WEBKIT2 4.1 QUIET)
if(WEBKIT2_FOUND)
set(WEBKIT_LIBSOUP_VERSION 3.0)
else()
find_package(WEBKIT2 4.0)
endif()
if(NOT WEBKIT2_FOUND)
find_package(WEBKIT 3.0)
endif()
endif()
find_package(LIBSOUP ${WEBKIT_LIBSOUP_VERSION})
endif()
set(wxUSE_WEBVIEW_WEBKIT OFF)
set(wxUSE_WEBVIEW_WEBKIT2 OFF)
if(WEBKIT_FOUND AND LIBSOUP_FOUND)
set(wxUSE_WEBVIEW_WEBKIT ON)
elseif(WEBKIT2_FOUND AND LIBSOUP_FOUND)
set(wxUSE_WEBVIEW_WEBKIT2 ON)
elseif(NOT wxUSE_WEBVIEW_CHROMIUM)
message(WARNING "webkit or chromium not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
elseif(APPLE)
if(NOT wxUSE_WEBVIEW_WEBKIT AND NOT wxUSE_WEBVIEW_CHROMIUM)
message(WARNING "webkit and chromium not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
else()
set(wxUSE_WEBVIEW_WEBKIT OFF)
endif()
if(WXMSW AND NOT wxUSE_WEBVIEW_IE AND NOT wxUSE_WEBVIEW_EDGE AND NOT wxUSE_WEBVIEW_CHROMIUM)
message(WARNING "WebviewIE and WebviewEdge and WebviewChromium not found or enabled, wxWebview won't be available")
wx_option_force_value(wxUSE_WEBVIEW OFF)
endif()
if(wxUSE_WEBVIEW_CHROMIUM AND WIN32 AND NOT MSVC)
message(FATAL_ERROR "WebviewChromium libcef_dll_wrapper can only be built with MSVC")
endif()
if(wxUSE_WEBVIEW_CHROMIUM)
# CEF requires C++17: we trust CMAKE_CXX_STANDARD if it is defined,
# or the previously tested wxHAVE_CXX17 if the compiler supports C++17 anyway.
if(NOT (CMAKE_CXX_STANDARD GREATER_EQUAL 17 OR wxHAVE_CXX17))
# We shouldn't disable this option as it's disabled by default and
# if it is on, it means that CEF is meant to be used, but we can't
# continue either as libcef_dll_wrapper will fail to build
# (actually it may still succeed with CEF v116 which provided
# its own stand-in for std::in_place used in CEF headers, but
# not with the later versions, so just fail instead of trying
# to detect CEF version here, as even v116 officially only
# supports C++17 anyhow).
if (DEFINED CMAKE_CXX_STANDARD)
set(cxx17_error_details "configured to use C++${CMAKE_CXX_STANDARD}")
else()
set(cxx17_error_details "the compiler doesn't support C++17 by default and CMAKE_CXX_STANDARD is not set")
endif()
message(FATAL_ERROR "WebviewChromium requires at least C++17 but ${cxx17_error_details}")
endif()
endif()
endif()
set(wxWebviewInfo "enable wxWebview")
if(wxUSE_WEBVIEW)
if(wxUSE_WEBVIEW_WEBKIT)
list(APPEND webviewBackends "WebKit")
endif()
if(wxUSE_WEBVIEW_WEBKIT2)
list(APPEND webviewBackends "WebKit2")
endif()
if(wxUSE_WEBVIEW_EDGE)
if(wxUSE_WEBVIEW_EDGE_STATIC)
list(APPEND webviewBackends "Edge (static)")
else()
list(APPEND webviewBackends "Edge")
endif()
endif()
if(wxUSE_WEBVIEW_IE)
list(APPEND webviewBackends "IE")
endif()
if(wxUSE_WEBVIEW_CHROMIUM)
list(APPEND webviewBackends "Chromium")
endif()
string(REPLACE ";" ", " webviewBackends "${webviewBackends}")
set(wxWebviewInfo "${wxWebviewInfo} with ${webviewBackends}")
endif()
set(wxTHIRD_PARTY_LIBRARIES ${wxTHIRD_PARTY_LIBRARIES} wxUSE_WEBVIEW ${wxWebviewInfo})
if(wxUSE_PRIVATE_FONTS AND WXGTK)
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 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)
endif()
set(wxUSE_GSTREAMER ${GSTREAMER_FOUND})
set(wxUSE_GSTREAMER_PLAYER OFF)
if(GSTREAMER_PLAYER_INCLUDE_DIRS)
set(wxUSE_GSTREAMER_PLAYER ON)
endif()
if(NOT GSTREAMER_FOUND)
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(wxUSE_SOUND AND wxUSE_LIBSDL AND UNIX AND NOT APPLE)
find_package(SDL2)
if(NOT SDL2_FOUND)
find_package(SDL)
endif()
if(NOT SDL2_FOUND AND NOT SDL_FOUND)
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 WXGTK 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)
else()
if(NOT LIBNOTIFY_VERSION VERSION_LESS 0.7)
set(wxUSE_LIBNOTIFY_0_7 ON)
endif()
list(APPEND wxTOOLKIT_EXTRA "libnotify")
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(WXGTK AND wxUSE_PRINTING_ARCHITECTURE AND wxUSE_GTKPRINT)
find_package(GTKPRINT ${wxTOOLKIT_VERSION})
if(GTKPRINT_FOUND)
list(APPEND wxTOOLKIT_INCLUDE_DIRS ${GTKPRINT_INCLUDE_DIRS})
list(APPEND wxTOOLKIT_EXTRA "GTK+ printing")
else()
message(STATUS "GTK printing support not found (GTK+ >= 2.10), library will use GNOME printing support or standard PostScript printing")
wx_option_force_value(wxUSE_GTKPRINT OFF)
endif()
else()
set(wxUSE_GTKPRINT OFF)
endif()
if(WXGTK 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})
list(APPEND wxTOOLKIT_EXTRA "gnomevfs")
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()
if(WXGTK3 AND wxUSE_SPELLCHECK)
find_package(GSPELL)
if(GSPELL_FOUND)
list(APPEND wxTOOLKIT_INCLUDE_DIRS ${GSPELL_INCLUDE_DIRS})
list(APPEND wxTOOLKIT_LIBRARIES ${GSPELL_LIBRARIES})
else()
message(STATUS "gspell-1 not found, spell checking in wxTextCtrl won't be available")
wx_option_force_value(wxUSE_SPELLCHECK OFF)
endif()
endif()
if(wxUSE_CAIRO AND NOT WXGTK)
find_package(Cairo)
if(NOT CAIRO_FOUND)
message(WARNING "Cairo not found, Cairo renderer won't be available")
wx_option_force_value(wxUSE_CAIRO OFF)
endif()
endif()
if(WXGTK AND NOT APPLE AND NOT WIN32)
find_package(XKBCommon)
if(XKBCOMMON_FOUND)
list(APPEND wxTOOLKIT_INCLUDE_DIRS ${XKBCOMMON_INCLUDE_DIRS})
list(APPEND wxTOOLKIT_LIBRARIES ${XKBCOMMON_LIBRARIES})
set(HAVE_XKBCOMMON ON)
else()
message(STATUS "libxkbcommon not found, key codes in key events may be incorrect")
endif()
endif()
endif(wxUSE_GUI)
# 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 STREQUAL "ON" AND CMAKE_VERSION VERSION_LESS "3.16") OR (wxBUILD_PRECOMP STREQUAL "COTIRE"))
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)
else()
set(USE_COTIRE ON)
endif()
endif()

View File

@@ -0,0 +1,138 @@
#############################################################################
# Name: build/cmake/install.cmake
# Purpose: Install target CMake file
# Author: Tobias Taschner
# Created: 2016-10-17
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(NOT wxBUILD_INSTALL)
return()
endif()
install(CODE "message(STATUS \"Installing: Headers...\")")
foreach(header ${wxINSTALL_HEADERS})
get_filename_component(path "${header}" PATH)
install(
FILES "${wxSOURCE_DIR}/include/${header}"
DESTINATION "${wxINSTALL_INCLUDE_DIR}/${path}"
)
endforeach()
if(MSVC)
install(
DIRECTORY "${wxSOURCE_DIR}/include/msvc"
DESTINATION "${wxINSTALL_INCLUDE_DIR}"
)
install(
FILES "${wxSOURCE_DIR}/wxwidgets.props"
DESTINATION "."
)
install(
FILES "${wxSOURCE_DIR}/build/msw/wx_setup.props"
DESTINATION "build/msw"
)
endif()
# setup header and wx-config
if(WIN32_MSVC_NAMING)
# create both Debug and Release directories, so CMake doesn't complain about
# non-existent path when only Release or Debug build has been installed
set(lib_unicode "u")
install(DIRECTORY
DESTINATION "lib/${wxPLATFORM_LIB_DIR}/${wxBUILD_TOOLKIT}${lib_unicode}")
install(DIRECTORY
DESTINATION "lib/${wxPLATFORM_LIB_DIR}/${wxBUILD_TOOLKIT}${lib_unicode}d")
install(
DIRECTORY "${wxSETUP_HEADER_PATH}"
DESTINATION "lib/${wxPLATFORM_LIB_DIR}")
else()
install(
DIRECTORY "${wxSETUP_HEADER_PATH}"
DESTINATION "lib/wx/include")
install(
FILES "${wxOUTPUT_DIR}/wx/config/${wxBUILD_FILE_ID}"
DESTINATION "lib/wx/config"
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
)
install(DIRECTORY DESTINATION "bin")
install(CODE "execute_process( \
COMMAND ${CMAKE_COMMAND} -E create_symlink \
\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/wx/config/${wxBUILD_FILE_ID}\" \
\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/wx-config\" \
)"
)
endif()
install(EXPORT wxWidgetsTargets NAMESPACE wx:: DESTINATION "lib/cmake/wxWidgets/${wxPLATFORM_LIB_DIR}")
# find_package config file
include(CMakePackageConfigHelpers)
set(versionConfig "${wxOUTPUT_DIR}/wxWidgetsConfigVersion.cmake")
set(projectConfig "${wxOUTPUT_DIR}/wxWidgetsConfig.cmake")
if(CMAKE_VERSION VERSION_LESS "3.11")
set(versionCompat SameMajorVersion)
else()
set(versionCompat SameMinorVersion)
endif()
if(WIN32_MSVC_NAMING AND NOT CMAKE_VERSION VERSION_LESS "3.14")
set(archCompat ARCH_INDEPENDENT)
endif()
write_basic_package_version_file(
"${versionConfig}"
COMPATIBILITY ${versionCompat}
${archCompat}
)
configure_package_config_file(
"${wxSOURCE_DIR}/build/cmake/wxWidgetsConfig.cmake.in"
"${projectConfig}"
INSTALL_DESTINATION "lib/cmake/wxWidgets"
)
install(
FILES "${projectConfig}" "${versionConfig}"
DESTINATION "lib/cmake/wxWidgets"
)
# uninstall target
if(MSVC_IDE)
set(UNINST_NAME UNINSTALL)
else()
set(UNINST_NAME uninstall)
endif()
if(NOT TARGET ${UNINST_NAME})
# these symlinks are not included in the install manifest
set(WX_EXTRA_UNINSTALL_FILES)
if(NOT WIN32_MSVC_NAMING)
if(IPHONE)
set(EXE_SUFFIX ".app")
else()
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
endif()
set(WX_EXTRA_UNINSTALL_FILES
"${CMAKE_INSTALL_PREFIX}/bin/wx-config"
"${CMAKE_INSTALL_PREFIX}/bin/wxrc${EXE_SUFFIX}"
)
endif()
configure_file(
"${wxSOURCE_DIR}/build/cmake/uninstall.cmake.in"
"${wxBINARY_DIR}/uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(${UNINST_NAME}
COMMAND ${CMAKE_COMMAND} -P ${wxBINARY_DIR}/uninstall.cmake)
get_property(PREDEF_FOLDER GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER)
if(NOT PREDEF_FOLDER)
set(PREDEF_FOLDER "CMakePredefinedTargets")
endif()
set_target_properties(${UNINST_NAME} PROPERTIES FOLDER "${PREDEF_FOLDER}")
endif()

View File

@@ -0,0 +1,118 @@
#############################################################################
# Name: build/cmake/lib/CMakeLists.txt
# Purpose: Main lib CMake file
# Author: Tobias Taschner
# Created: 2016-10-14
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(wxBUILD_MONOLITHIC)
# Initialize variables for monolithic build
set(wxMONO_SRC_FILES)
set(wxMONO_LIBS_PRIVATE)
set(wxMONO_LIBS_PUBLIC)
set(wxMONO_DIRS_PRIVATE)
set(wxMONO_DIRS_PUBLIC)
set(wxMONO_INCLUDE_DIRS)
set(wxMONO_DEFINITIONS)
set(wxMONO_NONCOMPILED_CPP_FILES)
set(wxMONO_DEPENDENCIES)
endif()
# Define third party libraries
set(LIBS_THIRDPARTY regex zlib expat)
if(wxUSE_GUI)
list(APPEND LIBS_THIRDPARTY jpeg png tiff nanosvg webp)
endif()
foreach(LIB IN LISTS LIBS_THIRDPARTY)
include(${LIB}.cmake)
endforeach()
# add_opt_lib()
# Add library which may have been disabled by wxUSE_...
macro(add_opt_lib name)
set(add_lib ON)
foreach(var_name ${ARGN})
if(NOT ${var_name})
set(add_lib OFF)
endif()
endforeach()
if(add_lib)
list(APPEND LIBS ${name})
endif()
endmacro()
# Define base libraries
set(LIBS base)
add_opt_lib(net wxUSE_SOCKETS)
# Define UI libraries
if(wxUSE_GUI)
list(APPEND LIBS core adv)
foreach(lib
aui
html
propgrid
ribbon
richtext
webview
stc
xrc
)
string(TOUPPER ${lib} _name_upper)
add_opt_lib(${lib} wxUSE_${_name_upper})
endforeach()
add_opt_lib(media wxUSE_MEDIACTRL)
add_opt_lib(gl wxUSE_OPENGL)
add_opt_lib(qa wxUSE_DEBUGREPORT)
add_opt_lib(webview_chromium wxUSE_WEBVIEW wxUSE_WEBVIEW_CHROMIUM)
endif() # wxUSE_GUI
# Include XML library last
# In the monolithic build, where all target properties (include dirs) from different targets are concatenated,
# wxml might include system expat, which might use Mono, which has it's own copy of png.
# Thus to ensure wx's core library includes the right png class, core must be processed first before xml
add_opt_lib(xml wxUSE_XML)
# Include cmake file for every library
foreach(LIB ${LIBS})
add_subdirectory(${LIB})
endforeach()
if(wxBUILD_MONOLITHIC)
# Create monolithic library target
wx_add_library(wxmono IS_MONO ${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} wx${lib})
endforeach()
target_link_libraries(wxmono ${vis} ${wxMONO_LIBS_${vis}})
endif()
if(wxMONO_DIRS_${vis})
target_link_directories(wxmono ${vis} ${wxMONO_DIRS_${vis}})
endif()
endforeach()
if(wxMONO_INCLUDE_DIRS)
target_include_directories(wxmono BEFORE PRIVATE ${wxMONO_INCLUDE_DIRS})
endif()
if(wxMONO_DEFINITIONS)
target_compile_definitions(wxmono PRIVATE ${wxMONO_DEFINITIONS})
endif()
foreach(file ${wxMONO_NONCOMPILED_CPP_FILES})
set_source_files_properties(${file} PROPERTIES HEADER_FILE_ONLY TRUE)
endforeach()
foreach(dep ${wxMONO_DEPENDENCIES})
add_dependencies(wxmono ${dep})
endforeach()
if(wxUSE_WEBVIEW)
wx_webview_copy_webview2_loader(wxmono)
endif()
endif()
# Propagate variable(s) to parent scope
set(wxLIB_TARGETS ${wxLIB_TARGETS} PARENT_SCOPE)
set(wxINSTALL_HEADERS ${wxINSTALL_HEADERS} PARENT_SCOPE)

View File

@@ -0,0 +1,10 @@
#############################################################################
# Name: build/cmake/lib/adv/CMakeLists.txt
# Purpose: CMake file for adv library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_add_library(wxadv "${wxSOURCE_DIR}/src/common/dummy.cpp")

View File

@@ -0,0 +1,18 @@
#############################################################################
# Name: build/cmake/lib/aui/CMakeLists.txt
# Purpose: CMake file for aui library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(AUI_FILES AUI_CMN)
if(WXMSW)
wx_append_sources(AUI_FILES AUI_MSW)
elseif(WXGTK2)
wx_append_sources(AUI_FILES AUI_GTK)
endif()
wx_add_library(wxaui ${AUI_FILES})

View File

@@ -0,0 +1,74 @@
#############################################################################
# Name: build/cmake/lib/base/CMakeLists.txt
# Purpose: CMake file for base library
# Author: Tobias Taschner
# Created: 2016-09-20
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(BASE_FILES BASE_CMN)
wx_append_sources(BASE_FILES BASE_AND_GUI_CMN)
if(WIN32)
wx_append_sources(BASE_FILES BASE_WIN32)
wx_append_sources(BASE_FILES BASE_AND_GUI_WIN32)
elseif(APPLE)
if(WXOSX_COCOA OR WXOSX_IPHONE)
wx_append_sources(BASE_FILES BASE_OSX_SHARED)
if(WXOSX_COCOA)
wx_append_sources(BASE_FILES BASE_AND_GUI_OSX_COCOA)
endif()
else()
wx_append_sources(BASE_FILES BASE_OSX_NOTWXMAC)
endif()
elseif(UNIX)
wx_append_sources(BASE_FILES BASE_UNIX)
endif()
wx_add_library(wxbase IS_BASE ${BASE_FILES})
if(wxUSE_ZLIB)
wx_lib_include_directories(wxbase ${ZLIB_INCLUDE_DIRS})
wx_lib_link_libraries(wxbase PRIVATE ${ZLIB_LIBRARIES})
endif()
if(wxUSE_REGEX)
wx_lib_include_directories(wxbase ${REGEX_INCLUDE_DIRS})
wx_lib_link_libraries(wxbase PRIVATE ${REGEX_LIBRARIES})
endif()
if(wxUSE_LIBLZMA)
wx_lib_include_directories(wxbase ${LIBLZMA_INCLUDE_DIRS})
wx_lib_link_libraries(wxbase PRIVATE ${LIBLZMA_LIBRARIES})
endif()
if(UNIX AND wxUSE_SECRETSTORE)
wx_lib_include_directories(wxbase ${LIBSECRET_INCLUDE_DIRS})
# Avoid linking with libsecret-1.so directly, we load this
# library dynamically in wxSecretStoreLibSecretImpl to avoid
# requiring it being installed on the target system.
list(REMOVE_ITEM LIBSECRET_LIBRARIES secret-1)
wx_lib_link_libraries(wxbase PRIVATE ${LIBSECRET_LIBRARIES})
endif()
if(wxUSE_LIBICONV)
wx_lib_include_directories(wxbase ${ICONV_INCLUDE_DIR})
wx_lib_link_libraries(wxbase PRIVATE ${ICONV_LIBRARIES})
endif()
if(APPLE)
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 IOKit"
"-framework QuartzCore"
)
endif()
elseif(UNIX)
wx_lib_link_libraries(wxbase PRIVATE ${CMAKE_DL_LIBS})
endif()

View File

@@ -0,0 +1,115 @@
#############################################################################
# Name: build/cmake/lib/core/CMakeLists.txt
# Purpose: CMake file for core library
# Author: Tobias Taschner
# Created: 2016-10-01
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(CORE_SRC GUI_CMN)
wx_append_sources(CORE_SRC BASE_AND_GUI_CMN)
if(WIN32)
wx_append_sources(CORE_SRC BASE_AND_GUI_WIN32)
elseif(UNIX)
wx_append_sources(CORE_SRC UNIX)
if(wxUSE_LIBSDL)
wx_append_sources(CORE_SRC UNIX_SOUND_SDL)
endif()
endif()
if(WXMSW)
wx_append_sources(CORE_SRC MSW_LOWLEVEL)
wx_append_sources(CORE_SRC MSW)
if(NOT wxUSE_OLE)
wx_list_add_prefix(CORE_SRC "${wxSOURCE_DIR}/" "src/generic/dirdlgg.cpp")
endif()
elseif(WXGTK)
if(WXGTK2)
set(GTK2_LOWLEVEL_HDR ${GTK_LOWLEVEL_HDR})
wx_append_sources(CORE_SRC GTK2_LOWLEVEL)
wx_append_sources(CORE_SRC GTK2)
else()
wx_append_sources(CORE_SRC GTK_LOWLEVEL)
wx_append_sources(CORE_SRC GTK)
endif()
if(UNIX)
wx_append_sources(CORE_SRC XWIN_LOWLEVEL)
elseif(WIN32)
wx_append_sources(CORE_SRC GTK_WIN32)
endif()
elseif(WXOSX_COCOA)
wx_append_sources(CORE_SRC BASE_AND_GUI_OSX_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_SHARED)
wx_append_sources(CORE_SRC OSX_IPHONE)
elseif(WXQT)
wx_append_sources(CORE_SRC QT)
if(UNIX)
wx_append_sources(CORE_SRC QT_UNIX)
elseif(WIN32)
wx_append_sources(CORE_SRC QT_WIN32)
endif()
elseif(WXX11)
wx_append_sources(CORE_SRC X11_LOWLEVEL)
endif()
wx_add_library(wxcore ${CORE_SRC})
foreach(lib JPEG PNG TIFF NANOSVG WebP)
if(${lib}_LIBRARIES)
wx_lib_link_libraries(wxcore PRIVATE ${${lib}_LIBRARIES})
endif()
if(${lib}_INCLUDE_DIRS)
wx_lib_include_directories(wxcore ${${lib}_INCLUDE_DIRS})
elseif(${lib}_INCLUDE_DIR)
wx_lib_include_directories(wxcore ${${lib}_INCLUDE_DIR})
endif()
endforeach()
if(wxUSE_NANOSVG STREQUAL "sys" AND wxUSE_NANOSVG_EXTERNAL_ENABLE_IMPL)
wx_lib_compile_definitions(wxcore wxUSE_NANOSVG_EXTERNAL_ENABLE_IMPL)
endif()
if(WIN32)
wx_lib_link_libraries(wxcore PRIVATE winmm)
endif()
if(WXOSX_COCOA)
wx_lib_link_libraries(wxcore PUBLIC "-framework AudioToolbox")
if(wxUSE_WEBVIEW)
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(wxcore ${FONTCONFIG_INCLUDE_DIRS} ${PANGOFT2_INCLUDE_DIRS})
wx_lib_link_libraries(wxcore PUBLIC ${FONTCONFIG_LIBRARIES} ${PANGOFT2_LIBRARIES})
endif()
if(wxUSE_LIBSDL)
if(SDL2_FOUND)
wx_lib_include_directories(wxcore ${SDL2_INCLUDE_DIR})
wx_lib_link_libraries(wxcore PUBLIC ${SDL2_LIBRARY})
elseif(SDL_FOUND)
wx_lib_include_directories(wxcore ${SDL_INCLUDE_DIR})
wx_lib_link_libraries(wxcore PUBLIC ${SDL_LIBRARY})
endif()
endif()
if(wxUSE_LIBNOTIFY)
wx_lib_include_directories(wxcore ${LIBNOTIFY_INCLUDE_DIRS})
wx_lib_link_libraries(wxcore PUBLIC ${LIBNOTIFY_LIBRARIES})
endif()
if(wxUSE_CAIRO AND NOT WXGTK)
wx_lib_include_directories(wxcore ${CAIRO_INCLUDE_DIRS})
# no libs, cairo is loaded dynamically
endif()

View File

@@ -0,0 +1,22 @@
#############################################################################
# Name: build/cmake/lib/expat.cmake
# Purpose: Use external or internal expat lib
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
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
src/expat/expat/lib/xmltok.c
)
set(EXPAT_LIBRARIES wxexpat)
set(EXPAT_INCLUDE_DIRS ${wxSOURCE_DIR}/src/expat/expat/lib)
elseif(wxUSE_EXPAT)
find_package(EXPAT REQUIRED)
endif()

View File

@@ -0,0 +1,28 @@
#############################################################################
# Name: build/cmake/lib/gl/CMakeLists.txt
# Purpose: CMake file for gl library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(GL_FILES OPENGL_CMN)
if(WXMSW)
wx_append_sources(GL_FILES OPENGL_MSW)
elseif(WXGTK)
wx_append_sources(GL_FILES OPENGL_GTK)
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)
elseif(WXX11)
wx_append_sources(GL_FILES OPENGL_X11)
endif()
wx_add_library(wxgl ${GL_FILES})
wx_lib_include_directories(wxgl ${OPENGL_INCLUDE_DIR})
wx_lib_link_libraries(wxgl PUBLIC ${OPENGL_LIBRARIES})

View File

@@ -0,0 +1,21 @@
#############################################################################
# Name: build/cmake/lib/html/CMakeLists.txt
# Purpose: CMake file for html library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(HTML_FILES HTML_CMN)
if(WXMSW)
wx_append_sources(HTML_FILES HTML_MSW)
endif()
wx_add_library(wxhtml ${HTML_FILES})
if(wxUSE_LIBMSPACK)
wx_lib_include_directories(wxhtml ${MSPACK_INCLUDE_DIRS})
wx_lib_link_libraries(wxhtml PRIVATE ${MSPACK_LIBRARIES})
endif()

View File

@@ -0,0 +1,67 @@
#############################################################################
# Name: build/cmake/lib/jpeg.cmake
# Purpose: Use external or internal libjpeg
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(wxUSE_LIBJPEG STREQUAL "builtin")
wx_add_builtin_library(wxjpeg
src/jpeg/jaricom.c
src/jpeg/jcapimin.c
src/jpeg/jcapistd.c
src/jpeg/jcarith.c
src/jpeg/jccoefct.c
src/jpeg/jccolor.c
src/jpeg/jcdctmgr.c
src/jpeg/jchuff.c
src/jpeg/jcinit.c
src/jpeg/jcmainct.c
src/jpeg/jcmarker.c
src/jpeg/jcmaster.c
src/jpeg/jcomapi.c
src/jpeg/jcparam.c
src/jpeg/jcprepct.c
src/jpeg/jcsample.c
src/jpeg/jctrans.c
src/jpeg/jdapimin.c
src/jpeg/jdapistd.c
src/jpeg/jdarith.c
src/jpeg/jdatadst.c
src/jpeg/jdatasrc.c
src/jpeg/jdcoefct.c
src/jpeg/jdcolor.c
src/jpeg/jddctmgr.c
src/jpeg/jdhuff.c
src/jpeg/jdinput.c
src/jpeg/jdmainct.c
src/jpeg/jdmarker.c
src/jpeg/jdmaster.c
src/jpeg/jdmerge.c
src/jpeg/jdpostct.c
src/jpeg/jdsample.c
src/jpeg/jdtrans.c
src/jpeg/jerror.c
src/jpeg/jfdctflt.c
src/jpeg/jfdctfst.c
src/jpeg/jfdctint.c
src/jpeg/jidctflt.c
src/jpeg/jidctfst.c
src/jpeg/jidctint.c
src/jpeg/jmemmgr.c
src/jpeg/jmemnobs.c
src/jpeg/jquant1.c
src/jpeg/jquant2.c
src/jpeg/jutils.c
)
target_include_directories(wxjpeg
BEFORE PRIVATE
${wxSETUP_HEADER_PATH}
)
set(JPEG_LIBRARIES wxjpeg)
set(JPEG_INCLUDE_DIR ${wxSOURCE_DIR}/src/jpeg)
elseif(wxUSE_LIBJPEG)
find_package(JPEG REQUIRED)
endif()

View File

@@ -0,0 +1,56 @@
#############################################################################
# Name: build/cmake/lib/media/CMakeLists.txt
# Purpose: CMake file for media library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(MEDIA_FILES MEDIA_CMN)
if(WXMSW)
wx_append_sources(MEDIA_FILES MEDIA_MSW)
elseif(WXOSX_COCOA)
wx_append_sources(MEDIA_FILES MEDIA_OSX_COCOA)
elseif(WXOSX_IPHONE)
wx_append_sources(MEDIA_FILES MEDIA_OSX_IPHONE)
elseif(WXGTK)
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
wx_append_sources(MEDIA_FILES MEDIA_GTK)
elseif(WXQT)
wx_append_sources(MEDIA_FILES MEDIA_QT)
elseif(WXX11)
wx_append_sources(MEDIA_FILES MEDIA_UNIX)
endif()
wx_add_library(wxmedia ${MEDIA_FILES})
if(WXOSX)
wx_lib_link_libraries(wxmedia PUBLIC
"-framework AVFoundation"
"-framework CoreMedia"
"-weak_framework AVKit"
)
elseif(WXGTK)
wx_lib_include_directories(wxmedia ${GSTREAMER_INCLUDE_DIRS})
if(GSTREAMER_INTERFACES_INCLUDE_DIRS)
wx_lib_include_directories(wxmedia ${GSTREAMER_INTERFACES_INCLUDE_DIRS})
endif()
if(GSTREAMER_VIDEO_INCLUDE_DIRS)
wx_lib_include_directories(wxmedia ${GSTREAMER_VIDEO_INCLUDE_DIRS})
endif()
if(GSTREAMER_PLAYER_INCLUDE_DIRS)
wx_lib_include_directories(wxmedia ${GSTREAMER_PLAYER_INCLUDE_DIRS})
endif()
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_LIBRARIES})
if(GSTREAMER_INTERFACES_LIBRARIES)
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_INTERFACES_LIBRARIES})
endif()
if(GSTREAMER_VIDEO_LIBRARIES)
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_VIDEO_LIBRARIES})
endif()
if(GSTREAMER_PLAYER_LIBRARIES)
wx_lib_link_libraries(wxmedia PUBLIC ${GSTREAMER_PLAYER_LIBRARIES})
endif()
endif()

View File

@@ -0,0 +1,39 @@
#############################################################################
# Name: build/cmake/lib/nanosvg.cmake
# Purpose: Use external or internal nanosvg lib
# Author: Tamas Meszaros, Maarten Bent
# Created: 2022-05-05
# Copyright: (c) 2022 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(wxUSE_NANOSVG STREQUAL "builtin")
set(wxUSE_NANOSVG_EXTERNAL 0 PARENT_SCOPE)
elseif(wxUSE_NANOSVG)
set(wxUSE_NANOSVG_EXTERNAL 1 PARENT_SCOPE)
set(NANOSVG_LIBRARIES )
set(NANOSVG_INCLUDE_DIRS )
set(wxUSE_NANOSVG_EXTERNAL_ENABLE_IMPL TRUE)
find_package(NanoSVG REQUIRED)
foreach(TARGETNAME NanoSVG::nanosvg NanoSVG::nanosvgrast unofficial::nanosvg)
if(NOT TARGET ${TARGETNAME})
continue()
endif()
list(APPEND NANOSVG_LIBRARIES ${TARGETNAME})
get_target_property(svg_incl_dir ${TARGETNAME} INTERFACE_INCLUDE_DIRECTORIES)
if(svg_incl_dir)
list(APPEND NANOSVG_INCLUDE_DIRS ${svg_incl_dir})
endif()
get_target_property(svg_lib_d ${TARGETNAME} IMPORTED_LOCATION_DEBUG)
get_target_property(svg_lib_r ${TARGETNAME} IMPORTED_LOCATION_RELEASE)
get_target_property(svg_lib ${TARGETNAME} IMPORTED_LOCATION)
if(svg_lib_d OR svg_lib_r OR svg_lib)
set(wxUSE_NANOSVG_EXTERNAL_ENABLE_IMPL FALSE)
endif()
endforeach()
endif()

View File

@@ -0,0 +1,35 @@
#############################################################################
# Name: build/cmake/lib/net/CMakeLists.txt
# Purpose: CMake file for net library
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(NET_FILES NET_CMN)
if(WIN32)
wx_append_sources(NET_FILES NET_WIN32)
elseif(APPLE)
wx_append_sources(NET_FILES NET_OSX)
endif()
if(UNIX AND NOT WIN32)
wx_append_sources(NET_FILES NET_UNIX)
endif()
wx_add_library(wxnet IS_BASE ${NET_FILES})
if(WIN32)
wx_lib_link_libraries(wxnet PRIVATE ws2_32)
if(wxUSE_WEBREQUEST_WINHTTP)
wx_lib_link_libraries(wxnet PRIVATE winhttp)
endif()
endif()
if (wxUSE_WEBREQUEST_CURL)
wx_lib_include_directories(wxnet ${CURL_INCLUDE_DIRS})
wx_lib_link_libraries(wxnet PUBLIC ${CURL_LIBRARIES})
endif()

View File

@@ -0,0 +1,58 @@
#############################################################################
# Name: build/cmake/lib/png.cmake
# Purpose: Use external or internal libpng
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
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
src/png/pngget.c
src/png/pngmem.c
src/png/pngpread.c
src/png/pngread.c
src/png/pngrio.c
src/png/pngrtran.c
src/png/pngrutil.c
src/png/pngset.c
src/png/pngtrans.c
src/png/pngwio.c
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():
# confusingly enough, we do define lfind as _lfind for MSVC but
# doing this results in a just more confusing warning, see:
# 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)
set(PNG_INCLUDE_DIRS ${wxSOURCE_DIR}/src/png)
elseif(wxUSE_LIBPNG)
find_package(PNG REQUIRED)
endif()

View File

@@ -0,0 +1,12 @@
#############################################################################
# Name: build/cmake/lib/propgrid/CMakeLists.txt
# Purpose: CMake file for propgrid library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(PROPGRID_FILES PROPGRID)
wx_add_library(wxpropgrid ${PROPGRID_FILES})

View File

@@ -0,0 +1,13 @@
#############################################################################
# Name: build/cmake/lib/qa/CMakeLists.txt
# Purpose: CMake file for qa library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(QA_FILES QA)
wx_add_library(wxqa ${QA_FILES})
wx_lib_link_libraries(wxqa PUBLIC wxxml)

View File

@@ -0,0 +1,52 @@
#############################################################################
# Name: build/cmake/lib/regex.cmake
# Purpose: Use external or internal regex lib
# Author: Tobias Taschner
# Created: 2016-09-25
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(wxUSE_REGEX STREQUAL "builtin")
# TODO: implement building PCRE2 via its CMake file, using
# add_subdirectory or ExternalProject_Add
wx_add_builtin_library(wxregex
3rdparty/pcre/src/pcre2_auto_possess.c
3rdparty/pcre/src/pcre2_chkdint.c
3rdparty/pcre/src/pcre2_compile.c
3rdparty/pcre/src/pcre2_compile_class.c
3rdparty/pcre/src/pcre2_config.c
3rdparty/pcre/src/pcre2_context.c
3rdparty/pcre/src/pcre2_convert.c
3rdparty/pcre/src/pcre2_dfa_match.c
3rdparty/pcre/src/pcre2_error.c
3rdparty/pcre/src/pcre2_extuni.c
3rdparty/pcre/src/pcre2_find_bracket.c
3rdparty/pcre/src/pcre2_jit_compile.c
3rdparty/pcre/src/pcre2_maketables.c
3rdparty/pcre/src/pcre2_match.c
3rdparty/pcre/src/pcre2_match_data.c
3rdparty/pcre/src/pcre2_newline.c
3rdparty/pcre/src/pcre2_ord2utf.c
3rdparty/pcre/src/pcre2_pattern_info.c
3rdparty/pcre/src/pcre2_script_run.c
3rdparty/pcre/src/pcre2_serialize.c
3rdparty/pcre/src/pcre2_string_utils.c
3rdparty/pcre/src/pcre2_study.c
3rdparty/pcre/src/pcre2_substitute.c
3rdparty/pcre/src/pcre2_substring.c
3rdparty/pcre/src/pcre2_tables.c
3rdparty/pcre/src/pcre2_ucd.c
3rdparty/pcre/src/pcre2_valid_utf.c
3rdparty/pcre/src/pcre2_xclass.c
3rdparty/pcre/src/pcre2_chartables.c
)
set(REGEX_LIBRARIES wxregex)
set(REGEX_INCLUDE_DIRS ${wxSOURCE_DIR}/3rdparty/pcre/src/wx)
target_compile_definitions(wxregex PRIVATE __WX__ HAVE_CONFIG_H)
target_include_directories(wxregex PRIVATE ${wxSETUP_HEADER_PATH} ${wxSOURCE_DIR}/include ${REGEX_INCLUDE_DIRS})
elseif(wxUSE_REGEX)
find_package(PCRE2 REQUIRED)
set(REGEX_LIBRARIES ${PCRE2_LIBRARIES})
set(REGEX_INCLUDE_DIRS ${PCRE2_INCLUDE_DIRS})
endif()

View File

@@ -0,0 +1,12 @@
#############################################################################
# Name: build/cmake/lib/ribbon/CMakeLists.txt
# Purpose: CMake file for ribbon library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(RIBBON_FILES RIBBON)
wx_add_library(wxribbon ${RIBBON_FILES})

View File

@@ -0,0 +1,13 @@
#############################################################################
# Name: build/cmake/lib/richtext/CMakeLists.txt
# Purpose: CMake file for richtext library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(RICHTEXT_FILES RICHTEXT)
wx_add_library(wxrichtext ${RICHTEXT_FILES})
wx_lib_link_libraries(wxrichtext PRIVATE wxhtml wxxml)

View File

@@ -0,0 +1,31 @@
#############################################################################
# Name: build/cmake/lib/stc/CMakeLists.txt
# Purpose: CMake file for stc library
# Author: Tobias Taschner
# Created: 2016-10-04
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(scintilla.cmake)
include(lexilla.cmake)
wx_append_sources(STC_FILES STC_CMN)
if(WXOSX_COCOA)
wx_append_sources(STC_FILES STC_OSX_COCOA)
endif()
wx_add_library(wxstc ${STC_FILES})
get_target_property(SCINTILLA_INCLUDE wxscintilla INCLUDE_DIRECTORIES)
get_target_property(LEXILLA_INCLUDE wxlexilla INCLUDE_DIRECTORIES)
wx_lib_include_directories(wxstc PRIVATE ${SCINTILLA_INCLUDE} ${LEXILLA_INCLUDE})
get_target_property(SCINTILLA_DEFINITIONS wxscintilla COMPILE_DEFINITIONS)
get_target_property(LEXILLA_DEFINITIONS wxlexilla COMPILE_DEFINITIONS)
wx_lib_compile_definitions(wxstc PRIVATE ${SCINTILLA_DEFINITIONS} ${LEXILLA_DEFINITIONS})
wx_lib_link_libraries(wxstc PRIVATE wxscintilla wxlexilla)
if(WXMSW)
wx_lib_link_libraries(wxstc PRIVATE imm32)
endif()

View File

@@ -0,0 +1,187 @@
#############################################################################
# Name: build/cmake/lib/stc/lexilla.cmake
# Purpose: CMake file for Lexilla library
# Author: Maarten Bent
# Created: 2022-12-28
# Copyright: (c) 2022 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
set(LEXILLA_SRC_DIR src/stc/lexilla)
wx_add_builtin_library(wxlexilla
${LEXILLA_SRC_DIR}/access/LexillaAccess.cxx
${LEXILLA_SRC_DIR}/access/LexillaAccess.h
${LEXILLA_SRC_DIR}/include/Lexilla.h
${LEXILLA_SRC_DIR}/include/LexillaCompat.h
${LEXILLA_SRC_DIR}/include/SciLexer.h
${LEXILLA_SRC_DIR}/lexers/LexA68k.cxx
${LEXILLA_SRC_DIR}/lexers/LexAPDL.cxx
${LEXILLA_SRC_DIR}/lexers/LexASY.cxx
${LEXILLA_SRC_DIR}/lexers/LexAU3.cxx
${LEXILLA_SRC_DIR}/lexers/LexAVE.cxx
${LEXILLA_SRC_DIR}/lexers/LexAVS.cxx
${LEXILLA_SRC_DIR}/lexers/LexAbaqus.cxx
${LEXILLA_SRC_DIR}/lexers/LexAda.cxx
${LEXILLA_SRC_DIR}/lexers/LexAsciidoc.cxx
${LEXILLA_SRC_DIR}/lexers/LexAsm.cxx
${LEXILLA_SRC_DIR}/lexers/LexAsn1.cxx
${LEXILLA_SRC_DIR}/lexers/LexBaan.cxx
${LEXILLA_SRC_DIR}/lexers/LexBash.cxx
${LEXILLA_SRC_DIR}/lexers/LexBasic.cxx
${LEXILLA_SRC_DIR}/lexers/LexBatch.cxx
${LEXILLA_SRC_DIR}/lexers/LexBibTeX.cxx
${LEXILLA_SRC_DIR}/lexers/LexBullant.cxx
${LEXILLA_SRC_DIR}/lexers/LexCIL.cxx
${LEXILLA_SRC_DIR}/lexers/LexCLW.cxx
${LEXILLA_SRC_DIR}/lexers/LexCOBOL.cxx
${LEXILLA_SRC_DIR}/lexers/LexCPP.cxx
${LEXILLA_SRC_DIR}/lexers/LexCSS.cxx
${LEXILLA_SRC_DIR}/lexers/LexCaml.cxx
${LEXILLA_SRC_DIR}/lexers/LexCmake.cxx
${LEXILLA_SRC_DIR}/lexers/LexCoffeeScript.cxx
${LEXILLA_SRC_DIR}/lexers/LexConf.cxx
${LEXILLA_SRC_DIR}/lexers/LexCrontab.cxx
${LEXILLA_SRC_DIR}/lexers/LexCsound.cxx
${LEXILLA_SRC_DIR}/lexers/LexD.cxx
${LEXILLA_SRC_DIR}/lexers/LexDMAP.cxx
${LEXILLA_SRC_DIR}/lexers/LexDMIS.cxx
${LEXILLA_SRC_DIR}/lexers/LexDart.cxx
${LEXILLA_SRC_DIR}/lexers/LexDataflex.cxx
${LEXILLA_SRC_DIR}/lexers/LexDiff.cxx
${LEXILLA_SRC_DIR}/lexers/LexECL.cxx
${LEXILLA_SRC_DIR}/lexers/LexEDIFACT.cxx
${LEXILLA_SRC_DIR}/lexers/LexEScript.cxx
${LEXILLA_SRC_DIR}/lexers/LexEiffel.cxx
${LEXILLA_SRC_DIR}/lexers/LexErlang.cxx
${LEXILLA_SRC_DIR}/lexers/LexErrorList.cxx
${LEXILLA_SRC_DIR}/lexers/LexFSharp.cxx
${LEXILLA_SRC_DIR}/lexers/LexFlagship.cxx
${LEXILLA_SRC_DIR}/lexers/LexForth.cxx
${LEXILLA_SRC_DIR}/lexers/LexFortran.cxx
${LEXILLA_SRC_DIR}/lexers/LexGAP.cxx
${LEXILLA_SRC_DIR}/lexers/LexGDScript.cxx
${LEXILLA_SRC_DIR}/lexers/LexGui4Cli.cxx
${LEXILLA_SRC_DIR}/lexers/LexHTML.cxx
${LEXILLA_SRC_DIR}/lexers/LexHaskell.cxx
${LEXILLA_SRC_DIR}/lexers/LexHex.cxx
${LEXILLA_SRC_DIR}/lexers/LexHollywood.cxx
${LEXILLA_SRC_DIR}/lexers/LexIndent.cxx
${LEXILLA_SRC_DIR}/lexers/LexInno.cxx
${LEXILLA_SRC_DIR}/lexers/LexJSON.cxx
${LEXILLA_SRC_DIR}/lexers/LexJulia.cxx
${LEXILLA_SRC_DIR}/lexers/LexKVIrc.cxx
${LEXILLA_SRC_DIR}/lexers/LexKix.cxx
${LEXILLA_SRC_DIR}/lexers/LexLaTeX.cxx
${LEXILLA_SRC_DIR}/lexers/LexLisp.cxx
${LEXILLA_SRC_DIR}/lexers/LexLout.cxx
${LEXILLA_SRC_DIR}/lexers/LexLua.cxx
${LEXILLA_SRC_DIR}/lexers/LexMMIXAL.cxx
${LEXILLA_SRC_DIR}/lexers/LexMPT.cxx
${LEXILLA_SRC_DIR}/lexers/LexMSSQL.cxx
${LEXILLA_SRC_DIR}/lexers/LexMagik.cxx
${LEXILLA_SRC_DIR}/lexers/LexMake.cxx
${LEXILLA_SRC_DIR}/lexers/LexMarkdown.cxx
${LEXILLA_SRC_DIR}/lexers/LexMatlab.cxx
${LEXILLA_SRC_DIR}/lexers/LexMaxima.cxx
${LEXILLA_SRC_DIR}/lexers/LexMetapost.cxx
${LEXILLA_SRC_DIR}/lexers/LexModula.cxx
${LEXILLA_SRC_DIR}/lexers/LexMySQL.cxx
${LEXILLA_SRC_DIR}/lexers/LexNim.cxx
${LEXILLA_SRC_DIR}/lexers/LexNimrod.cxx
${LEXILLA_SRC_DIR}/lexers/LexNix.cxx
${LEXILLA_SRC_DIR}/lexers/LexNsis.cxx
${LEXILLA_SRC_DIR}/lexers/LexNull.cxx
${LEXILLA_SRC_DIR}/lexers/LexOScript.cxx
${LEXILLA_SRC_DIR}/lexers/LexOpal.cxx
${LEXILLA_SRC_DIR}/lexers/LexPB.cxx
${LEXILLA_SRC_DIR}/lexers/LexPLM.cxx
${LEXILLA_SRC_DIR}/lexers/LexPO.cxx
${LEXILLA_SRC_DIR}/lexers/LexPOV.cxx
${LEXILLA_SRC_DIR}/lexers/LexPS.cxx
${LEXILLA_SRC_DIR}/lexers/LexPascal.cxx
${LEXILLA_SRC_DIR}/lexers/LexPerl.cxx
${LEXILLA_SRC_DIR}/lexers/LexPowerPro.cxx
${LEXILLA_SRC_DIR}/lexers/LexPowerShell.cxx
${LEXILLA_SRC_DIR}/lexers/LexProgress.cxx
${LEXILLA_SRC_DIR}/lexers/LexProps.cxx
${LEXILLA_SRC_DIR}/lexers/LexPython.cxx
${LEXILLA_SRC_DIR}/lexers/LexR.cxx
${LEXILLA_SRC_DIR}/lexers/LexRaku.cxx
${LEXILLA_SRC_DIR}/lexers/LexRebol.cxx
${LEXILLA_SRC_DIR}/lexers/LexRegistry.cxx
${LEXILLA_SRC_DIR}/lexers/LexRuby.cxx
${LEXILLA_SRC_DIR}/lexers/LexRust.cxx
${LEXILLA_SRC_DIR}/lexers/LexSAS.cxx
${LEXILLA_SRC_DIR}/lexers/LexSML.cxx
${LEXILLA_SRC_DIR}/lexers/LexSQL.cxx
${LEXILLA_SRC_DIR}/lexers/LexSTTXT.cxx
${LEXILLA_SRC_DIR}/lexers/LexScriptol.cxx
${LEXILLA_SRC_DIR}/lexers/LexSmalltalk.cxx
${LEXILLA_SRC_DIR}/lexers/LexSorcus.cxx
${LEXILLA_SRC_DIR}/lexers/LexSpecman.cxx
${LEXILLA_SRC_DIR}/lexers/LexSpice.cxx
${LEXILLA_SRC_DIR}/lexers/LexStata.cxx
${LEXILLA_SRC_DIR}/lexers/LexTACL.cxx
${LEXILLA_SRC_DIR}/lexers/LexTADS3.cxx
${LEXILLA_SRC_DIR}/lexers/LexTAL.cxx
${LEXILLA_SRC_DIR}/lexers/LexTCL.cxx
${LEXILLA_SRC_DIR}/lexers/LexTCMD.cxx
${LEXILLA_SRC_DIR}/lexers/LexTOML.cxx
${LEXILLA_SRC_DIR}/lexers/LexTeX.cxx
${LEXILLA_SRC_DIR}/lexers/LexTroff.cxx
${LEXILLA_SRC_DIR}/lexers/LexTxt2tags.cxx
${LEXILLA_SRC_DIR}/lexers/LexVB.cxx
${LEXILLA_SRC_DIR}/lexers/LexVHDL.cxx
${LEXILLA_SRC_DIR}/lexers/LexVerilog.cxx
${LEXILLA_SRC_DIR}/lexers/LexVisualProlog.cxx
${LEXILLA_SRC_DIR}/lexers/LexX12.cxx
${LEXILLA_SRC_DIR}/lexers/LexYAML.cxx
${LEXILLA_SRC_DIR}/lexers/LexZig.cxx
${LEXILLA_SRC_DIR}/lexlib/Accessor.cxx
${LEXILLA_SRC_DIR}/lexlib/Accessor.h
${LEXILLA_SRC_DIR}/lexlib/CatalogueModules.h
${LEXILLA_SRC_DIR}/lexlib/DefaultLexer.cxx
${LEXILLA_SRC_DIR}/lexlib/DefaultLexer.h
${LEXILLA_SRC_DIR}/lexlib/InList.cxx
${LEXILLA_SRC_DIR}/lexlib/InList.h
${LEXILLA_SRC_DIR}/lexlib/LexAccessor.cxx
${LEXILLA_SRC_DIR}/lexlib/LexAccessor.h
${LEXILLA_SRC_DIR}/lexlib/LexCharacterCategory.cxx
${LEXILLA_SRC_DIR}/lexlib/LexCharacterCategory.h
${LEXILLA_SRC_DIR}/lexlib/LexCharacterSet.cxx
${LEXILLA_SRC_DIR}/lexlib/LexCharacterSet.h
${LEXILLA_SRC_DIR}/lexlib/LexerBase.cxx
${LEXILLA_SRC_DIR}/lexlib/LexerBase.h
${LEXILLA_SRC_DIR}/lexlib/LexerModule.cxx
${LEXILLA_SRC_DIR}/lexlib/LexerModule.h
${LEXILLA_SRC_DIR}/lexlib/LexerSimple.cxx
${LEXILLA_SRC_DIR}/lexlib/LexerSimple.h
${LEXILLA_SRC_DIR}/lexlib/OptionSet.h
${LEXILLA_SRC_DIR}/lexlib/PropSetSimple.cxx
${LEXILLA_SRC_DIR}/lexlib/PropSetSimple.h
${LEXILLA_SRC_DIR}/lexlib/SparseState.h
${LEXILLA_SRC_DIR}/lexlib/StringCopy.h
${LEXILLA_SRC_DIR}/lexlib/StyleContext.cxx
${LEXILLA_SRC_DIR}/lexlib/StyleContext.h
${LEXILLA_SRC_DIR}/lexlib/SubStyles.h
${LEXILLA_SRC_DIR}/lexlib/WordList.cxx
${LEXILLA_SRC_DIR}/lexlib/WordList.h
${LEXILLA_SRC_DIR}/src/Lexilla.cxx
)
get_target_property(SCINTILLA_INCLUDE wxscintilla INCLUDE_DIRECTORIES)
target_include_directories(wxlexilla PRIVATE
${wxSOURCE_DIR}/${LEXILLA_SRC_DIR}/access
${wxSOURCE_DIR}/${LEXILLA_SRC_DIR}/include
${wxSOURCE_DIR}/${LEXILLA_SRC_DIR}/lexlib
${SCINTILLA_INCLUDE}
)
wx_target_enable_precomp(wxlexilla
"${wxSOURCE_DIR}/${SCINTILLA_SRC_DIR}/include/Scintilla.h"
"${wxSOURCE_DIR}/${LEXILLA_SRC_DIR}/include/Lexilla.h"
)

View File

@@ -0,0 +1,101 @@
#############################################################################
# Name: build/cmake/lib/stc/scintilla.cmake
# Purpose: CMake file for Scintilla library
# Author: Maarten Bent
# Created: 2022-12-28
# Copyright: (c) 2022 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
set(SCINTILLA_SRC_DIR src/stc/scintilla)
wx_add_builtin_library(wxscintilla
${SCINTILLA_SRC_DIR}/include/Compat.h
${SCINTILLA_SRC_DIR}/include/ILexer.h
${SCINTILLA_SRC_DIR}/include/ILoader.h
${SCINTILLA_SRC_DIR}/include/Platform.h
${SCINTILLA_SRC_DIR}/include/Sci_Position.h
${SCINTILLA_SRC_DIR}/include/Scintilla.h
${SCINTILLA_SRC_DIR}/include/ScintillaWidget.h
${SCINTILLA_SRC_DIR}/src/AutoComplete.cxx
${SCINTILLA_SRC_DIR}/src/AutoComplete.h
${SCINTILLA_SRC_DIR}/src/CallTip.cxx
${SCINTILLA_SRC_DIR}/src/CallTip.h
${SCINTILLA_SRC_DIR}/src/CaseConvert.cxx
${SCINTILLA_SRC_DIR}/src/CaseConvert.h
${SCINTILLA_SRC_DIR}/src/CaseFolder.cxx
${SCINTILLA_SRC_DIR}/src/CaseFolder.h
${SCINTILLA_SRC_DIR}/src/CellBuffer.cxx
${SCINTILLA_SRC_DIR}/src/CellBuffer.h
${SCINTILLA_SRC_DIR}/src/CharClassify.cxx
${SCINTILLA_SRC_DIR}/src/CharClassify.h
${SCINTILLA_SRC_DIR}/src/CharacterCategory.cxx
${SCINTILLA_SRC_DIR}/src/CharacterCategory.h
${SCINTILLA_SRC_DIR}/src/CharacterSet.cxx
${SCINTILLA_SRC_DIR}/src/CharacterSet.h
${SCINTILLA_SRC_DIR}/src/ContractionState.cxx
${SCINTILLA_SRC_DIR}/src/ContractionState.h
${SCINTILLA_SRC_DIR}/src/DBCS.cxx
${SCINTILLA_SRC_DIR}/src/DBCS.h
${SCINTILLA_SRC_DIR}/src/Decoration.cxx
${SCINTILLA_SRC_DIR}/src/Decoration.h
${SCINTILLA_SRC_DIR}/src/Document.cxx
${SCINTILLA_SRC_DIR}/src/Document.h
${SCINTILLA_SRC_DIR}/src/EditModel.cxx
${SCINTILLA_SRC_DIR}/src/EditModel.h
${SCINTILLA_SRC_DIR}/src/EditView.cxx
${SCINTILLA_SRC_DIR}/src/EditView.h
${SCINTILLA_SRC_DIR}/src/Editor.cxx
${SCINTILLA_SRC_DIR}/src/Editor.h
${SCINTILLA_SRC_DIR}/src/ElapsedPeriod.h
${SCINTILLA_SRC_DIR}/src/FontQuality.h
${SCINTILLA_SRC_DIR}/src/Indicator.cxx
${SCINTILLA_SRC_DIR}/src/Indicator.h
${SCINTILLA_SRC_DIR}/src/IntegerRectangle.h
${SCINTILLA_SRC_DIR}/src/KeyMap.cxx
${SCINTILLA_SRC_DIR}/src/KeyMap.h
${SCINTILLA_SRC_DIR}/src/LineMarker.cxx
${SCINTILLA_SRC_DIR}/src/LineMarker.h
${SCINTILLA_SRC_DIR}/src/MarginView.cxx
${SCINTILLA_SRC_DIR}/src/MarginView.h
${SCINTILLA_SRC_DIR}/src/Partitioning.h
${SCINTILLA_SRC_DIR}/src/PerLine.cxx
${SCINTILLA_SRC_DIR}/src/PerLine.h
${SCINTILLA_SRC_DIR}/src/Position.h
${SCINTILLA_SRC_DIR}/src/PositionCache.cxx
${SCINTILLA_SRC_DIR}/src/PositionCache.h
${SCINTILLA_SRC_DIR}/src/RESearch.cxx
${SCINTILLA_SRC_DIR}/src/RESearch.h
${SCINTILLA_SRC_DIR}/src/RunStyles.cxx
${SCINTILLA_SRC_DIR}/src/RunStyles.h
${SCINTILLA_SRC_DIR}/src/ScintillaBase.cxx
${SCINTILLA_SRC_DIR}/src/ScintillaBase.h
${SCINTILLA_SRC_DIR}/src/Selection.cxx
${SCINTILLA_SRC_DIR}/src/Selection.h
${SCINTILLA_SRC_DIR}/src/SparseVector.h
${SCINTILLA_SRC_DIR}/src/SplitVector.h
${SCINTILLA_SRC_DIR}/src/Style.cxx
${SCINTILLA_SRC_DIR}/src/Style.h
${SCINTILLA_SRC_DIR}/src/UniConversion.cxx
${SCINTILLA_SRC_DIR}/src/UniConversion.h
${SCINTILLA_SRC_DIR}/src/UniqueString.cxx
${SCINTILLA_SRC_DIR}/src/UniqueString.h
${SCINTILLA_SRC_DIR}/src/ViewStyle.cxx
${SCINTILLA_SRC_DIR}/src/ViewStyle.h
${SCINTILLA_SRC_DIR}/src/XPM.cxx
${SCINTILLA_SRC_DIR}/src/XPM.h
)
target_include_directories(wxscintilla PRIVATE
${wxSOURCE_DIR}/${SCINTILLA_SRC_DIR}/include
${wxSOURCE_DIR}/${SCINTILLA_SRC_DIR}/src
)
target_compile_definitions(wxscintilla PUBLIC
__WX__
)
wx_target_enable_precomp(wxscintilla
"${wxSOURCE_DIR}/${SCINTILLA_SRC_DIR}/include/Scintilla.h"
)

View File

@@ -0,0 +1,81 @@
#############################################################################
# Name: build/cmake/lib/tiff.cmake
# Purpose: Use external or internal libtiff
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(wxUSE_LIBTIFF STREQUAL "builtin")
# 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)
set(TIFF_PLATFORM_SRC src/tiff/libtiff/tif_unix.c)
endif()
wx_add_builtin_library(wxtiff
${TIFF_PLATFORM_SRC}
src/tiff/libtiff/tif_aux.c
src/tiff/libtiff/tif_close.c
src/tiff/libtiff/tif_codec.c
src/tiff/libtiff/tif_color.c
src/tiff/libtiff/tif_compress.c
src/tiff/libtiff/tif_dir.c
src/tiff/libtiff/tif_dirinfo.c
src/tiff/libtiff/tif_dirread.c
src/tiff/libtiff/tif_dirwrite.c
src/tiff/libtiff/tif_dumpmode.c
src/tiff/libtiff/tif_error.c
src/tiff/libtiff/tif_extension.c
src/tiff/libtiff/tif_fax3.c
src/tiff/libtiff/tif_fax3sm.c
src/tiff/libtiff/tif_flush.c
src/tiff/libtiff/tif_getimage.c
src/tiff/libtiff/tif_hash_set.c
src/tiff/libtiff/tif_jbig.c
src/tiff/libtiff/tif_jpeg.c
src/tiff/libtiff/tif_jpeg_12.c
src/tiff/libtiff/tif_lerc.c
src/tiff/libtiff/tif_luv.c
src/tiff/libtiff/tif_lzma.c
src/tiff/libtiff/tif_lzw.c
src/tiff/libtiff/tif_next.c
src/tiff/libtiff/tif_ojpeg.c
src/tiff/libtiff/tif_open.c
src/tiff/libtiff/tif_packbits.c
src/tiff/libtiff/tif_pixarlog.c
src/tiff/libtiff/tif_predict.c
src/tiff/libtiff/tif_print.c
src/tiff/libtiff/tif_read.c
src/tiff/libtiff/tif_strip.c
src/tiff/libtiff/tif_swab.c
src/tiff/libtiff/tif_thunder.c
src/tiff/libtiff/tif_tile.c
src/tiff/libtiff/tif_version.c
src/tiff/libtiff/tif_warning.c
src/tiff/libtiff/tif_webp.c
src/tiff/libtiff/tif_write.c
src/tiff/libtiff/tif_zip.c
src/tiff/libtiff/tif_zstd.c
)
if(WIN32)
# define this to get rid of a warning about using POSIX lfind():
# confusingly enough, we do define lfind as _lfind for MSVC but
# doing this results in a just more confusing warning, see:
# http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101278
target_compile_definitions(wxtiff PRIVATE _CRT_NONSTDC_NO_WARNINGS)
endif()
target_include_directories(wxtiff PRIVATE
${wxSOURCE_DIR}/src/tiff/libtiff
${ZLIB_INCLUDE_DIRS}
${JPEG_INCLUDE_DIR}
)
target_link_libraries(wxtiff PRIVATE ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES})
set(TIFF_LIBRARIES wxtiff)
set(TIFF_INCLUDE_DIRS ${wxSOURCE_DIR}/src/tiff/libtiff)
elseif(wxUSE_LIBTIFF)
find_package(TIFF REQUIRED)
endif()

View File

@@ -0,0 +1,64 @@
#############################################################################
# Name: build/cmake/lib/webp.cmake
# Purpose: Use external or internal libwebp
# Author:
# Created: 2025-01-31
# Copyright: (c) 2025 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(wxUSE_LIBWEBP STREQUAL "builtin")
set(WEBP_ROOT "${wxSOURCE_DIR}/3rdparty/libwebp")
set(WEBP_BUILD_ROOT "${CMAKE_CURRENT_BINARY_DIR}/webp-build")
# No flags to enable or disable SIMD
set(WEBP_CHECK_SIMD OFF CACHE BOOL "")
# static library
set(WEBP_LINK_STATIC ON)
# disable tools
set(WEBP_BUILD_ANIM_UTILS OFF)
set(WEBP_BUILD_CWEBP OFF)
set(WEBP_BUILD_DWEBP OFF)
set(WEBP_BUILD_GIF2WEBP OFF)
set(WEBP_BUILD_IMG2WEBP OFF)
set(WEBP_BUILD_VWEBP OFF)
set(WEBP_BUILD_WEBPINFO OFF)
set(WEBP_BUILD_WEBPMUX OFF)
set(WEBP_BUILD_EXTRAS OFF)
set(WEBP_BUILD_WEBP_JS OFF)
set(WEBP_BUILD_FUZZTEST OFF)
add_subdirectory("${WEBP_ROOT}" "${WEBP_BUILD_ROOT}" EXCLUDE_FROM_ALL)
mark_as_advanced(WEBP_CHECK_SIMD)
mark_as_advanced(WEBP_BITTRACE)
mark_as_advanced(WEBP_BUILD_LIBWEBPMUX)
mark_as_advanced(WEBP_ENABLE_SIMD)
mark_as_advanced(WEBP_ENABLE_SWAP_16BIT_CSP)
mark_as_advanced(WEBP_ENABLE_WUNUSED_RESULT)
mark_as_advanced(WEBP_LINK_STATIC)
mark_as_advanced(WEBP_NEAR_LOSSLESS)
mark_as_advanced(WEBP_UNICODE)
mark_as_advanced(WEBP_USE_THREAD)
get_property(webpTargets DIRECTORY "${WEBP_ROOT}" PROPERTY BUILDSYSTEM_TARGETS)
foreach(target_name IN LISTS webpTargets)
set_target_properties(${target_name} PROPERTIES
FOLDER "Third Party Libraries/WebP"
PREFIX ""
OUTPUT_NAME "wx${target_name}"
PUBLIC_HEADER ""
)
endforeach()
set(WebP_LIBRARIES webp webpdemux sharpyuv)
if(NOT wxBUILD_SHARED)
wx_install(TARGETS ${WebP_LIBRARIES}
EXPORT wxWidgetsTargets
ARCHIVE DESTINATION "lib${GEN_EXPR_DIR}${wxPLATFORM_LIB_DIR}"
)
endif()
elseif(wxUSE_LIBWEBP)
find_package(WebP REQUIRED)
endif()

View File

@@ -0,0 +1,159 @@
#############################################################################
# Name: build/cmake/lib/webview/CMakeLists.txt
# Purpose: CMake file for webview library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
macro(wx_set_webview2_arch)
if(wxPLATFORM_ARCH)
set(WEBVIEW2_ARCH ${wxPLATFORM_ARCH})
else()
set(WEBVIEW2_ARCH x86)
endif()
endmacro()
function(wx_webview_copy_webview2_loader target)
if(NOT WXMSW OR NOT wxUSE_WEBVIEW_EDGE OR NOT TARGET ${target})
return()
endif()
wx_set_webview2_arch()
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${WEBVIEW2_PACKAGE_DIR}/build/native/${WEBVIEW2_ARCH}/WebView2Loader.dll"
"$<TARGET_FILE_DIR:${target}>/WebView2Loader.dll")
endfunction()
wx_append_sources(WEBVIEW_FILES WEBVIEW_CMN)
if(WXMSW)
wx_append_sources(WEBVIEW_FILES WEBVIEW_MSW)
elseif(WXGTK)
wx_append_sources(WEBVIEW_FILES WEBVIEW_GTK)
elseif(APPLE)
wx_append_sources(WEBVIEW_FILES WEBVIEW_OSX_SHARED)
endif()
wx_add_library(wxwebview ${WEBVIEW_FILES})
if(APPLE)
wx_lib_link_libraries(wxwebview PUBLIC "-framework WebKit")
elseif(WXMSW)
if(wxUSE_WEBVIEW_EDGE)
# Update the following variables if updating WebView2 SDK
set(WEBVIEW2_VERSION "1.0.1722.45")
set(WEBVIEW2_URL "https://www.nuget.org/api/v2/package/Microsoft.Web.WebView2/${WEBVIEW2_VERSION}")
set(WEBVIEW2_SHA256 "10d78e9e11c7851f0a8bf0dd4c22bbf6383de45bd337e1be42240b103812947d")
set(WEBVIEW2_DEFAULT_PACKAGE_DIR "${CMAKE_CURRENT_BINARY_DIR}/packages/Microsoft.Web.WebView2.${WEBVIEW2_VERSION}")
if(NOT EXISTS ${WEBVIEW2_PACKAGE_DIR})
unset(WEBVIEW2_PACKAGE_DIR CACHE)
endif()
find_path(WEBVIEW2_PACKAGE_DIR
NAMES build/native/include/WebView2.h
PATHS
"${PROJECT_SOURCE_DIR}/3rdparty/webview2"
${WEBVIEW2_DEFAULT_PACKAGE_DIR}
)
if (NOT WEBVIEW2_PACKAGE_DIR)
message(STATUS "WebView2 SDK not found locally, downloading...")
set(WEBVIEW2_PACKAGE_DIR ${WEBVIEW2_DEFAULT_PACKAGE_DIR} CACHE PATH "WebView2 SDK PATH" FORCE)
file(DOWNLOAD
${WEBVIEW2_URL}
${CMAKE_CURRENT_BINARY_DIR}/webview2.nuget
EXPECTED_HASH SHA256=${WEBVIEW2_SHA256}
STATUS DOWNLOAD_RESULT)
# Check that the download was successful.
list(GET DOWNLOAD_RESULT 0 DOWNLOAD_RESULT_NUM)
if(NOT ${DOWNLOAD_RESULT_NUM} EQUAL 0)
list(GET DOWNLOAD_RESULT 1 DOWNLOAD_RESULT_STR)
message(FATAL_ERROR "Error ${DOWNLOAD_RESULT_NUM} downloading WebView2 SDK: ${DOWNLOAD_RESULT_STR}.")
endif()
file(MAKE_DIRECTORY ${WEBVIEW2_PACKAGE_DIR})
execute_process(COMMAND
"${CMAKE_COMMAND}" -E tar x "${CMAKE_CURRENT_BINARY_DIR}/webview2.nuget"
WORKING_DIRECTORY "${WEBVIEW2_PACKAGE_DIR}"
)
endif()
set(WEBVIEW2_PACKAGE_DIR ${WEBVIEW2_PACKAGE_DIR} CACHE INTERNAL "" FORCE)
wx_lib_include_directories(wxwebview "${WEBVIEW2_PACKAGE_DIR}/build/native/include")
if(NOT MSVC)
wx_lib_include_directories(wxwebview "${wxSOURCE_DIR}/include/wx/msw/wrl")
if (NOT wxBUILD_MONOLITHIC)
target_compile_options(wxwebview PRIVATE -Wno-unknown-pragmas)
endif()
endif()
if (wxUSE_WEBVIEW_EDGE_STATIC)
wx_set_webview2_arch()
wx_lib_link_directories(wxwebview PUBLIC
$<BUILD_INTERFACE:${WEBVIEW2_PACKAGE_DIR}/build/native/${WEBVIEW2_ARCH}/>
)
else()
wx_webview_copy_webview2_loader(wxwebview)
endif()
endif()
elseif(WXGTK)
if(LIBSOUP_FOUND)
wx_lib_include_directories(wxwebview ${LIBSOUP_INCLUDE_DIRS})
wx_lib_link_libraries(wxwebview PUBLIC ${LIBSOUP_LIBRARIES})
endif()
if(wxUSE_WEBVIEW_WEBKIT2)
wx_lib_include_directories(wxwebview ${WEBKIT2_INCLUDE_DIR})
wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT2_LIBRARIES})
elseif(wxUSE_WEBVIEW_WEBKIT)
wx_lib_include_directories(wxwebview ${WEBKIT_INCLUDE_DIR})
wx_lib_link_libraries(wxwebview PUBLIC ${WEBKIT_LIBRARIES})
endif()
endif()
# 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(wxwebkit2_ext SHARED ${WEBKIT2_EXT_FILES})
wx_set_target_properties(wxwebkit2_ext IS_PLUGIN)
set_target_properties(wxwebkit2_ext PROPERTIES NO_SONAME 1)
# Change output name to match expected name in webview_webkit2.cpp: webkit2_ext*
set(lib_unicode "u")
set(lib_rls)
set(lib_dbg)
if(WIN32_MSVC_NAMING)
set(lib_dbg "d")
endif()
if(wxVERSION_IS_DEV)
set(WX_WEB_EXT_VERSION "${wxMAJOR_VERSION}.${wxMINOR_VERSION}.${wxRELEASE_NUMBER}")
else()
set(WX_WEB_EXT_VERSION "${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
endif()
set_target_properties(wxwebkit2_ext PROPERTIES
OUTPUT_NAME "webkit2_ext${lib_unicode}${lib_rls}-${WX_WEB_EXT_VERSION}"
OUTPUT_NAME_DEBUG "webkit2_ext${lib_unicode}${lib_dbg}-${WX_WEB_EXT_VERSION}"
PREFIX ""
)
target_include_directories(wxwebkit2_ext PRIVATE
${LIBSOUP_INCLUDE_DIRS}
${WEBKIT2_INCLUDE_DIR}
)
target_link_libraries(wxwebkit2_ext PUBLIC
${LIBSOUP_LIBRARIES}
${WEBKIT2_LIBRARIES}
)
wx_install(TARGETS wxwebkit2_ext LIBRARY DESTINATION "lib/wx/${WX_WEB_EXT_VERSION}/web-extensions")
wx_add_dependencies(wxwebview wxwebkit2_ext)
endif()

View File

@@ -0,0 +1,331 @@
#############################################################################
# Name: build/cmake/lib/webview_chromium/CMakeLists.txt
# Purpose: CMake file for webview_chromium library
# Author: Tobias Taschner
# Created: 2018-02-03
# Copyright: (c) 2018 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
include(../../source_groups.cmake)
set(KNOWN_CONFIGS "Debug;Release;RelWithDebInfo;MinSizeRel")
if(CMAKE_CONFIGURATION_TYPES)
foreach(cfg ${CMAKE_CONFIGURATION_TYPES})
if (NOT cfg IN_LIST KNOWN_CONFIGS)
message(WARNING "Unknown build configuration '${cfg}', this might cause issues with libcef_dll_wrapper")
endif()
endforeach()
elseif(CMAKE_BUILD_TYPE)
if (NOT CMAKE_BUILD_TYPE IN_LIST KNOWN_CONFIGS)
message(WARNING "Unknown build configuration '${cfg}', this might cause issues with libcef_dll_wrapper")
endif()
endif()
find_path(CEF_ROOT
NAMES libcef_dll
HINTS
$ENV{CEF_ROOT}
${wxSOURCE_DIR}/3rdparty/cef
DOC "CEF Binary Root directory"
)
# We may need to create multiple arch-specific directories, so define the
# variables containing the common root for all of them.
set(CEF_DOWNLOAD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/cef-download)
set(CEF_SOURCE_ROOT ${CMAKE_CURRENT_BINARY_DIR}/cef-source)
set(CEF_BUILD_ROOT ${CMAKE_CURRENT_BINARY_DIR}/cef-build)
# But when we don't need multiple directories, just use them directly.
set(CEF_DOWNLOAD_DIR ${CEF_DOWNLOAD_ROOT})
set(CEF_SOURCE_DIR ${CEF_SOURCE_ROOT})
set(CEF_BUILD_DIR ${CEF_BUILD_ROOT})
# This function downloads and builds CEF for the specified platform.
function(wx_download_cef CEF_PLATFORM)
message("Downloading CEF binary distribution for ${CEF_PLATFORM}...")
set(CEF_URL "${CEF_BASE_URL}${CEF_VERSION}_${CEF_PLATFORM}${CEF_DISTRIBUTION}${CEF_FILE_EXT}")
set(CEF_SHA1 "${CEF_SHA1_${CEF_PLATFORM}}")
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cef_download.cmake.in
${CEF_DOWNLOAD_DIR}/CMakeLists.txt
)
execute_process(
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CEF_DOWNLOAD_DIR}
)
if(result)
message(FATAL_ERROR "CMake step for cef failed: ${result}")
endif()
execute_process(
COMMAND ${CMAKE_COMMAND} --build .
RESULT_VARIABLE result
WORKING_DIRECTORY ${CEF_DOWNLOAD_DIR}
)
if(result)
message(FATAL_ERROR "Build step for cef failed: ${result}")
endif()
endfunction()
if(NOT CEF_ROOT)
include(cef_version_info.cmake)
# Note that CMAKE_OSX_ARCHITECTURES is always defined under macOS, but is
# empty if not explicitly specified, so do _not_ use if(DEFINED ...) here.
if(CMAKE_OSX_ARCHITECTURES)
foreach(osx_arch IN LISTS CMAKE_OSX_ARCHITECTURES)
# Determine the matching CEF platform name.
if(${osx_arch} STREQUAL "arm64")
set(CEF_PLATFORM "macosarm64")
elseif(${osx_arch} STREQUAL "x86_64")
set(CEF_PLATFORM "macosx64")
else()
message(FATAL_ERROR "Building CEF for macOS architecture ${osx_arch} is not supported")
endif()
if(NOT first_cef_platform)
# Download/unpack CEF files in the root directory and remember
# that we did it by setting this variable.
set(first_cef_platform ${CEF_PLATFORM})
else()
list(APPEND other_cef_platforms ${CEF_PLATFORM})
# Use different subdirectories for the other architectures.
set(CEF_DOWNLOAD_DIR "${CEF_DOWNLOAD_ROOT}/${CEF_PLATFORM}")
set(CEF_SOURCE_DIR "${CEF_SOURCE_ROOT}/${CEF_PLATFORM}")
set(CEF_BUILD_DIR "${CEF_BUILD_ROOT}/${CEF_PLATFORM}")
endif()
wx_download_cef(${CEF_PLATFORM})
endforeach()
# Now lipo all the binaries together unless this is a degenerate case
# in which CMAKE_OSX_ARCHITECTURES contains only one element.
if(other_cef_platforms)
set(cef_binaries
"cef_sandbox.a"
"Chromium Embedded Framework.framework/Chromium Embedded Framework"
"Chromium Embedded Framework.framework/Libraries/libEGL.dylib"
"Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib"
"Chromium Embedded Framework.framework/Libraries/libvk_swiftshader.dylib"
)
foreach(cef_bin_file IN LISTS cef_binaries)
set(lipo_command
lipo -create "Release/${cef_bin_file}"
)
foreach(cef_platform IN LISTS other_cef_platforms)
list(APPEND lipo_command "${cef_platform}/Release/${cef_bin_file}")
endforeach()
list(APPEND lipo_command "-output")
list(APPEND lipo_command "Release/${cef_bin_file}.tmp")
execute_process(
COMMAND ${lipo_command}
RESULT_VARIABLE result
WORKING_DIRECTORY ${CEF_SOURCE_ROOT}
)
if(result)
message(FATAL_ERROR "Running \"${lipo_command}\" in ${CEF_SOURCE_ROOT} failed: ${result}")
endif()
file(RENAME
"${CEF_SOURCE_ROOT}/Release/${cef_bin_file}.tmp"
"${CEF_SOURCE_ROOT}/Release/${cef_bin_file}"
)
endforeach()
# Special case of arch-specific v8 snapshot file.
foreach(cef_platform IN LISTS other_cef_platforms)
# This one uses the standard arch name instead of CEF-specific
# name used elsewhere just to make our life a bit more interesting.
if(${cef_platform} STREQUAL "macosarm64")
set(cef_arch "arm64")
elseif(${cef_platform} STREQUAL "macosx64")
set(cef_arch "x86_64")
else()
message(FATAL_ERROR "Uknown v8 arch for CEF platform ${cef_platform}")
endif()
file(COPY_FILE
"${CEF_SOURCE_ROOT}/${cef_platform}/Release/Chromium Embedded Framework.framework/Resources/v8_context_snapshot.${cef_arch}.bin"
"${CEF_SOURCE_ROOT}/Release/Resources"
)
endforeach()
# This file differs between the architectures, but has a fixed name, so
# we can only remove it. FWIW it is not present in CEF included in
# /Application/Google Chrome.app, so it's probably the right thing to do.
file(REMOVE "${CEF_SOURCE_ROOT}/Release/Chrome Embedded Framework.framework/Resources/snapshot_blob.bin")
endif()
else()
# Auto detect CEF platform.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(CMAKE_SIZEOF_VOID_P LESS 8)
message(FATAL_ERROR "Unsupported macOS system")
else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(CEF_PLATFORM "macosarm64")
else()
set(CEF_PLATFORM "macosx64")
endif()
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(CMAKE_SIZEOF_VOID_P LESS 8)
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm")
set(CEF_PLATFORM "linuxarm")
else()
message(FATAL_ERROR "Unsupported Linux system")
endif()
else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(CEF_PLATFORM "linuxarm64")
else()
set(CEF_PLATFORM "linux64")
endif()
endif()
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if(CMAKE_SIZEOF_VOID_P LESS 8)
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm")
message(FATAL_ERROR "Unsupported Windows system")
else()
set(CEF_PLATFORM "windows32")
endif()
else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
set(CEF_PLATFORM "windowsarm64")
else()
set(CEF_PLATFORM "windows64")
endif()
endif()
else()
message(FATAL_ERROR "Unsupported CEF system")
endif()
wx_download_cef(${CEF_PLATFORM})
endif()
set(CEF_ROOT ${CEF_SOURCE_ROOT} CACHE PATH "CEF Binary Root directory" FORCE)
endif()
# CEF settings
set(USE_ATL OFF) # Disable usage of ATL in CEF
set(USE_SANDBOX OFF) # Disable usage of sandbox on windows
if(MSVC)
if(wxBUILD_USE_STATIC_RUNTIME)
set(CEF_RUNTIME_LIBRARY_FLAG "/MT" CACHE STRING "" FORCE)
else()
set(CEF_RUNTIME_LIBRARY_FLAG "/MD" CACHE STRING "" FORCE)
endif()
endif()
set(_saved_CMAKE_MESSAGE_LOG_LEVEL ${CMAKE_MESSAGE_LOG_LEVEL})
set(CEF_SHOW_RESULTS FALSE CACHE BOOL "Show CEF configuration results")
if(CEF_SHOW_RESULTS)
if(CMAKE_OSX_ARCHITECTURES)
# This is only used for the summary shown if CEF_SHOW_RESULTS is on.
set(PROJECT_ARCH ${CMAKE_OSX_ARCHITECTURES})
endif()
else()
set(CMAKE_MESSAGE_LOG_LEVEL ERROR)
endif()
# prevent libcef_dll_wrapper from creating only Release and Debug configs
# in multi-configuration generators
# variable_watch does not seem to be scoped, and we can't unset it, or replace it,
# and we don't care if it is changed later, so use enable_guard
# to stop the guard from working after libcef_dll_wrapper is added.
set(enable_guard 1)
macro(set_readonly VAR)
set(_${VAR}_ ${${VAR}})
variable_watch(${VAR} readonly_guard)
endmacro()
macro(readonly_guard VAR access value)
if (enable_guard AND "${access}" STREQUAL "MODIFIED_ACCESS" AND NOT "${value}" STREQUAL "${_${VAR}_}")
set(${VAR} ${_${VAR}_})
message(WARNING "Blocked changing variable '${VAR}' to '${value}', reset to '${${VAR}}'")
endif()
endmacro()
set_readonly(CMAKE_CONFIGURATION_TYPES)
# Prevent CEF from resetting CMAKE_OSX_ARCHITECTURES if it explicitly set, this
# is required in order to allow building universal binaries.
if(CMAKE_OSX_ARCHITECTURES)
set_readonly(CMAKE_OSX_ARCHITECTURES)
endif()
add_subdirectory(${CEF_ROOT} ${CEF_BUILD_ROOT} EXCLUDE_FROM_ALL)
set(enable_guard 0)
set(CMAKE_MESSAGE_LOG_LEVEL ${_saved_CMAKE_MESSAGE_LOG_LEVEL})
set_target_properties(libcef_dll_wrapper PROPERTIES
FOLDER "Third Party Libraries"
OUTPUT_NAME "libcef_dll_wrapper"
)
if(NOT MSVC)
target_compile_options(libcef_dll_wrapper PRIVATE "-Wno-extra")
endif()
# libcef_dll_wrapper only sets properties for Debug and Release.
# Extract the release options/flags and apply them to RelWithDebInfo and MinSizeRel.
macro(rls_flags property)
get_target_property(props libcef_dll_wrapper ${property})
string(FIND "${props}" "$<CONFIG:Release>:" index)
math(EXPR index "${index}+18")
string(SUBSTRING "${props}" ${index} -1 props)
string(FIND "${props}" ">" index)
string(SUBSTRING "${props}" 0 ${index} props)
if ("${property}" STREQUAL "COMPILE_DEFINITIONS")
target_compile_definitions(libcef_dll_wrapper PRIVATE
$<$<CONFIG:RelWithDebInfo>:${props}>
$<$<CONFIG:MinSizeRel>:${props}>
)
else()
target_compile_options(libcef_dll_wrapper PRIVATE
$<$<CONFIG:RelWithDebInfo>:${props}>
$<$<CONFIG:MinSizeRel>:${props}>
)
endif()
endmacro()
rls_flags(COMPILE_DEFINITIONS)
rls_flags(COMPILE_OPTIONS)
add_library(libcef SHARED IMPORTED GLOBAL)
if(APPLE)
set_target_properties(libcef PROPERTIES
IMPORTED_LOCATION "${CEF_ROOT}/Release/Chromium Embedded Framework.framework/Chromium Embedded Framework"
)
else()
set_target_properties(libcef PROPERTIES
IMPORTED_LOCATION "${CEF_ROOT}/Release/libcef${CMAKE_SHARED_LIBRARY_SUFFIX}"
IMPORTED_IMPLIB "${CEF_ROOT}/Release/libcef${CMAKE_IMPORT_LIBRARY_SUFFIX}"
)
endif()
wx_install(TARGETS libcef_dll_wrapper
EXPORT wxWidgetsTargets
ARCHIVE DESTINATION "lib${GEN_EXPR_DIR}${wxPLATFORM_LIB_DIR}"
)
wx_lib_include_directories(wxwebview PRIVATE ${CEF_ROOT})
wx_add_dependencies(wxwebview libcef_dll_wrapper)
wx_lib_link_libraries(wxwebview PUBLIC libcef libcef_dll_wrapper)
mark_as_advanced(USE_ATL)
mark_as_advanced(USE_SANDBOX)
mark_as_advanced(OPTION_USE_ARC)
mark_as_advanced(CEF_ROOT)
mark_as_advanced(CEF_SHOW_RESULTS)
mark_as_advanced(CEF_DEBUG_INFO_FLAG)
mark_as_advanced(CEF_RUNTIME_LIBRARY_FLAG)

View File

@@ -0,0 +1,28 @@
#############################################################################
# Name: build/cmake/lib/webview_chromium/cef_download.cmake.in
# Purpose: CMakeLists.txt template to download CEF
# Author: Tobias Taschner
# Created: 2018-02-19
# Copyright: (c) 2018 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
cmake_minimum_required(VERSION 3.5)
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()
project(cef-download NONE)
include(ExternalProject)
ExternalProject_Add(cef
URL ${CEF_URL}
URL_HASH SHA1=${CEF_SHA1}
SOURCE_DIR "${CEF_SOURCE_DIR}"
BINARY_DIR "${CEF_BUILD_DIR}"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)

View File

@@ -0,0 +1,35 @@
#############################################################################
# Name: build/cmake/lib/webview_chromium/cef_update_version_info.cmake
# Purpose: Script to update
# Author: Tobias Taschner
# Created: 2018-02-03
# Copyright: (c) 2018 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
# Use this script to automatically update cef_version_info.cmake
#
# Run this script with cmake script mode
# cmake -D CEF_VERSION=x.y.z+b -P cef_update_version_info.cmake
if(NOT DEFINED CEF_VERSION)
message(FATAL_ERROR "CEF_VERSION not defined")
endif()
set(CEF_BASE_URL "https://cef-builds.spotifycdn.com/cef_binary_")
set(CEF_DISTRIBUTION "_minimal")
set(CEF_FILE_EXT ".tar.bz2")
set(sha_file ${CMAKE_BINARY_DIR}/__info_sha.txt)
foreach(platform windows64 windowsarm64 windows32 macosx64 macosarm64 linux64 linuxarm64 linuxarm)
file(DOWNLOAD "${CEF_BASE_URL}${CEF_VERSION}_${platform}${CEF_DISTRIBUTION}${CEF_FILE_EXT}.sha1" "${sha_file}")
file(READ "${sha_file}" CEF_SHA1_${platform})
endforeach()
file(REMOVE ${sha_file})
configure_file(
cef_version_info.cmake.in
cef_version_info.cmake
@ONLY NEWLINE_STYLE LF
)

View File

@@ -0,0 +1,27 @@
#############################################################################
# Name: build/cmake/lib/webview_chromium/cef_version_info.cmake
# Purpose: CMake file CEF version information
# Author: Tobias Taschner
# Created: 2018-02-03
# Copyright: (c) 2018 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
#
# DO NOT MODIFY MANUALLY
#
# To update this file, use cef_update_version_info.cmake
set(CEF_BASE_URL "https://cef-builds.spotifycdn.com/cef_binary_")
set(CEF_VERSION "122.1.10+gc902316+chromium-122.0.6261.112")
set(CEF_DISTRIBUTION "_minimal")
set(CEF_FILE_EXT ".tar.bz2")
set(CEF_SHA1_macosarm64 "d299d467508b970e7227c4d8171985a9942b08a7")
set(CEF_SHA1_macosx64 "a71cef7ec7d8230fcc24d97a09c023e77b2b8608")
set(CEF_SHA1_linuxarm "ba3bb572064da216d2a6e3aafbbcda5a96f6f204")
set(CEF_SHA1_linuxarm64 "700404f6972200eee834e1f94b42b4df4aefe266")
set(CEF_SHA1_linux64 "696f09deb86fd7a220004101521e07381b7dec4b")
set(CEF_SHA1_windows32 "850c8f5ff35ad36c447e2492292dc965d4f13ebc")
set(CEF_SHA1_windowsarm64 "a1e318fe1dc56d9e4014bf1e3b283a2ee70915d0")
set(CEF_SHA1_windows64 "93e6ccdd093da457ae98fdf63f84becc2388bdb8")

View File

@@ -0,0 +1,27 @@
#############################################################################
# Name: build/cmake/lib/webview_chromium/cef_version_info.cmake
# Purpose: CMake file CEF version information
# Author: Tobias Taschner
# Created: 2018-02-03
# Copyright: (c) 2018 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
#
# DO NOT MODIFY MANUALLY
#
# To update this file, use cef_update_version_info.cmake
set(CEF_BASE_URL "@CEF_BASE_URL@")
set(CEF_VERSION "@CEF_VERSION@")
set(CEF_DISTRIBUTION "@CEF_DISTRIBUTION@")
set(CEF_FILE_EXT "@CEF_FILE_EXT@")
set(CEF_SHA1_macosarm64 "@CEF_SHA1_macosarm64@")
set(CEF_SHA1_macosx64 "@CEF_SHA1_macosx64@")
set(CEF_SHA1_linuxarm "@CEF_SHA1_linuxarm@")
set(CEF_SHA1_linuxarm64 "@CEF_SHA1_linuxarm64@")
set(CEF_SHA1_linux64 "@CEF_SHA1_linux64@")
set(CEF_SHA1_windows32 "@CEF_SHA1_windows32@")
set(CEF_SHA1_windowsarm64 "@CEF_SHA1_windowsarm64@")
set(CEF_SHA1_windows64 "@CEF_SHA1_windows64@")

View File

@@ -0,0 +1,13 @@
#############################################################################
# Name: build/cmake/lib/xml/CMakeLists.txt
# Purpose: CMake file for xml library
# Author: Tobias Taschner
# Created: 2016-09-20
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(XML_FILES XML)
wx_add_library(wxxml IS_BASE ${XML_FILES})
wx_lib_link_libraries(wxxml PRIVATE ${EXPAT_LIBRARIES})
wx_lib_include_directories(wxxml ${EXPAT_INCLUDE_DIRS})

View File

@@ -0,0 +1,13 @@
#############################################################################
# Name: build/cmake/lib/xrc/CMakeLists.txt
# Purpose: CMake file for xrc library
# Author: Tobias Taschner
# Created: 2016-10-03
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
wx_append_sources(XRC_FILES XRC)
wx_add_library(wxxrc ${XRC_FILES})
wx_lib_link_libraries(wxxrc PRIVATE wxhtml wxxml)

View File

@@ -0,0 +1,43 @@
#############################################################################
# Name: build/cmake/lib/zlib.cmake
# Purpose: Use external or internal zlib
# Author: Tobias Taschner
# Created: 2016-09-21
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
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
src/zlib/crc32.c
src/zlib/deflate.c
src/zlib/gzclose.c
src/zlib/gzlib.c
src/zlib/gzread.c
src/zlib/gzwrite.c
src/zlib/infback.c
src/zlib/inffast.c
src/zlib/inflate.c
src/zlib/inftrees.c
src/zlib/trees.c
src/zlib/uncompr.c
src/zlib/zutil.c
)
if(WIN32)
# Define this to get rid of many warnings about using open(),
# read() and other POSIX functions in zlib code. This is much
# more convenient than having to modify it to avoid them.
target_compile_definitions(wxzlib PRIVATE _CRT_NONSTDC_NO_WARNINGS)
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(wxzlib PRIVATE -Wno-deprecated-non-prototype)
endif()
set(ZLIB_LIBRARIES wxzlib)
set(ZLIB_INCLUDE_DIRS ${wxSOURCE_DIR}/src/zlib)
elseif(wxUSE_ZLIB)
find_package(ZLIB REQUIRED)
endif()

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