diff --git a/native/android/app/CMakeLists.txt b/native/android/app/CMakeLists.txt --- a/native/android/app/CMakeLists.txt +++ b/native/android/app/CMakeLists.txt @@ -99,19 +99,6 @@ EXCLUDE_FROM_ALL ) -file(GLOB SQLCIPHER - "${_node_modules_dir}/@commapp/sqlcipher-amalgamation/src/*.c" -) -file(GLOB ANDROID_NATIVE_CODE "./src/cpp/*.cpp") - -set(GENERATED_NATIVE_CODE "../../cpp/CommonCpp/_generated/commJSI-generated.cpp") -file(GLOB CRYPTO_NATIVE_CODE "../../cpp/CommonCpp/CryptoTools/*.cpp") -file(GLOB DB_NATIVE_CODE "../../cpp/CommonCpp/DatabaseManagers/*.cpp") -file(GLOB DB_ENTITIES_NATIVE_CODE "../../cpp/CommonCpp/DatabaseManagers/entities/*.cpp") -file(GLOB_RECURSE MODULE_NATIVE_CODE "../../cpp/CommonCpp/NativeModules/**/*.cpp") -file(GLOB MODULE_ROOT_NATIVE_CODE "../../cpp/CommonCpp/NativeModules/*.cpp") -file(GLOB TOOLS_NATIVE_CODE "../../cpp/CommonCpp/Tools/*.cpp") - add_library( # Sets the name of the library ${PACKAGE_NAME} @@ -128,16 +115,6 @@ # Third party dependencies ${SQLCIPHER} - - # comm code - ${ANDROID_NATIVE_CODE} - ${GENERATED_NATIVE_CODE} - ${CRYPTO_NATIVE_CODE} - ${DB_NATIVE_CODE} - ${DB_ENTITIES_NATIVE_CODE} - ${MODULE_NATIVE_CODE} - ${MODULE_ROOT_NATIVE_CODE} - ${TOOLS_NATIVE_CODE} ) set(BUILD_DIR ${CMAKE_SOURCE_DIR}/build) @@ -169,17 +146,6 @@ # comm android specific code ./src/cpp - # comm native mutual code - ../../cpp/CommonCpp/ - ../../cpp/CommonCpp/NativeModules - ../../cpp/CommonCpp/NativeModules/InternalModules - ../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities - ../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/ThreadOperationsUtilities - ../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/MessageOperationsUtilities - ../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs - ../../cpp/CommonCpp/DatabaseManagers - ../../cpp/CommonCpp/Tools - # native rust library ${native_rust_library_include_dir} ) @@ -233,6 +199,7 @@ openssl-crypto openssl-ssl comm::native_rust_library + comm-modules-native ) # add a dummy library which is required by CallInvokerHolderImpl.java diff --git a/native/cpp/CommonCpp/CMakeLists.txt b/native/cpp/CommonCpp/CMakeLists.txt --- a/native/cpp/CommonCpp/CMakeLists.txt +++ b/native/cpp/CommonCpp/CMakeLists.txt @@ -16,7 +16,6 @@ ) target_link_libraries(comm-modules-native - comm-client comm-cryptotools comm-databasemanagers comm-tools diff --git a/native/cpp/CommonCpp/DatabaseManagers/CMakeLists.txt b/native/cpp/CommonCpp/DatabaseManagers/CMakeLists.txt --- a/native/cpp/CommonCpp/DatabaseManagers/CMakeLists.txt +++ b/native/cpp/CommonCpp/DatabaseManagers/CMakeLists.txt @@ -18,6 +18,7 @@ set(DBM_SRCS "SQLiteQueryExecutor.cpp" + "DatabaseManager.cpp" ) add_library(comm-databasemanagers @@ -37,8 +38,10 @@ # HACK "../../../node_modules/react-native/ReactCommon/jsi" "../../../node_modules/olm/include" + "../../../node_modules/@commapp/sqlcipher-amalgamation/src/" ) target_link_libraries(comm-databasemanagers Folly::folly + fbjni::fbjni ) diff --git a/native/cpp/CommonCpp/NativeModules/CMakeLists.txt b/native/cpp/CommonCpp/NativeModules/CMakeLists.txt --- a/native/cpp/CommonCpp/NativeModules/CMakeLists.txt +++ b/native/cpp/CommonCpp/NativeModules/CMakeLists.txt @@ -30,6 +30,7 @@ PUBLIC $ $ + "../../../native_rust_library" # HACK PRIVATE @@ -37,7 +38,6 @@ "../../../../node_modules/react-native/ReactCommon/react/nativemodule/core" "../../../../node_modules/react-native/ReactCommon/callinvoker" "../../../../node_modules/react-native/ReactCommon" - "../../../native_rust_library" ) set(_message_path ./PersistentStorageUtilities/MessageOperationsUtilities)