-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (27 loc) · 976 Bytes
/
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
cmake_minimum_required(VERSION 3.25)
project(m68hc11)
set(CMAKE_CXX_STANDARD 20)
include(FetchContent)
FetchContent_Declare(
hello_imgui
GIT_REPOSITORY https://github.com/pthom/hello_imgui.git
# Enter the desired git tag below
# GIT_TAG 0.8.0
)
FetchContent_MakeAvailable(hello_imgui)
# Make cmake function `hello_imgui_add_app` available
list(APPEND CMAKE_MODULE_PATH ${HELLOIMGUI_CMAKE_PATH})
include(hello_imgui_add_app)
file(GLOB EDIT_SRC vendor/ImGuiColorTextEdit/*.cpp)
set(BOOST_REGEX_STANDALONE ON)
add_subdirectory(vendor/ImGuiColorTextEdit/vendor/regex)
hello_imgui_add_app(m68hc11 main.cpp imguiutil.cpp assembler.cpp ${EDIT_SRC})
# bad fix for undefined reference in text editor submodule
if(MSVC)
add_definitions(/FI"math.h")
else()
# GCC or Clang
add_definitions(-include math.h)
endif()
target_link_libraries(m68hc11 PRIVATE boost_regex)
target_include_directories(m68hc11 PRIVATE vendor/ImGuiColorTextEdit)