vcpkg/ports/sqlite-orm/portfile.cmake
jim wang 4fac06df86
[sqlite-orm] Fix test feature to support uwp (#38825)
According to the upstream PR
[1295](https://github.com/fnc12/sqlite_orm/pull/1295), fix the test
feature to support uwp.

- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [ ] ~~SHA512s are updated for each updated download.~~
- [X] The "supports" clause reflects platforms that may be fixed by this
new version.
- [ ] ~~Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~~
- [ ] ~~Any patches that are no longer applied are deleted from the
port's directory.~~
- [X] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [X] Only one version is added to each modified port's versions file.

Test features passed with following triplet:

```
x64-uwp
```
2024-05-21 15:02:01 -07:00

35 lines
1013 B
CMake

# header-only library
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO fnc12/sqlite_orm
REF v1.8.2
SHA512 65479c02246d96bfa0a6a5ed749e15650e71114c1145d17bd48f1a57560c9f494148253064f720dd43773ac9971a85635c9d4927f3b336590188339b3d656b33
HEAD_REF master
PATCHES
fix-dependency.patch
fix-uwp.patch #https://github.com/fnc12/sqlite_orm/pull/1295
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
test BUILD_TESTING
example BUILD_EXAMPLES
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DSQLITE_ORM_ENABLE_CXX_17=OFF
-DSQLITE_ORM_ENABLE_CXX_20=OFF
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(PACKAGE_NAME SqliteOrm CONFIG_PATH lib/cmake/SqliteOrm)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)