-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
100 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
set(TaoCommonPath ${CMAKE_SOURCE_DIR}/3rdparty/TaoCommon) | ||
|
||
#file(GLOB_RECURSE TaoCommonFiles *.hpp *.cpp *.c) | ||
|
||
aux_source_directory(${TaoCommonPath} TaoCommonFiles) | ||
message("TaoCommonFiles ${TaoCommonFiles}") | ||
|
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,15 @@ | ||
set(TaoQuickPath ${CMAKE_SOURCE_DIR}/src/TaoQuick/imports) | ||
|
||
if (CMAKE_BUILD_TYPE MATCHES "Release") | ||
set(TaoQuickRes ${TaoQuickPath}/TaoQuick/TaoQuick.qrc) | ||
add_compile_definitions(TaoQuickImportPath="qrc:///") | ||
add_compile_definitions(TaoQuickImagePath="qrc:/TaoQuick/Images/") | ||
else() | ||
add_compile_definitions(TaoQuickImportPath="file:///${TaoQuickPath}") | ||
add_compile_definitions(TaoQuickImagePath="file:///${TaoQuickPath}/TaoQuick/Images/") | ||
endif() | ||
add_compile_definitions(QML_IMPORT_PATH="${TaoQuickPath}") | ||
add_compile_definitions(QML2_IMPORT_PATH="${TaoQuickPath}") | ||
add_compile_definitions(QML_DESIGNER_IMPORT_PATH="${TaoQuickPath}") | ||
|
||
|
Empty file.
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 |
---|---|---|
@@ -1,18 +1,69 @@ | ||
set(TargetName TaoQuickShow) | ||
get_filename_component(TargetName ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
|
||
|
||
file(GLOB_RECURSE CURRENT_HEADERS *.h *.hpp) | ||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick QuickControls2 REQUIRED) | ||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick QuickControls2 REQUIRED) | ||
if(Qt::Core_Found) | ||
if (Qt::Core_VERSION VERSION_LESS 5.9.0) | ||
message(FATAL_ERROR "TaoQuick minimum supported Qt5 version is 5.9.0") | ||
endif() | ||
endif(Qt::Core_Found) | ||
|
||
aux_source_directory(./Src SRC1) | ||
aux_source_directory(./Src/DeviceAddTable SRC2) | ||
include(taoVersion) | ||
add_compile_definitions(TaoCommon_NO_LIB) | ||
include(taoCommon) | ||
include(taoQuick) | ||
set (Res Qml.qrc Contents.qrc Image.qrc) | ||
if (CMAKE_BUILD_TYPE MATCHES "Release") | ||
if(WIN32) | ||
add_executable(${TargetName} | ||
${SRC1} | ||
${SRC2} | ||
${TaoCommonFiles} | ||
${Res} | ||
App.rc | ||
${TaoQuickRes} | ||
) | ||
elseif(APPLE) | ||
add_executable(${TargetName} | ||
${SRC1} | ||
${SRC2} | ||
${TaoCommonFiles} | ||
${Res} | ||
milk.icns | ||
${TaoQuickRes} | ||
) | ||
else() | ||
add_executable(${TargetName} | ||
${SRC1} | ||
${SRC2} | ||
${TaoCommonFiles} | ||
${Res} | ||
${TaoQuickRes} | ||
) | ||
endif() | ||
add_compile_definitions(qmlPath="qrc:/Qml/") | ||
add_compile_definitions(contentsPath="qrc:/Contents/") | ||
add_compile_definitions(imgPath="qrc:/Image/") | ||
|
||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Quick QuickControls2 REQUIRED) | ||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Quick QuickControls2 REQUIRED) | ||
else() | ||
add_executable(${TargetName} | ||
${SRC1} | ||
${SRC2} | ||
${TaoCommonFiles} | ||
) | ||
add_compile_definitions(TAODEBUG) | ||
add_compile_definitions(qmlPath="file:///${CMAKE_CURRENT_SOURCE_DIR}/Qml/") | ||
add_compile_definitions(contentsPath="file:///${CMAKE_CURRENT_SOURCE_DIR}/Contents/") | ||
add_compile_definitions(imgPath="file:///${CMAKE_CURRENT_SOURCE_DIR}/Image/") | ||
endif() | ||
|
||
target_include_directories(${TargetName} PUBLIC . ./Src ${TaoCommonPath}) | ||
|
||
target_compile_definitions(${TargetName} | ||
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>) | ||
target_link_libraries(${TargetName} | ||
PRIVATE Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Quick Qt${QT_VERSION_MAJOR}::QuickControls2) | ||
|
||
add_executable(${TargetName} | ||
${SRC1} | ||
${SRC2} | ||
Qml.qrc | ||
Contents.qrc | ||
) |
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 @@ | ||
add_subdirectory(TaoQuickShow) |