From fc6dcaad849d2cfc963f60fd4f77d7f4ab3f6ce8 Mon Sep 17 00:00:00 2001 From: James Hugman Date: Wed, 16 Oct 2024 14:14:19 +0100 Subject: [PATCH] Fixup Android crash --- crates/ubrn_cli/src/codegen/templates/CMakeLists.txt | 5 ++--- scripts/test-turbo-modules.sh | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ubrn_cli/src/codegen/templates/CMakeLists.txt b/crates/ubrn_cli/src/codegen/templates/CMakeLists.txt index d976034f..17419703 100644 --- a/crates/ubrn_cli/src/codegen/templates/CMakeLists.txt +++ b/crates/ubrn_cli/src/codegen/templates/CMakeLists.txt @@ -30,8 +30,7 @@ include_directories( ${UNIFFI_BINDGEN_PATH}/cpp/includes ) -add_library( - ${CMAKE_PROJECT_NAME} SHARED +add_library({{ self.config.project.cpp_filename() }} SHARED {{ tm_dir }}/{{ self.config.project.cpp_filename() }}.cpp {%- for m in self.config.modules %} {{ bindings_dir }}/{{ m.cpp_filename() }} @@ -63,7 +62,7 @@ find_package(fbjni REQUIRED CONFIG) find_library(LOGCAT log) target_link_libraries( - ${CMAKE_PROJECT_NAME} + {{ self.config.project.cpp_filename() }} fbjni::fbjni ReactAndroid::jsi ReactAndroid::turbomodulejsijni diff --git a/scripts/test-turbo-modules.sh b/scripts/test-turbo-modules.sh index a4eb291b..db6f0dfd 100755 --- a/scripts/test-turbo-modules.sh +++ b/scripts/test-turbo-modules.sh @@ -229,6 +229,7 @@ check_lines() { check_line_unchanged "./src/Native*" "getEnforcing" check_line_unchanged "./android/CMakeLists.txt" "^project" + check_line_unchanged "./android/CMakeLists.txt" "^add_library.*SHARED" check_line_unchanged "./android/build.gradle" "return rootProject" check_line_unchanged "./android/build.gradle" "libraryName" check_line_unchanged "./android/src/*/*Package*" "package"