2024-06-08 12:08:50 +08:00
|
|
|
function(remove_empty_directories_recursive dir)
|
|
|
|
file(GLOB before_subdirs "${dir}/*")
|
|
|
|
foreach (subdir ${before_subdirs})
|
|
|
|
if (IS_DIRECTORY ${subdir})
|
|
|
|
remove_empty_directories_recursive(${subdir})
|
|
|
|
endif ()
|
|
|
|
endforeach ()
|
|
|
|
file(GLOB after_subdirs "${dir}/*")
|
|
|
|
if ("${after_subdirs}" STREQUAL "")
|
|
|
|
file(REMOVE_RECURSE "${dir}")
|
|
|
|
endif ()
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
set(SOURCE_PATH ${CURRENT_BUILDTRESS_DIR}/sese)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libsese/sese
|
|
|
|
REF "${VERSION}"
|
2024-07-08 22:22:19 +08:00
|
|
|
SHA512 6a87cabe6cbd69ab41de85be27ff397c1ae49f95c11151a27e8b9329afe4ff3b580084be53c129e883be50e13fadccb3b6cc1eed833c44ce4f8457dedc71b758
|
2024-07-10 22:16:02 +08:00
|
|
|
PATCHES
|
|
|
|
001-fix-fmt-error.patch
|
2024-06-08 12:08:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
2024-07-08 22:22:19 +08:00
|
|
|
tests SESE_BUILD_TEST
|
|
|
|
mysql SESE_DB_USE_MARIADB
|
|
|
|
sqlite3 SESE_DB_USE_SQLITE
|
|
|
|
psql SESE_DB_USE_POSTGRES
|
|
|
|
async-logger SESE_USE_ASYNC_LOGGER
|
|
|
|
archive SESE_USE_ARCHIVE
|
|
|
|
replace-execinfo SESE_REPLACE_EXECINFO
|
2024-06-08 12:08:50 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS ${FEATURE_OPTIONS}
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sese")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
|
|
|
|
remove_empty_directories_recursive("${CURRENT_PACKAGES_DIR}/include/sese")
|
|
|
|
|
2024-07-08 22:22:19 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2024-06-08 12:08:50 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE" "${SOURCE_PATH}/NOTICE")
|
|
|
|
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|