-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
合并新特性到uos(从uos-feature) Log: 合并新特性到uos Change-Id: I39f2b847100160fdca5b71942d4cb2f6ce5b8324
- Loading branch information
jixianglong
committed
Jul 19, 2021
1 parent
7a2e109
commit 475c417
Showing
388 changed files
with
21,441 additions
and
21,224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
message("pluginsInstallDir ===== ${PluginDir}") | ||
message("pluginsTransInstallDir ===== ${PluginTransDir}") | ||
add_subdirectory(calligraphypen) | ||
add_subdirectory(fillTool) | ||
add_subdirectory(eraser) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# 定义需要的cmake版本 | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/plugins) | ||
|
||
project("calligraphypen") | ||
|
||
# 设置cmake参数 | ||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
|
||
# 设置Qt模块 | ||
set(QtModule Core Gui Widgets DBus PrintSupport Svg Concurrent LinguistTools) | ||
|
||
# 查找Qt相关的库链接 | ||
find_package(Qt5 REQUIRED ${QtModule}) | ||
|
||
# 定义测试用例文件及测试资源文件 | ||
set(AllFileDirs | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_SOURCE_DIR}/res | ||
) | ||
foreach(item IN LISTS AllFileDirs) | ||
include_directories(${item}) | ||
list(APPEND allSourceFiles ${item}/*.cpp) | ||
list(APPEND allSourceFiles ${item}/*.c) | ||
list(APPEND allSourceFiles ${item}/*.h) | ||
list(APPEND allQRCFiles ${item}/*.qrc) | ||
endforeach() | ||
FILE(GLOB allSourceG ${allSourceFiles}) | ||
FILE(GLOB allQRCG ${allQRCFiles}) | ||
|
||
FILE(GLOB targetTsFFiles ./translations/*.ts) | ||
qt5_create_translation(tragetQmFFiles ${allSourceG} ${targetTsFFiles} OPTIONS -no-obsolete) | ||
|
||
# 设置不删除生成的文件夹内容文件(设置此项是为了翻译后的文件不被删除) | ||
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1) | ||
|
||
add_library(${PROJECT_NAME} SHARED ${allSourceG} ${allQRCG} ${tragetQmFFiles}) | ||
|
||
#------------------------------ 添加第三方库 DTK ------------------------------- | ||
|
||
if(INDEPENDENTCMAKELISTS) | ||
# 使用第三方库需要用到的一个包 | ||
find_package(PkgConfig REQUIRED) | ||
|
||
# 检查第三方库(这里检查了名字为dtkwidget的库和名字为dtkgui的库),然后取名3rd_lib | ||
pkg_check_modules(3rd_lib REQUIRED | ||
dtkwidget dtkgui | ||
) | ||
endif() | ||
|
||
# 添加第三方库的所有文件夹路径到工程中来(注意 *_INCLUDE_DIRS) | ||
target_include_directories(${PROJECT_NAME} PUBLIC ${3rd_lib_INCLUDE_DIRS} ${BASE_LIB_INCLUDEDIRS}) | ||
|
||
# 将第三方库链接进来(注意 *_LIBRARIES) | ||
target_link_libraries(${PROJECT_NAME} ${3rd_lib_LIBRARIES} ${BASE_LIB}) | ||
|
||
#------------------------------添加第三方库end------------------------------------- | ||
|
||
# 将工程与Qt模块链接起来 | ||
qt5_use_modules(${PROJECT_NAME} ${QtModule}) | ||
|
||
# install Translation files: | ||
install(FILES ${tragetQmFFiles} DESTINATION ${PluginTransDir}) | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
EXPORT ${PROJECT_NAME}Targets | ||
LIBRARY DESTINATION ${PluginDir} | ||
ARCHIVE DESTINATION lib | ||
RUNTIME DESTINATION ${PluginDir} | ||
INCLUDES DESTINATION allHeaders) |
Oops, something went wrong.