Skip to content

Commit 9264b7c

Browse files
committed
Add missing files
1 parent 6e075a7 commit 9264b7c

35 files changed

+517491
-0
lines changed

wxWidgets/build/cmake/build.cfg.in

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
WXVER_MAJOR=@wxMAJOR_VERSION@
2+
WXVER_MINOR=@wxMINOR_VERSION@
3+
WXVER_RELEASE=@wxRELEASE_NUMBER@
4+
BUILD=@wxBUILD@
5+
MONOLITHIC=@wxBUILD_MONOLITHIC_bf@
6+
SHARED=@wxBUILD_SHARED_bf@
7+
UNICODE=@wxUSE_UNICODE_bf@
8+
TOOLKIT=@wxBUILD_TOOLKIT_UPPER@
9+
TOOLKIT_VERSION=@wxTOOLKIT_VERSION@
10+
WXUNIV=@wxUNIV@
11+
CFG=@wxCFG@
12+
VENDOR=@wxBUILD_VENDOR@
13+
OFFICIAL_BUILD=@wxOFFICIAL_BUILD@
14+
DEBUG_FLAG=@wxDEBUG_FLAG@
15+
DEBUG_INFO=@wxDEBUG_INFO@
16+
RUNTIME_LIBS=@wxRUNTIME_LIBS@
17+
USE_EXCEPTIONS=@wxUSE_EXCEPTIONS_bf@
18+
USE_RTTI=@wxUSE_RTTI@
19+
USE_THREADS=@wxUSE_THREADS_bf@
20+
USE_AUI=@wxUSE_AUI_bf@
21+
USE_GUI=@wxUSE_GUI_bf@
22+
USE_HTML=@wxUSE_HTML_bf@
23+
USE_MEDIA=@wxUSE_MEDIA_bf@
24+
USE_OPENGL=@wxUSE_OPENGL_bf@
25+
USE_QA=@wxUSE_DEBUGREPORT_bf@
26+
USE_PROPGRID=@wxUSE_PROPGRID_bf@
27+
USE_RIBBON=@wxUSE_RIBBON_bf@
28+
USE_RICHTEXT=@wxUSE_RICHTEXT_bf@
29+
USE_STC=@wxUSE_STC_bf@
30+
USE_WEBVIEW=@wxUSE_WEBVIEW_bf@
31+
USE_XRC=@wxUSE_XRC_bf@
32+
COMPILER=@wxCOMPILER_PREFIX@
33+
COMPILER_VERSION=@wxCOMPILER_VERSION@
34+
CC=@wxCC@
35+
CXX=@wxCXX@
36+
CFLAGS=@wxCFLAGS@
37+
CPPFLAGS=@wxCPPFLAGS@
38+
CXXFLAGS=@wxCXXFLAGS@
39+
LDFLAGS=@wxLDFLAGS@
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#############################################################################
2+
# Name: build/cmake/build_cfg.cmake
3+
# Purpose: Create and configure build.cfg
4+
# Author: Maarten Bent
5+
# Created: 2021-06-17
6+
# Copyright: (c) 2021 wxWidgets development team
7+
# Licence: wxWindows licence
8+
#############################################################################
9+
10+
macro(wx_buildfile_var var)
11+
# convert TRUE/FALSE to 1/0, add _bf suffix for use in build.cfg
12+
if(${var})
13+
set(${var}_bf 1)
14+
else()
15+
set(${var}_bf 0)
16+
endif()
17+
endmacro()
18+
19+
wx_buildfile_var(wxBUILD_MONOLITHIC)
20+
wx_buildfile_var(wxBUILD_SHARED)
21+
wx_buildfile_var(wxUSE_UNICODE)
22+
wx_buildfile_var(wxUSE_EXCEPTIONS)
23+
wx_buildfile_var(wxUSE_THREADS)
24+
wx_buildfile_var(wxUSE_AUI)
25+
wx_buildfile_var(wxUSE_GUI)
26+
wx_buildfile_var(wxUSE_HTML)
27+
wx_buildfile_var(wxUSE_MEDIACTRL)
28+
wx_buildfile_var(wxUSE_OPENGL)
29+
wx_buildfile_var(wxUSE_DEBUGREPORT)
30+
wx_buildfile_var(wxUSE_PROPGRID)
31+
wx_buildfile_var(wxUSE_RIBBON)
32+
wx_buildfile_var(wxUSE_RICHTEXT)
33+
wx_buildfile_var(wxUSE_STC)
34+
wx_buildfile_var(wxUSE_WEBVIEW)
35+
wx_buildfile_var(wxUSE_XRC)
36+
37+
if(wxUSE_NO_RTTI)
38+
set(wxUSE_RTTI 0)
39+
else()
40+
set(wxUSE_RTTI 1)
41+
endif()
42+
if(wxBUILD_STRIPPED_RELEASE)
43+
set(wxDEBUG_INFO 0)
44+
else()
45+
set(wxDEBUG_INFO 1)
46+
endif()
47+
if(wxBUILD_USE_STATIC_RUNTIME)
48+
set(wxRUNTIME_LIBS "static")
49+
else()
50+
set(wxRUNTIME_LIBS "dynamic")
51+
endif()
52+
53+
set(wxDEBUG_FLAG ${wxBUILD_DEBUG_LEVEL})
54+
get_filename_component(wxCC ${CMAKE_C_COMPILER} NAME_WE)
55+
get_filename_component(wxCXX ${CMAKE_CXX_COMPILER} NAME_WE)
56+
set(wxCFLAGS ${CMAKE_C_FLAGS})
57+
set(wxCPPFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")
58+
set(wxCXXFLAGS ${CMAKE_CXX_FLAGS})
59+
set(wxLDFLAGS ${CMAKE_EXE_LINKER_FLAGS})
60+
61+
# These are currently not used by CMake
62+
set(wxCFG "")
63+
set(wxUNIV 0)
64+
set(wxOFFICIAL_BUILD 0)
65+
set(wxCOMPILER_VERSION "")
66+
67+
set(wxBUILD "release")
68+
configure_file(build/cmake/build.cfg.in ${wxBUILD_FILE})
69+
70+
set(wxBUILD "debug")
71+
configure_file(build/cmake/build.cfg.in ${wxBUILD_FILE_DEBUG})
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#############################################################################
2+
# Name: build/cmake/lib/nanosvg.cmake
3+
# Purpose: Use external or internal nanosvg lib
4+
# Author: Tamas Meszaros, Maarten Bent
5+
# Created: 2022-05-05
6+
# Copyright: (c) 2022 wxWidgets development team
7+
# Licence: wxWindows licence
8+
#############################################################################
9+
10+
if(wxUSE_NANOSVG STREQUAL "builtin")
11+
set(wxUSE_NANOSVG_EXTERNAL 0 PARENT_SCOPE)
12+
elseif(wxUSE_NANOSVG)
13+
set(wxUSE_NANOSVG_EXTERNAL 1 PARENT_SCOPE)
14+
15+
set(NANOSVG_LIBRARIES )
16+
set(NANOSVG_INCLUDE_DIRS )
17+
set(wxUSE_NANOSVG_EXTERNAL_ENABLE_IMPL TRUE)
18+
19+
find_package(NanoSVG REQUIRED)
20+
21+
foreach(TARGETNAME NanoSVG::nanosvg NanoSVG::nanosvgrast unofficial::nanosvg)
22+
if(NOT TARGET ${TARGETNAME})
23+
continue()
24+
endif()
25+
26+
list(APPEND NANOSVG_LIBRARIES ${TARGETNAME})
27+
get_target_property(svg_incl_dir ${TARGETNAME} INTERFACE_INCLUDE_DIRECTORIES)
28+
if(svg_incl_dir)
29+
list(APPEND NANOSVG_INCLUDE_DIRS ${svg_incl_dir})
30+
endif()
31+
32+
get_target_property(svg_lib_d ${TARGETNAME} IMPORTED_LOCATION_DEBUG)
33+
get_target_property(svg_lib_r ${TARGETNAME} IMPORTED_LOCATION_RELEASE)
34+
get_target_property(svg_lib ${TARGETNAME} IMPORTED_LOCATION)
35+
if(svg_lib_d OR svg_lib_r OR svg_lib)
36+
set(wxUSE_NANOSVG_EXTERNAL_ENABLE_IMPL FALSE)
37+
endif()
38+
endforeach()
39+
endif()
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# - Try to find Cairo
2+
# Once done, this will define
3+
#
4+
# CAIRO_FOUND - system has Cairo
5+
# CAIRO_INCLUDE_DIRS - the Cairo include directories
6+
# CAIRO_LIBRARIES - link these to use Cairo
7+
#
8+
# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
9+
#
10+
# Redistribution and use in source and binary forms, with or without
11+
# modification, are permitted provided that the following conditions
12+
# are met:
13+
# 1. Redistributions of source code must retain the above copyright
14+
# notice, this list of conditions and the following disclaimer.
15+
# 2. Redistributions in binary form must reproduce the above copyright
16+
# notice, this list of conditions and the following disclaimer in the
17+
# documentation and/or other materials provided with the distribution.
18+
#
19+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
20+
# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21+
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22+
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
23+
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25+
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
26+
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27+
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28+
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29+
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30+
31+
FIND_PACKAGE(PkgConfig)
32+
PKG_CHECK_MODULES(PC_CAIRO QUIET cairo)
33+
34+
FIND_PATH(CAIRO_INCLUDE_DIRS
35+
NAMES cairo.h
36+
HINTS ${PC_CAIRO_INCLUDEDIR}
37+
${PC_CAIRO_INCLUDE_DIRS}
38+
PATH_SUFFIXES cairo
39+
)
40+
41+
FIND_LIBRARY(CAIRO_LIBRARIES
42+
NAMES cairo
43+
HINTS ${PC_CAIRO_LIBDIR}
44+
${PC_CAIRO_LIBRARY_DIRS}
45+
)
46+
47+
IF (CAIRO_INCLUDE_DIRS)
48+
IF (EXISTS "${CAIRO_INCLUDE_DIRS}/cairo-version.h")
49+
FILE(READ "${CAIRO_INCLUDE_DIRS}/cairo-version.h" CAIRO_VERSION_CONTENT)
50+
51+
STRING(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
52+
SET(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}")
53+
54+
STRING(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
55+
SET(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}")
56+
57+
STRING(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
58+
SET(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}")
59+
60+
SET(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}")
61+
ENDIF ()
62+
ENDIF ()
63+
64+
# FIXME: Should not be needed anymore once we start depending on CMake 2.8.3
65+
SET(VERSION_OK TRUE)
66+
IF (Cairo_FIND_VERSION)
67+
IF (Cairo_FIND_VERSION_EXACT)
68+
IF ("${Cairo_FIND_VERSION}" VERSION_EQUAL "${CAIRO_VERSION}")
69+
# FIXME: Use IF (NOT ...) with CMake 2.8.2+ to get rid of the ELSE block
70+
ELSE ()
71+
SET(VERSION_OK FALSE)
72+
ENDIF ()
73+
ELSE ()
74+
IF ("${Cairo_FIND_VERSION}" VERSION_GREATER "${CAIRO_VERSION}")
75+
SET(VERSION_OK FALSE)
76+
ENDIF ()
77+
ENDIF ()
78+
ENDIF ()
79+
80+
INCLUDE(FindPackageHandleStandardArgs)
81+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo DEFAULT_MSG CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES VERSION_OK)
82+
83+
mark_as_advanced(CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# - Try to find gspell
2+
# Once done this will define
3+
#
4+
# GSPELL_FOUND - system has gspell
5+
# GSPELL_INCLUDE_DIRS - The include directory to use for the gspell headers
6+
# GSPELL_LIBRARIES - Link these to use gspell
7+
8+
find_package(PkgConfig)
9+
pkg_check_modules(PC_GSPELL QUIET gspell-1)
10+
11+
find_path(GSPELL_INCLUDE_DIRS
12+
NAMES gspell/gspell.h
13+
HINTS ${PC_GSPELL_INCLUDEDIR}
14+
${PC_GSPELL_INCLUDE_DIRS}
15+
)
16+
17+
find_library(GSPELL_LIBRARIES
18+
NAMES gspell-1
19+
HINTS ${PC_GSPELL_LIBDIR}
20+
${PC_GSPELL_LIBRARY_DIRS}
21+
)
22+
23+
pkg_check_modules(PC_ENCHANT QUIET enchant-2 enchant)
24+
find_path(ENCHANT_INCLUDE_DIRS
25+
NAMES enchant.h
26+
HINTS ${PC_ENCHANT_INCLUDEDIR}
27+
${PC_ENCHANT_INCLUDE_DIRS}
28+
PATH_SUFFIXES enchant-2 enchant
29+
)
30+
31+
include(FindPackageHandleStandardArgs)
32+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GSPELL DEFAULT_MSG GSPELL_INCLUDE_DIRS ENCHANT_INCLUDE_DIRS GSPELL_LIBRARIES)
33+
34+
if(GSPELL_FOUND)
35+
set(GSPELL_INCLUDE_DIRS ${GSPELL_INCLUDE_DIRS} ${ENCHANT_INCLUDE_DIRS})
36+
endif()
37+
38+
mark_as_advanced(
39+
GSPELL_INCLUDE_DIRS
40+
GSPELL_LIBRARIES
41+
ENCHANT_INCLUDE_DIRS
42+
)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# - Try to find GTK Print
2+
# Provide the GTK version as argument
3+
# Once done this will define
4+
#
5+
# GTKPRINT_FOUND - system has GTK Print
6+
# GTKPRINT_INCLUDE_DIRS - The include directory to use for the GTK Print headers
7+
8+
if(NOT GTKPRINT_FIND_VERSION EQUAL GTKPRINT_FIND_VERSION_USED)
9+
unset(GTKPRINT_FOUND CACHE)
10+
unset(GTKPRINT_INCLUDE_DIRS CACHE)
11+
unset(GTKPRINT_FIND_VERSION_USED CACHE)
12+
endif()
13+
set(GTKPRINT_FIND_VERSION_USED "${GTKPRINT_FIND_VERSION}" CACHE INTERNAL "")
14+
15+
if(GTKPRINT_FIND_VERSION VERSION_LESS 3.0)
16+
set(GTKPRINT_LIB_NAME "gtk+-unix-print-2.0")
17+
else()
18+
set(GTKPRINT_LIB_NAME "gtk+-unix-print-3.0")
19+
endif()
20+
21+
find_package(PkgConfig)
22+
pkg_check_modules(PC_GTKPRINT QUIET ${GTKPRINT_LIB_NAME})
23+
24+
find_path(GTKPRINT_INCLUDE_DIRS
25+
NAMES gtk/gtkunixprint.h
26+
HINTS ${PC_GTKPRINT_INCLUDEDIR}
27+
${PC_GTKPRINT_INCLUDE_DIRS}
28+
)
29+
30+
include(FindPackageHandleStandardArgs)
31+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTKPRINT DEFAULT_MSG GTKPRINT_INCLUDE_DIRS)
32+
33+
mark_as_advanced(GTKPRINT_INCLUDE_DIRS)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Find the PCRE2 headers and libraries.
2+
#
3+
# Optionally define the following variables:
4+
# PCRE2_CODE_UNIT_WIDTH - code unit width: 8 (default), 16 or 32 bit.
5+
#
6+
# This module defines the following variables:
7+
# PCRE2_FOUND - true if PCRE2 is found.
8+
# PCRE2_INCLUDE_DIRS - list of PCRE2 include directories.
9+
# PCRE2_LIBRARIES - list of PCRE2 libraries.
10+
11+
if(NOT PCRE2_CODE_UNIT_WIDTH)
12+
set(PCRE2_CODE_UNIT_WIDTH 8)
13+
endif()
14+
15+
if(NOT PCRE2_CODE_UNIT_WIDTH EQUAL PCRE2_CODE_UNIT_WIDTH_USED)
16+
unset(PCRE2_CODE_UNIT_WIDTH_USED CACHE)
17+
unset(PCRE2_FOUND CACHE)
18+
unset(PCRE2_INCLUDE_DIRS CACHE)
19+
unset(PCRE2_LIBRARIES CACHE)
20+
endif()
21+
22+
set(PCRE2_CODE_UNIT_WIDTH_USED "${PCRE2_CODE_UNIT_WIDTH}" CACHE INTERNAL "")
23+
24+
25+
find_package(PkgConfig QUIET)
26+
pkg_check_modules(PC_PCRE2 QUIET libpcre2-${PCRE2_CODE_UNIT_WIDTH})
27+
28+
find_path(PCRE2_INCLUDE_DIRS
29+
NAMES pcre2.h
30+
HINTS ${PC_PCRE2_INCLUDEDIR}
31+
${PC_PCRE2_INCLUDE_DIRS}
32+
)
33+
34+
find_library(PCRE2_LIBRARIES
35+
NAMES pcre2-${PCRE2_CODE_UNIT_WIDTH}
36+
HINTS ${PC_PCRE2_LIBDIR}
37+
${PC_PCRE2_LIBRARY_DIRS}
38+
)
39+
40+
include(FindPackageHandleStandardArgs)
41+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2 REQUIRED_VARS PCRE2_LIBRARIES PCRE2_INCLUDE_DIRS VERSION_VAR PC_PCRE2_VERSION)
42+
43+
mark_as_advanced(PCRE2_LIBRARIES PCRE2_INCLUDE_DIRS)

0 commit comments

Comments
 (0)