File: main.cmake

package info (click to toggle)
wxpython4.0 4.2.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 221,752 kB
  • sloc: cpp: 962,555; python: 230,573; ansic: 170,731; makefile: 51,756; sh: 9,342; perl: 1,564; javascript: 584; php: 326; xml: 200
file content (95 lines) | stat: -rw-r--r-- 3,481 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#############################################################################
# Name:        build/cmake/main.cmake
# Purpose:     Main CMake file
# Author:      Tobias Taschner
# Created:     2016-09-20
# Copyright:   (c) 2016 wxWidgets development team
# Licence:     wxWindows licence
#############################################################################

list(APPEND CMAKE_MODULE_PATH "${wxSOURCE_DIR}/build/cmake/modules")

file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX)

include(build/cmake/files.cmake)            # Files list
include(build/cmake/source_groups.cmake)    # Source group definitions
include(build/cmake/functions.cmake)        # wxWidgets functions
include(build/cmake/toolkit.cmake)          # Platform/toolkit settings
include(build/cmake/options.cmake)          # User options
include(build/cmake/init.cmake)             # Init various global build vars
include(build/cmake/pch.cmake)              # Precompiled header support
include(build/cmake/locale.cmake)           # Locale files

add_subdirectory(build/cmake/lib libs)
add_subdirectory(build/cmake/utils utils)

if(wxBUILD_SAMPLES)
    add_subdirectory(build/cmake/samples samples)
endif()

if(wxBUILD_TESTS)
    enable_testing()
    add_subdirectory(build/cmake/tests tests)
endif()

if(wxBUILD_DEMOS)
    add_subdirectory(build/cmake/demos demos)
endif()

if(wxBUILD_BENCHMARKS)
    add_subdirectory(build/cmake/benchmarks benchmarks)
endif()

if(NOT wxBUILD_CUSTOM_SETUP_HEADER_PATH)
    # Write setup.h after all variables are available
    include(build/cmake/setup.cmake)
endif()

if(WIN32_MSVC_NAMING)
    include(build/cmake/build_cfg.cmake)
endif()

if(NOT MSVC)
    # Write wx-config
    include(build/cmake/config.cmake)
endif()

# Install target support
include(build/cmake/install.cmake)

# Determine minimum required OS at runtime
set(wxREQUIRED_OS_DESC "${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR}")
if(MSVC OR MINGW OR CYGWIN)
    # Determine based on used toolkit
    if(MINGW OR CYGWIN OR (MSVC_VERSION LESS 1700) OR (CMAKE_VS_PLATFORM_TOOLSET MATCHES "_xp$") )
        # Visual Studio < 2012 and MinGW always create XP compatible binaries
        # XP Toolset is required since VS 2012
        set(wxREQUIRED_OS_DESC "Windows XP / Windows Server 2003")
    else()
        set(wxREQUIRED_OS_DESC "Windows Vista / Windows Server 2008")
    endif()
    if(wxPLATFORM_ARCH)
        wx_string_append(wxREQUIRED_OS_DESC " (${wxPLATFORM_ARCH} Edition)")
    endif()
elseif(APPLE AND NOT IPHONE)
    if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
        set(wxREQUIRED_OS_DESC "macOS ${CMAKE_OSX_DEPLOYMENT_TARGET} ${CMAKE_SYSTEM_PROCESSOR}")
    endif()
endif()

# Print configuration summary
wx_print_thirdparty_library_summary()

if(wxTOOLKIT_EXTRA)
    string(REPLACE ";" ", " wxTOOLKIT_DESC "${wxTOOLKIT_EXTRA}")
    set(wxTOOLKIT_DESC "with support for: ${wxTOOLKIT_DESC}")
endif()

message(STATUS "Configured wxWidgets ${wxVERSION} for ${CMAKE_SYSTEM_NAME}
    Min OS Version required at runtime:                ${wxREQUIRED_OS_DESC}
    Which GUI toolkit should wxWidgets use?            ${wxBUILD_TOOLKIT} ${wxTOOLKIT_VERSION} ${wxTOOLKIT_DESC}
    Should wxWidgets be compiled into single library?  ${wxBUILD_MONOLITHIC}
    Should wxWidgets be linked as a shared library?    ${wxBUILD_SHARED}
    Should wxWidgets support Unicode?                  ${wxUSE_UNICODE}
    What wxWidgets compatibility level should be used? ${wxBUILD_COMPATIBILITY}"
    )