-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
86 lines (75 loc) · 2.31 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.23)
project(wxUI VERSION 0.1)
# prevent In-source builds:
# https://towardsdatascience.com/7-tips-for-clean-cmake-scripts-c8d276587389
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "In-source build detected!")
endif()
include(GNUInstallDirs)
include(${PROJECT_SOURCE_DIR}/cmake/compiler.cmake)
#============================================================================
# Settable options
#============================================================================
option(WXUI_WITH_TESTS "Build tests." OFF)
option(WXUI_WITH_EXAMPLE "Build example." OFF)
include(${PROJECT_SOURCE_DIR}/cmake/dependencies.cmake)
#============================================================================
# Internal compiler options
#============================================================================
# C++ standard
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(NOT CMAKE_CXX_STANDARD OR CMAKE_CXX_STANDARD LESS 20)
set(CMAKE_CXX_STANDARD 20)
endif()
add_library(
wxUI
INTERFACE
include/wxUI/wxUI.h
include/wxUI/BindInfo.h
include/wxUI/Bitmap.h
include/wxUI/BitmapToggleButton.h
include/wxUI/BitmapComboBox.h
include/wxUI/BitmapButton.h
include/wxUI/Button.h
include/wxUI/CheckBox.h
include/wxUI/Choice.h
include/wxUI/ComboBox.h
include/wxUI/Custom.h
include/wxUI/ForEach.h
include/wxUI/Gauge.h
include/wxUI/Generic.h
include/wxUI/GetterSetter.h
include/wxUI/HelperMacros.h
include/wxUI/Hyperlink.h
include/wxUI/Layout.h
include/wxUI/Line.h
include/wxUI/Menu.h
include/wxUI/RadioBox.h
include/wxUI/SpinCtrl.h
include/wxUI/Splitter.h
include/wxUI/Slider.h
include/wxUI/Text.h
include/wxUI/TextCtrl.h
include/wxUI/Widget.h
include/wxUI/ZapMacros.h
)
target_include_directories(
wxUI
INTERFACE
include
)
#============================================================================
# Examples
#============================================================================
if(WXUI_WITH_EXAMPLE)
add_subdirectory(examples)
endif()
#============================================================================
# Tests
#============================================================================
if(WXUI_WITH_TESTS)
add_subdirectory(tests)
include(CTest)
add_test(NAME UnitTest COMMAND wxUI_Tests)
endif()