wxWidgets/build/cmake
Vadim Zeitlin c66c9c5ae6 Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets
Add CMake-based build system.

Merge the original branch without any changes except for resolving the
conflict due to moving the contents of .travis.yml to a separate file by
propagating the changes done in this file since then to the new script
and rerunning ./build/update-setup-h and ./build/cmake/update_files.py
to update the file lists changed in the meanwhile.

Closes https://github.com/wxWidgets/wxWidgets/pull/330
2017-12-09 15:09:47 +01:00
..
demos Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
lib Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
modules Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
samples Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
tests Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
utils
config.cmake
files.cmake Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
functions.cmake Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
init.cmake
install.cmake
main.cmake Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
options.cmake
policies.cmake
README.md Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
setup.cmake Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
setup.h.in Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +01:00
source_groups.cmake
toolkit.cmake
uninstall.cmake.in
update_files.py Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets 2017-12-09 15:09:47 +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 update_files.py from $(wx)/build/files
    • This file should never 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 defintions for the ´installanduninstall` target
  • init.cmake
    • Intializes 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
  • update_files.py
    • Creates files.cmake from $(wx)/build/files

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 seperate 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()
    • Defintions for trivial samples are included in CMakeLists.txt more complex samples might have a seperate .cmake file
  • tests
    • Defines build targets for all tests
  • utils
    • Defines build targets for all utilities