-
Notifications
You must be signed in to change notification settings - Fork 8
/
internal.cmake
97 lines (81 loc) · 3.8 KB
/
internal.cmake
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
96
97
# Everything in this file is designed for internal testing by the maintainers.
# A lot of it is specifically designed to run on a maintainer's machine, and
# will almost certainly not work for anyone else. It's in this separate file
# in order to make the normal build process in CMakeLists.txt easier to read.
if (INTERNAL_BLD_FORK)
message(NOTICE "Building with forked wxWidgets libraries")
add_compile_definitions(INTERNAL_BLD_FORK)
set (widget_dir ../wxWidgets)
set (widget_cmake_dir ../wxWidgets/bld)
# Note that for INTERNAL_BLD_FORK with INTERNAL_BLD_WX_CMAKE to work, you must build the wxWidgets libraries yourself
# (add_subdirectory is not used in this case). You will need to set the cmake configuration for wxWidgets to build mondo
# static (including static runtime). Do *not* use this for an official release build as you cannot optimize or profile
# the wxWidgets library when using their cmake build.
# Alternaticely, you can use the following -- but that means creating the CMakeLists.txt file yourself (you can use the
# version in wxSnapshot as a template).
if (NOT INTERNAL_BLD_WX_CMAKE)
# This will build wxCLib and wxWidgets. wxCLib can NOT be used in a UNIX build
add_subdirectory(../wxWidgets/bld ../wxWidgets/bld/build)
endif()
# Using MSVC, this will build in lib/vc_x64_lib:
# wxmsw33ud wxexpatd wxjpegd wxpngd wxregexud wxscintillad wxtiffd wxzlibd
# add_subdirectory(../wxWidgets /../wxWidgets/bld)
if (MSVC)
# Both debug and release libraries are in this directory
if (INTERNAL_BLD_WX_CMAKE)
set (widget_lib_dir ../wxWidgets/bld/lib/vc_x64_lib)
else()
set (widget_lib_dir ../wxWidgets/bld/build)
endif()
else()
set (widget_lib_dir ../wxWidgets/bld/lib)
endif()
endif()
if (WIN32)
if (INTERNAL_BLD_FORK)
if (INTERNAL_BLD_WX_CMAKE)
set(setup_dir ${widget_cmake_dir}/lib/vc_x64_lib/mswud)
else()
set(setup_dir ${widget_cmake_dir}/win)
endif()
endif()
else()
if (INTERNAL_BLD_FORK)
set(setup_dir ${widget_cmake_dir}/lib/wx/include/gtk3-unicode-static-3.3)
endif()
endif()
if (INTERNAL_BLD_TESTING)
include( src/internal/wxui_internal.cmake ) # This will set ${wxui_internal} with a list of source files
# Note that setting the INTERNAL_BLD_TESTING doesn't just add these modules, it also enables the three assertion macros
# in a Release build, and may change other functionality as well. It should NEVER be used for a production build!
set (wxui_internal_files ${wxui_internal}
# These are always included in Debug builds, with INTERNAL_BLD_TESTING we also need them
# in Release builds.
$<$<CONFIG:Release>:src/internal/convert_img.cpp>
$<$<CONFIG:Release>:src/internal/debugsettings.cpp>
)
if (WIN32)
if (INTERNAL_BLD_WX_CMAKE)
# Both Debug and Release libaries are in the same location
set(fork_wxlibraries
$<$<CONFIG:Debug>:wxmsw33ud>
$<$<CONFIG:Debug>:wxexpatd>
$<$<CONFIG:Debug>:wxjpegd>
$<$<CONFIG:Debug>:wxpngd>
$<$<CONFIG:Debug>:wxregexud>
$<$<CONFIG:Debug>:wxscintillad>
$<$<CONFIG:Debug>:wxtiffd>
$<$<CONFIG:Debug>:wxzlibd>
$<$<CONFIG:Release>:wxmsw33u>
$<$<CONFIG:Release>:wxexpat>
$<$<CONFIG:Release>:wxjpeg>
$<$<CONFIG:Release>:wxpng>
$<$<CONFIG:Release>:wxregexu>
$<$<CONFIG:Release>:wxscintilla>
$<$<CONFIG:Release>:wxtiff>
$<$<CONFIG:Release>:wxzlib>
comctl32 Imm32 Shlwapi Version UxTheme
)
endif()
endif()
endif()