wxWidgets/build/cmake
Maarten Bent 9732a2d99f CMake: Allow to toggle between static and dynamic MSVC runtime
After enabling wxBUILD_USE_STATIC_RUNTIME it cannot be disabled again
(except by manually modifying CMAKE_C*_FLAGS_*). Improve this by setting
the build flags to their default value when wxBUILD_USE_STATIC_RUNTIME
is disabled.

Closes https://github.com/wxWidgets/wxWidgets/pull/1338
2019-06-07 16:39:16 +02:00
..
demos CMake: Add headers of demos and drawing test 2018-09-22 14:44:08 +02:00
lib Modify build system files to use PlatWXcocoa.mm 2019-03-20 00:12:41 -05:00
modules CMake: Improve finding Iconv 2018-12-12 21:27:57 +01:00
samples CMake: Fix html zip sample dependency check 2018-12-12 20:28:41 +01:00
tests Update other test build files by hand for the new STC test 2019-03-20 17:07:56 -05:00
utils CMake: Install wxrc on all platforms, closes #18289 2018-12-12 20:28:40 +01:00
config.cmake CMake: use the target property OUTPUT_NAME instead of LOCATION in wx_get_dependencies 2019-01-21 18:19:39 +03:00
files.cmake Remove obsolete wxOSX/Carbon listctrl header 2019-05-04 15:03:20 +02:00
functions.cmake Fix include directories for built-in libraries in CMake build 2019-05-10 01:37:26 +02:00
init.cmake CMake: Allow to toggle between static and dynamic MSVC runtime 2019-06-07 16:39:16 +02:00
install.cmake CMake: Fix installation include directory 2018-12-06 22:39:41 +01:00
main.cmake CMake: correctly detect 64bit for MinGW compilers 2018-05-17 19:30:59 +02:00
options.cmake Add wxUSE_WINSOCK2 wxMSW option to include winsock2.h 2019-01-28 00:34:34 +01:00
policies.cmake CMake: Silence OpenGL policy warning 2018-12-02 17:45:34 +01:00
README.md Fix typos and whitespace in CMake files. 2018-08-17 20:00:47 +02:00
setup.cmake CMake: Improve finding Iconv 2018-12-12 21:27:57 +01:00
setup.h.in Add wxUSE_WINSOCK2 wxMSW option to include winsock2.h 2019-01-28 00:34:34 +01:00
source_groups.cmake Add CMake build system 2017-01-03 20:53:10 +01:00
toolkit.cmake Support WXQT in CMake 2018-09-30 17:23:57 +02:00
uninstall.cmake.in CMake: Improve installation on Linux 2018-12-02 17:45:43 +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