Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[google-jni-bind] update to 1.1.0-beta #228

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion ports/google-jni-bind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.24)
project(google-jni-bind LANGUAGES CXX)
include(GNUInstallDirs)

option(BUILD_TESTING "Build test programs" ON)
option(BUILD_TESTING "Build test programs" OFF)

find_package(JNI REQUIRED) # JNI::JNI

Expand All @@ -11,4 +11,35 @@ install(FILES jni_bind_release.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if(NOT BUILD_TESTING)
return()
endif()
find_package(GTest REQUIRED) # GTest::GTest

file(GLOB implementations implementation/*.h)
file(GLOB class_defs class_defs/*.h)

add_library(jni_bind INTERFACE
${PROJECT_SOURCE_DIR}
${implementations}
${class_defs}
)

target_link_libraries(jni_bind INTERFACE JNI::JNI)

add_executable(jni_bind_test)

file(GLOB implementation_tests implementation/*test.cc)

target_sources(jni_bind_test PRIVATE
${implementation_tests}
${implementations}
${class_defs}
)

target_include_directories(jni_bind_test PRIVATE ${PROJECT_SOURCE_DIR})

target_compile_features(jni_bind_test PRIVATE cxx_std_17)

target_link_libraries(jni_bind_test PRIVATE
jni_bind
GTest::gtest GTest::gmock
# GTest::Main
)
17 changes: 9 additions & 8 deletions ports/google-jni-bind/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/jni-bind
REF fb9f3f669edc7e68ae16402dd2083c806d5a009d # visited 2023-02-24
SHA512 3ba2b29cc2e2721bda9fc7073623e65506288c31e783c53b744d9eacd03a9ffc9ca534351f84071f10feb90daf58cbc4e5aa71f3ba8e5c73a52eb1571a5250ab
REF Release-1.1.0-beta
SHA512 ffc011eb1d812360b844ff413ead8eb2c98080264655f7e1e30d9cf8f869875da02882559f147156279f6aa86ceba8a4660ca9fda637ac59d417ceaf4d76330d
HEAD_REF main
# PATCHES
# fix-cmake.patch
)
# Install headers and a shim library with JackWeakAPI.c
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
Expand All @@ -14,16 +12,19 @@ if(DEFINED ENV{JAVA_HOME})
message(STATUS "Using JAVA_HOME: $ENV{JAVA_HOME}")
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
test BUILD_TESTING
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
# vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/jni-bind)
# vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug"
)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
16 changes: 10 additions & 6 deletions ports/google-jni-bind/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"name": "google-jni-bind",
"version-date": "2023-02-24",
"version-semver": "1.1.0-beta",
"description": "JNI Bind is a set of advanced syntactic sugar for writing efficient correct JNI Code in C++17 (and up)",
"homepage": "https://github.com/google/jni-bind",
"license": "Apache-2.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
],
"features": {
"test": {
"description": "Build test.cc sources",
"dependencies": [
"gtest"
]
}
}
}
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"port-version": 0
},
"google-jni-bind": {
"baseline": "2023-02-24",
"baseline": "1.1.0-beta",
"port-version": 0
},
"libdispatch": {
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/google-jni-bind.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d0a27c1f78f84ffde56cbf6299f66dfdad09bbb8",
"version-semver": "1.1.0-beta",
"port-version": 0
},
{
"git-tree": "9547945acadebbbdc924dbebdefbf4b96315fff3",
"version-date": "2023-02-24",
Expand Down
Loading