forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sese] add new port (microsoft#38704)
- Loading branch information
1 parent
a68a14e
commit 14b9179
Showing
5 changed files
with
132 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
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}" | ||
SHA512 e7c3e014ff2eaecf9968c4fa304ec98445b57458b87da1c4af17f41655565b3cc187e07189ee280104e07b1511f6e2c490a3c689d49d8982d054fc9a462fe136 | ||
) | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
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 | ||
) | ||
|
||
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") | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE" "${SOURCE_PATH}/NOTICE") | ||
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") |
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 @@ | ||
sese provides CMake targets: | ||
|
||
find_package(sese CONFIG REQUIRED) | ||
# build full features | ||
target_link_libraries(main PRIVATE Sese::Core) | ||
# build only plugin | ||
target_link_libraries(main PRIVATE Sese::Plugin) |
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,64 @@ | ||
{ | ||
"name": "sese", | ||
"version": "2.1.2", | ||
"description": "A cross-platform framework for basic components.", | ||
"homepage": "https://github.com/libsese/sese", | ||
"license": "Apache-2.0", | ||
"supports": "x64 & (windows | osx | linux) & !uwp", | ||
"dependencies": [ | ||
{ | ||
"name": "asio", | ||
"features": [ | ||
"openssl" | ||
] | ||
}, | ||
"openssl", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
}, | ||
"zlib" | ||
], | ||
"default-features": [ | ||
"sqlite3" | ||
], | ||
"features": { | ||
"archive": { | ||
"description": "add archive support", | ||
"dependencies": [ | ||
"libarchive" | ||
] | ||
}, | ||
"async-logger": { | ||
"description": "use the async logger" | ||
}, | ||
"mysql": { | ||
"description": "add mysql and mariadb support", | ||
"dependencies": [ | ||
"libmariadb" | ||
] | ||
}, | ||
"psql": { | ||
"description": "add postgresql support", | ||
"dependencies": [ | ||
"libpq" | ||
] | ||
}, | ||
"sqlite3": { | ||
"description": "add sqlite3 support", | ||
"dependencies": [ | ||
"sqlite3" | ||
] | ||
}, | ||
"tests": { | ||
"description": "build the unit test", | ||
"dependencies": [ | ||
"gtest" | ||
] | ||
} | ||
} | ||
} |
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,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "c68004d1e51579448d9f1a6ad2a5bcdf6bc9fe4b", | ||
"version": "2.1.2", | ||
"port-version": 0 | ||
} | ||
] | ||
} |