wxwidgets/build/cmake
Vadim Zeitlin 35c35c235e Remove wxUSE_STL which is not really used any longer
wxString is always based on std::[w]string since 2c0c727f49 (Remove wx
own wxStringImpl implementation, 2022-11-16) and all containers use
standard containers by default too now -- and there is a separate
wxUSE_STD_CONTAINERS for this anyhow.

The only remaining use of wxUSE_STL was as the default value for
wxUSE_STD_STRING_CONV_IN_WXSTRING option, but it's not really needed
for this neither, and this option can just be set to 0 by default.

Also add wxUSE_CHAR_CONV_IN_WXSTRING which can now be set to 0 too to
disable all unwanted implicit conversions (even "safe" ones, to wide
strings, in addition to the unsafe ones to narrow strings that could be
already disabled with wxUSE_UNSAFE_WXSTRING_CONV) to allow people who
don't want to have any implicit conversions at all to do it.

Keep --enable-stl configure option for compatibility, but warn if it is
used to tell people that it is not needed any longer.
2023-04-15 17:22:09 +02:00
..
benchmarks CMake: Add benchmarks 2021-02-07 20:34:42 +01:00
demos CMake: Use common function for adding samples, tests and demos 2021-01-19 19:58:46 +01:00
lib Fix MSW lib names for ARM64 with CMake build 2023-03-18 20:58:15 +01:00
modules CMake: Add GTK Printing support 2022-08-31 00:22:36 +02:00
samples Execute automated tests for wxPropertyGrid 2023-01-30 17:28:17 +01:00
tests Execute automated tests for wxPropertyGrid 2023-01-30 17:28:17 +01:00
utils Use DESTDIR when creating symlinks in CMake install 2022-07-24 17:06:12 +02:00
build.cfg.in Remove wxUSE_UNICODE option from CMake too 2022-10-27 19:43:30 +02:00
build_cfg.cmake Remove wxUSE_UNICODE option from CMake too 2022-10-27 19:43:30 +02:00
config.cmake CMake: Add libraries of imported targets to wx-config 2023-03-29 12:24:41 +02:00
files.cmake Remove src/msw/gdiobj.cpp which seems to have been never used 2023-04-12 17:28:45 +02:00
functions.cmake Merge branch 'cmake-large-files' of https://github.com/MaartenBent/wxWidgets 2023-03-12 14:01:39 +01:00
init.cmake Fix MSW lib names for ARM64 with CMake build 2023-03-18 20:58:15 +01:00
install.cmake Use DESTDIR when creating symlinks in CMake install 2022-07-24 17:06:12 +02:00
main.cmake Fix MSW lib names for ARM64 with CMake build 2023-03-18 20:58:15 +01:00
options.cmake Remove wxUSE_STL which is not really used any longer 2023-04-15 17:22:09 +02:00
pch.cmake CMake: Fix the minimum supported version 2022-04-16 15:35:49 +02:00
policies.cmake Fix linking with libcurl under MSW when using CMake 2020-12-26 15:56:56 +01:00
README.md Fix typos and whitespace in CMake files. 2018-08-17 20:00:47 +02:00
setup.cmake CMake: Enable large file support 2023-03-09 23:55:19 +01:00
setup.h.in Remove wxUSE_STL which is not really used any longer 2023-04-15 17:22:09 +02:00
source_groups.cmake CMake: Fix different identifier warning when building with XCode 2022-04-12 22:08:46 +02:00
toolkit.cmake Remove support for wxMotif 2022-10-16 16:39:56 +02:00
uninstall.cmake.in CMake: Improve installation on Linux 2018-12-02 17:45:43 +01:00
wxWidgetsConfig.cmake.in Fix MSW lib names for ARM64 with CMake build 2023-03-18 20:58:15 +01:00

This directory contains CMake files needed to build native build files for wxWidgets.

For building wxWidgets or using wxWidgets in your CMake project please see the CMake overview 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 it's 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
  • 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()
    • Includes the cotire module 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