-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (43 loc) · 1.47 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
cmake_minimum_required(VERSION 3.25)
project(MiniPythonIDE)
set(CMAKE_CXX_STANDARD 17)
if (POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif ()
configure_file(${CMAKE_CURRENT_LIST_DIR}/cmake/config_app.h.cmake ${CMAKE_BINARY_DIR}/config_app.h)
set(FT_DISABLE_HARFBUZZ ON CACHE BOOL "")
add_subdirectory(3rd_party/freetype)
set(SDL_STATIC ON)
set(SDL_SHARED OFF)
add_subdirectory(3rd_party/SDL EXCLUDE_FROM_ALL)
add_executable(MiniPythonIDE
src/main.cpp
src/editor.cpp
src/editor.h
3rd_party/tinyfiledialogs/tinyfiledialogs.c
3rd_party/imgui/imgui.cpp
3rd_party/imgui/imgui_draw.cpp
3rd_party/imgui/imgui_tables.cpp
3rd_party/imgui/imgui_widgets.cpp
3rd_party/imgui/misc/freetype/imgui_freetype.cpp
3rd_party/imgui/imgui_impl_opengl3.cpp
3rd_party/imgui/imgui_impl_sdl3.cpp)
target_include_directories(MiniPythonIDE PRIVATE
${CMAKE_BINARY_DIR}
3rd_party/imgui
3rd_party/ImGuiColorTextEdit
3rd_party/pocketpy
3rd_party/zep/include
3rd_party/tinyfiledialogs)
target_link_libraries(MiniPythonIDE PRIVATE
freetype
SDL3::SDL3)
target_compile_definitions(MiniPythonIDE PRIVATE
ZEP_FEATURE_CPP_FILE_SYSTEM
ZEP_USE_SDL
ZEP_SINGLE_HEADER=1)
add_custom_command(
TARGET MiniPythonIDE POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/test.py ${CMAKE_CURRENT_BINARY_DIR}/test.py
)