chore: update the file

This commit is contained in:
x-tools-author 2025-09-12 16:02:34 +08:00
parent 11be4a7309
commit 1b1bca4377
2 changed files with 32 additions and 1 deletions

View File

@ -45,8 +45,13 @@ if(NOT EXISTS "${X_3RD_DIR}/${packet_name}.zip")
endif()
endif()
find_package(Qt6 REQUIRED COMPONENTS Qml)
x_auto_import_package(${packet_name} QtNodes)
set(X_ENABLE_XFLOW true)
add_compile_definitions(X_ENABLE_XFLOW)
list(APPEND X_LIBS QtNodes::QtNodes)
list(APPEND X_LIBS QtNodes::QtNodes Qt6::Qml)
message(STATUS "[xFlow]Enabled xFlow support.")
include_directories(${CMAKE_SOURCE_DIR}/src/nodeeditor)
# Qt-AES
include(${CMAKE_SOURCE_DIR}/cmake/x_3rd_qtaes.cmake)

26
cmake/x_3rd_qtaes.cmake Normal file
View File

@ -0,0 +1,26 @@
# https://codeload.github.com/bricke/Qt-AES/zip/refs/heads/master
set(packet_version master)
set(packet_name Qt-AES-${packet_version})
set(packet_url "https://codeload.github.com/bricke/Qt-AES/zip/refs/heads/${packet_version}")
if(NOT EXISTS ${CMAKE_SOURCE_DIR}/3rd/${packet_name}.zip)
message(STATUS "Downloading ${packet_name} from ${packet_url}")
file(
DOWNLOAD ${packet_url} ${CMAKE_SOURCE_DIR}/3rd/${packet_name}.zip
STATUS download_status
SHOW_PROGRESS)
# Get the status code from download_status(such as "0;noerror")
message(STATUS "Download status: ${download_status}")
list(GET download_status 0 status_code)
if(NOT status_code EQUAL 0)
message(FATAL_ERROR "Failed to download ${packet_name}: ${download_status}")
endif()
endif()
if(NOT EXISTS ${X_3RD_DIR}/${packet_name})
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${packet_name}.zip
WORKING_DIRECTORY ${X_3RD_DIR})
endif()
x_auto_import_package_dir(${packet_name} QtAES)
list(APPEND X_LIBS QtAES::QtAES)