diff --git a/ports/cpprealm/portfile.cmake b/ports/cpprealm/portfile.cmake new file mode 100644 index 0000000000..974a72b68c --- /dev/null +++ b/ports/cpprealm/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO realm/realm-cpp + REF "v${VERSION}" + SHA512 "d880daea7bceb3143052cae9d8883b448162484adacc566cca5315ac096964d0c79c421b25a76d5c2efbd8c3294dfb5acd3dd7314a6c154163e7d141b9eb2e51" + HEAD_REF "main") + +if(NOT VCPKG_BUILD_TYPE) + set(DISABLE_ALIGNED_STORAGE 1) +else() + set(DISABLE_ALIGNED_STORAGE 0) +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DREALM_DISABLE_ALIGNED_STORAGE=${DISABLE_ALIGNED_STORAGE} + -DREALM_CPP_NO_TESTS=ON + -DREALM_ENABLE_EXPERIMENTAL=ON + -DREALMCXX_VERSION=${VERSION} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "cmake") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/cpprealm/vcpkg.json b/ports/cpprealm/vcpkg.json new file mode 100644 index 0000000000..19e63eda59 --- /dev/null +++ b/ports/cpprealm/vcpkg.json @@ -0,0 +1,27 @@ +{ + "name": "cpprealm", + "version": "2.1.0", + "description": "Realm is a mobile database that runs directly inside phones, tablets or wearables.", + "homepage": "https://github.com/realm/realm-cpp", + "license": "Apache-2.0", + "supports": "!emscripten", + "dependencies": [ + { + "name": "curl", + "platform": "linux" + }, + { + "name": "libuv", + "platform": "!osx, !ios" + }, + "realm-core", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index b4af9c9412..8967942f2a 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1948,6 +1948,10 @@ "baseline": "2.1.0", "port-version": 0 }, + "cpprealm": { + "baseline": "2.1.0", + "port-version": 0 + }, "cpprestsdk": { "baseline": "2.10.19", "port-version": 1 diff --git a/versions/c-/cpprealm.json b/versions/c-/cpprealm.json new file mode 100644 index 0000000000..a0e88e7567 --- /dev/null +++ b/versions/c-/cpprealm.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "58fb5ebe04ba047e583ef885dcb021cc0c3caf40", + "version": "2.1.0", + "port-version": 0 + } + ] +}