-
-
Notifications
You must be signed in to change notification settings - Fork 689
/
CMakeLists.txt
59 lines (49 loc) · 1.43 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
cmake_minimum_required (VERSION 3.13)
project ("DearPyGui")
if(WIN32)
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiConfig.h")
add_definitions(-DMV_PLATFORM="windows")
elseif(APPLE)
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiLinuxConfig.h")
add_definitions(-DMV_PLATFORM="apple")
else() # Linux
add_definitions(-DIMGUI_USER_CONFIG="mvImGuiLinuxConfig.h")
add_definitions(-DMV_PLATFORM="linux")
endif()
if(WIN32)
else() # Linux
add_definitions(-DCUSTOM_IMGUIFILEDIALOG_CONFIG="ImGuiFileDialogConfigUnix.h")
endif()
# various settings
add_definitions(
-D_CRT_SECURE_NO_WARNINGS
-D_USE_MATH_DEFINES)
set(MV_PY_VERSION ${MV_PY_VERSION})
set(MVDPG_VERSION ${MVDPG_VERSION})
add_definitions(-DMV_DPG_MAJOR_VERSION=1)
add_definitions(-DMV_DPG_MINOR_VERSION=0)
if(MVDPG_VERSION)
add_definitions(-DMV_SANDBOX_VERSION="${MVDPG_VERSION}")
else()
add_definitions(-DMV_SANDBOX_VERSION="master")
endif()
# when set to "ON", the embedded version
# will be the only version build (no sandbox builds)
set(MVDIST_ONLY ${MVDIST_ONLY})
if(MVDIST_ONLY)
add_definitions(-DMVDIST_ONLY)
else()
add_definitions(-DMV_LOG)
endif()
# runs python tests
set(MV_TESTS_ONLY ${MV_TESTS_ONLY})
if(MV_TESTS_ONLY)
add_definitions(-DMV_TESTS_ONLY)
endif()
add_subdirectory("thirdparty")
# if this is not a distribution build
# build development environment
if(NOT MVDIST_ONLY)
add_subdirectory ("sandbox")
endif()
add_subdirectory ("src")