pineapple-notepad/3rdparty/scintilla552/CMakeLists.txt

46 lines
1.2 KiB
CMake
Raw Permalink Normal View History

2024-07-02 23:47:26 +08:00
# this file is actually the CMake version of ScintillaEdit.pro
cmake_minimum_required(VERSION 3.10)
project(scintilla-qt)
find_package(Qt6 REQUIRED
COMPONENTS Widgets Core5Compat
)
add_library(${PROJECT_NAME} SHARED)
set(CMAKE_CXX_STANDARD 17)
file(GLOB_RECURSE SRCS CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/include/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/src/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/src/*.cxx"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/qt/ScintillaEditBase/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/qt/ScintillaEditBase/*.cpp"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/qt/ScintillaEdit/*.h"
"${CMAKE_CURRENT_SOURCE_DIR}/scintilla/qt/ScintillaEdit/*.cpp"
)
target_sources(${PROJECT_NAME}
PRIVATE
${SRCS}
)
target_compile_definitions(${PROJECT_NAME}
PRIVATE
-DSCINTILLA_QT=1 -DMAKING_LIBRARY=1
)
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/scintilla/include
${CMAKE_CURRENT_SOURCE_DIR}/scintilla/src
${CMAKE_CURRENT_SOURCE_DIR}/scintilla/qt/ScintillaEditBase
${CMAKE_CURRENT_SOURCE_DIR}/scintilla/qt/ScintillaEdit
)
target_link_libraries(${PROJECT_NAME}
PUBLIC
Qt::Widgets Qt::Core5Compat
)