2024-06-22 20:01:42 +08:00
|
|
|
# SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
|
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 3.9.5)
|
|
|
|
|
|
|
|
project(pineapple-notepad)
|
|
|
|
|
|
|
|
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
|
|
|
|
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
|
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
set(CMAKE_AUTORCC ON)
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON) # kconfig generated header file is in binary dir
|
|
|
|
|
2024-07-02 23:47:26 +08:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # for copy subproject dll to binary folder. this might not be the correct approach tho
|
|
|
|
|
2024-06-22 20:01:42 +08:00
|
|
|
find_package(Qt6 6.4 REQUIRED
|
|
|
|
COMPONENTS Widgets
|
|
|
|
)
|
|
|
|
|
|
|
|
find_package(KF6 6.3 REQUIRED
|
|
|
|
COMPONENTS XmlGui ConfigWidgets CoreAddons I18n IconThemes
|
|
|
|
)
|
|
|
|
|
2024-07-02 23:47:26 +08:00
|
|
|
add_subdirectory(3rdparty/scintilla550)
|
|
|
|
add_subdirectory(3rdparty/lexilla532)
|
|
|
|
|
2024-06-22 20:01:42 +08:00
|
|
|
add_executable(pineapple-notepad
|
|
|
|
generalsettings.ui)
|
|
|
|
|
|
|
|
target_sources(pineapple-notepad
|
|
|
|
PRIVATE
|
|
|
|
main.cpp
|
|
|
|
mainwindow.cpp mainwindow.h
|
2024-07-02 23:47:26 +08:00
|
|
|
sciedit.cpp sciedit.h
|
2024-06-30 12:51:22 +08:00
|
|
|
editorviewhelper.cpp editorviewhelper.h
|
2024-06-22 20:01:42 +08:00
|
|
|
generalsettings.ui
|
|
|
|
|
|
|
|
appsettings.kcfg
|
|
|
|
)
|
|
|
|
|
|
|
|
qt_add_resources(pineapple-notepad xmlgui.qrc
|
|
|
|
PREFIX "/kxmlgui5/pineapple-notepad"
|
|
|
|
FILES pineapple-notepadui.rc
|
|
|
|
)
|
|
|
|
|
|
|
|
kconfig_add_kcfg_files(pineapple-notepad GENERATE_MOC appsettings.kcfgc)
|
|
|
|
|
|
|
|
target_link_libraries(pineapple-notepad
|
|
|
|
PRIVATE
|
|
|
|
Qt6::Widgets
|
|
|
|
KF6::XmlGui
|
|
|
|
KF6::CoreAddons
|
|
|
|
KF6::I18n
|
|
|
|
KF6::ConfigWidgets
|
|
|
|
KF6::IconThemes
|
2024-07-02 23:47:26 +08:00
|
|
|
scintilla-qt
|
|
|
|
lexilla
|
2024-06-22 20:01:42 +08:00
|
|
|
)
|