| 1 | # TextEditor - A syntax highlighting text editor for ImGui |
| 2 | # Copyright (c) 2024-2026 Johan A. Goossens. All rights reserved. |
| 3 | # |
| 4 | # This work is licensed under the terms of the MIT license. |
| 5 | # For a copy, see <https://opensource.org/licenses/MIT>. |
| 6 | |
| 7 | cmake_minimum_required(VERSION 3.17 FATAL_ERROR) |
| 8 | project(TextEditor VERSION 1.0 DESCRIPTION "TextEditor Example Program" LANGUAGES C CXX) |
| 9 | |
| 10 | set(CMAKE_CXX_STANDARD 17) |
| 11 | set(CMAKE_CXX_STANDARD_REQUIRED ON) |
| 12 | set(CMAKE_CXX_EXTENSIONS OFF) |
| 13 | |
| 14 | add_subdirectory(deps) |
| 15 | |
| 16 | add_executable(example |
| 17 | ../TextEditor.cpp |
| 18 | ../TextEditor.h |
| 19 | ../TextDiff.cpp |
| 20 | ../TextDiff.h |
| 21 | ../dtl.h |
| 22 | editor.cpp |
| 23 | dejavu.cpp |
| 24 | main.cpp) |
| 25 | |
| 26 | target_link_libraries(example SDL3::SDL3 SDL3_Headers imguifd) |
| 27 | |
| 28 | target_compile_options(example PRIVATE |
| 29 | $<$<COMPILE_LANG_AND_ID:CXX,AppleClang,Clang,GNU>:-Werror -Wall -Wpedantic -Wextra> |
| 30 | $<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/W4 /WX>) |