support ProcFolderBegin/ProcFolderEnd in Windows platform.

This commit is contained in:
hyzboy 2021-01-15 20:36:45 +08:00
parent 7bceaf2f9c
commit a3e0cb4330
2 changed files with 13 additions and 11 deletions

View File

@ -5,25 +5,25 @@ project(CMPlatform)
include(path_config.cmake)
CMPlatformSetup(${CMAKE_CURRENT_SOURCE_DIR})
OPTION(BUILD_QT5_SUPPORT_LIB OFF)
OPTION(BUILD_QT_SUPPORT_LIB OFF)
IF(BUILD_QT5_SUPPORT_LIB)
IF(BUILD_QT_SUPPORT_LIB)
add_definitions("-DHGL_QT5")
add_definitions("-DHGL_QT6")
set(QT_MIN_VERSION "5.14.0")
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core)
set(QT_MIN_VERSION "6.0.0")
find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core)
include_directories(${Qt5Core_INCLUDES})
add_definitions(${Qt5Core_DEFINITIONS})
include_directories(${Qt6Core_INCLUDES})
add_definitions(${Qt6Core_DEFINITIONS})
IF(WIN32)
SET(HGL_QT_MAIN_SOURCE ${CMPLATFORM_ROOT_SOURCE_PATH}/src/QT/QT5WinUCS2.cpp)
SET(HGL_QT_MAIN_SOURCE ${CMPLATFORM_ROOT_SOURCE_PATH}/src/QT/QTWinUCS2.cpp)
ELSE()
SET(HGL_QT_MAIN_SOURCE ${CMPLATFORM_ROOT_SOURCE_PATH}/src/QT/QT5UnixUTF8.cpp)
SET(HGL_QT_MAIN_SOURCE ${CMPLATFORM_ROOT_SOURCE_PATH}/src/QT/QTUnixUTF8.cpp)
ENDIF()
SET(HGL_QT_LIB CM.QT5Support)
SET(HGL_QT_LIB CM.QT6Support)
ENDIF()
add_subdirectory(${CMPLATFORM_ROOT_SOURCE_PATH})

View File

@ -104,11 +104,13 @@ namespace hgl
if(sub_efc&&config->sub_folder)
{
ProcFolderBegin(config,sub_efc,fi);
sub_count=this->Enum(sub_efc);
if(sub_count>0)count+=sub_count;
}
ProcFolder(config,sub_efc,fi);
ProcFolderEnd(config,sub_efc,fi);
if(sub_efc)
delete sub_efc;