pineapple-notepad/CMakeLists.txt

60 lines
1.4 KiB
CMake

# SPDX-FileCopyrightText: 2024 Gary Wang <git@blumia.net>
cmake_minimum_required(VERSION 3.16)
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
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # for copy subproject dll to binary folder. this might not be the correct approach tho
find_package(Qt6 6.4 REQUIRED
COMPONENTS Widgets
)
find_package(KF6 6.3 REQUIRED
COMPONENTS XmlGui ConfigWidgets CoreAddons I18n IconThemes
)
add_subdirectory(3rdparty/scintilla552)
add_subdirectory(3rdparty/lexilla540)
add_executable(pineapple-notepad
generalsettings.ui)
target_sources(pineapple-notepad
PRIVATE
main.cpp
mainwindow.cpp mainwindow.h
sciedit.cpp sciedit.h
editorviewhelper.cpp editorviewhelper.h
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
scintilla-qt
lexilla
)