cmake/platforms: 移除无法区分类型的原始平台模块

This commit is contained in:
zinface 2023-02-22 17:07:21 +08:00
parent 700bc7235e
commit 322d375306
4 changed files with 5 additions and 193 deletions

View File

@ -1,113 +0,0 @@
# CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" ??
# 使 Linux.cmake ?
if(CMAKE_HOST_UNIX)
include(cmake/SparkInstallMacrosConfig.cmake)
include(cmake/SparkDesktopMacros.cmake)
# : Name=
spark_desktop_macros(
# : Name=
${PROJECT_NAME}
# : Name[zh_CN]=
"Notepad--"
# : Comment=
"Notepad-- "
# : Type=
"Application"
# : Exec=
# %F : https://gitee.com/zinface/z-tools/blob/desktop-dev/src/DesktopGenerater/desktopexecparamdialog.cpp
"notepad-- %F"
# : Icon=
"/usr/share/notepad--/icons/spark.png"
# : Category=
"Development"
)
# spark_install_file(/usr/share/applications/ ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.desktop)
# spark_install_file(/usr/share/notepad--/icons/ assets/spark.png)
# spark_install_target(/usr/bin/ ${PROJECT_NAME})
# 线 linux/destkop PR使
# spark_desktop_macros Appimage
# Appimage 要求(使用来自 Spark 构建的 Desktop 构建中配置的信息(必须要求 spark-desktop))
spark_install_directory(/usr src/linux/usr/*) # Linux
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
#
set(CMAKE_INSTALL_PREFIX "/usr")
set(NOTEPAD_PLUGIN NotepadPlugin)
# CMake
set(NOTEPAD_PLUGIN_CONFIG ${NOTEPAD_PLUGIN}Config.cmake)
# CMake
set(NOTEPAD_PLUGIN_CORELIB QSci) # QSci QScintllia
# CMake Notepad-- QT5
# Qt
# add_notepad_plugin
set(NOTEPAD_BUILD_BY_QT5 TRUE)
set(NOTEPAD_BUILD_BY_QT6 FALSE)
# 定义在平台中插件应该安装的位置(待确定)
# CMake Notepad-- "插件安装目录(位置)"
set(NOTEPAD_PLUGIN_EXTERNAL_PLUGIN_INSTALL_DIRECTORY "")
# 使 NotepadPlugin.cmake.in
set(NOTEPAD_PLUGIN_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NOTEPAD_PLUGIN})
set(NOTEPAD_PLUGIN_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${NOTEPAD_PLUGIN})
# NOTEPAD_PLUGIN_INCLUDEDIR NOTEPAD_PLUGIN_LIBDIR cmake
configure_package_config_file(cmake/NotepadPluginConfig.cmake.in
${CMAKE_BINARY_DIR}/${NOTEPAD_PLUGIN_CONFIG}
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${NOTEPAD_PLUGIN})
# cmake
spark_install_file(${CMAKE_INSTALL_LIBDIR}/cmake/${NOTEPAD_PLUGIN}
${CMAKE_BINARY_DIR}/${NOTEPAD_PLUGIN_CONFIG})
#
spark_install_file(${NOTEPAD_PLUGIN_INCLUDEDIR}
src/include/pluginGl.h)
# Qsci
spark_install_directory(${NOTEPAD_PLUGIN_INCLUDEDIR}
src/qscint/src/Qsci)
#
spark_install_directory(${NOTEPAD_PLUGIN_INCLUDEDIR}/qscint
src/qscint/scintilla)
# QSci 的头文件(从插件实现层面来看,目前是使用*.h pluginGl.h
# Qsci *.h 使 #include <Qsci/*.h> 使)
# spark_file_glob(QSci_HEADERS src/qscint/src/Qsci/*.h src/include/pluginGl.h)
# set_target_properties(QSci PROPERTIES PUBLIC_HEADER "${QSci_HEADERS}")
# Notepad-- 的接口文件(从逻辑层面来看,目前已经在前面安装了接口文件,所以此部分不被使用)
# spark_file_glob(Notepad_HEADERS src/include/pluginGl.h)
# set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${QSci_HEADERS}")
# QSci
install(TARGETS ${PROJECT_NAME} QSci
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${NOTEPAD_PLUGIN_LIBDIR}
ARCHIVE DESTINATION ${NOTEPAD_PLUGIN_LIBDIR}
PUBLIC_HEADER DESTINATION ${NOTEPAD_PLUGIN_INCLUDEDIR}
)
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# 1. Appimage
include(cmake/SparkAppimageConfig.cmake) # Spark Appimage
add_appimage_icon(assets/spark.png) # Appimage
add_appimage_desktop() # Appimage 中的默认desktop(使用来自 Spark 构建的 Desktop 构建中配置的信息(必须要求 spark-desktop))
add_appimage() # Appimage
# 注释行(使用方式)
find_package(DebPackage PATHS ${CMAKE_SOURCE_DIR})
add_package_descript(cmake/package-deb.descript)
endif(CMAKE_HOST_UNIX)

View File

@ -0,0 +1,5 @@
# macos-universal.cmake
if(USE_MACOS_UNIVERSAL)
endif(USE_MACOS_UNIVERSAL)

View File

@ -1,80 +0,0 @@
if(CMAKE_HOST_WIN32)
include(cmake/SparkInstallMacrosConfig.cmake)
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
#
# set(CMAKE_INSTALL_PREFIX "/usr") # Linux Windows 使
set(NOTEPAD_PLUGIN NotepadPlugin)
# CMake
set(NOTEPAD_PLUGIN_CONFIG ${NOTEPAD_PLUGIN}Config.cmake)
# CMake
set(NOTEPAD_PLUGIN_CORELIB QSci) # QSci QScintllia
# CMake Notepad-- QT5
# Qt
# add_notepad_plugin
set(NOTEPAD_BUILD_BY_QT5 TRUE)
set(NOTEPAD_BUILD_BY_QT6 FALSE)
# 定义在平台中插件应该安装的位置(待确定)
# CMake Notepad-- "插件安装目录(位置)"
set(NOTEPAD_PLUGIN_EXTERNAL_PLUGIN_INSTALL_DIRECTORY "")
# 使 NotepadPlugin.cmake.in
set(NOTEPAD_PLUGIN_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NOTEPAD_PLUGIN})
set(NOTEPAD_PLUGIN_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${NOTEPAD_PLUGIN})
# NOTEPAD_PLUGIN_INCLUDEDIR NOTEPAD_PLUGIN_LIBDIR cmake
configure_package_config_file(cmake/NotepadPluginConfig.cmake.in
${CMAKE_BINARY_DIR}/${NOTEPAD_PLUGIN_CONFIG}
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${NOTEPAD_PLUGIN})
# cmake
spark_install_file(${CMAKE_INSTALL_LIBDIR}/cmake/${NOTEPAD_PLUGIN}
${CMAKE_BINARY_DIR}/${NOTEPAD_PLUGIN_CONFIG})
#
spark_install_file(${NOTEPAD_PLUGIN_INCLUDEDIR}
src/include/pluginGl.h)
# Qsci
spark_install_directory(${NOTEPAD_PLUGIN_INCLUDEDIR}
src/qscint/src/Qsci)
#
spark_install_directory(${NOTEPAD_PLUGIN_INCLUDEDIR}/qscint
src/qscint/scintilla)
# QSci 的头文件(从插件实现层面来看,目前是使用*.h pluginGl.h
# Qsci *.h 使 #include <Qsci/*.h> 使)
# spark_file_glob(QSci_HEADERS src/qscint/src/Qsci/*.h src/include/pluginGl.h)
# set_target_properties(QSci PROPERTIES PUBLIC_HEADER "${QSci_HEADERS}")
# Notepad-- 的接口文件(从逻辑层面来看,目前已经在前面安装了接口文件,所以此部分不被使用)
# spark_file_glob(Notepad_HEADERS src/include/pluginGl.h)
# set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${QSci_HEADERS}")
# QSci
install(TARGETS ${PROJECT_NAME} QSci
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${NOTEPAD_PLUGIN_LIBDIR}
ARCHIVE DESTINATION ${NOTEPAD_PLUGIN_LIBDIR}
PUBLIC_HEADER DESTINATION ${NOTEPAD_PLUGIN_INCLUDEDIR}
)
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
# ------------------ INSTALL PLUGIN CONFIG ------------------ #
message(" -------- ${CMAKE_INSTALL_PREFIX} ---------- ")
message("${Qt5_DIR}/../../../bin/windeployqt")
# 1. WindowsQtDeploy
# Windows Qt
add_custom_target(windeployqt
COMMAND ${Qt5_DIR}/../../../bin/windeployqt ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe --compiler-runtime --verbose 2 --dir ${CMAKE_BINARY_DIR}/winqt/)
endif(CMAKE_HOST_WIN32)