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
@@ -94,6 +94,11 @@
set(_node_modules_dir ${CMAKE_CURRENT_SOURCE_DIR}/../../node_modules)
set(_react_native_dir ${_node_modules_dir}/react-native)
+add_subdirectory(../../cpp/CommonCpp/
+ ${CMAKE_CURRENT_BINARY_DIR}/build/CommonCpp
+ EXCLUDE_FROM_ALL
+)
+
file(GLOB SQLCIPHER
"${_node_modules_dir}/@commapp/sqlcipher-amalgamation/src/*.c"
)
diff --git a/native/cpp/CommonCpp/CryptoTools/CMakeLists.txt b/native/cpp/CommonCpp/CryptoTools/CMakeLists.txt
--- a/native/cpp/CommonCpp/CryptoTools/CMakeLists.txt
+++ b/native/cpp/CommonCpp/CryptoTools/CMakeLists.txt
@@ -23,8 +23,6 @@
${CRYPTO_SRCS}
)
-find_package(Olm)
-
target_link_libraries(comm-cryptotools
Olm::Olm
)
@@ -36,24 +34,3 @@
$
$
)
-
-install(TARGETS comm-cryptotools EXPORT comm-cryptotools-export
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-cryptotools
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-cryptotools
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-cryptotools
-)
-
-install(FILES ${TOOLS_HDRS} DESTINATION include/Tools)
-
-set(_builddir_export_path cmake/comm-cryptotools/comm-cryptotools-targets.cmake)
-export(TARGETS comm-cryptotools
- NAMESPACE comm-cryptotools::
- FILE ${CMAKE_CURRENT_BINARY_DIR}/${_builddir_export_path}
-)
-
-# For installation
-install(EXPORT comm-cryptotools-export
- FILE comm-cryptotools-targets.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-cryptotools
- NAMESPACE comm-cryptotools::
-)
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
@@ -3,8 +3,6 @@
include(GNUInstallDirs)
-find_package(Folly REQUIRED)
-
set(DBM_HDRS
"DatabaseManager.h"
"DatabaseQueryExecutor.h"
@@ -44,23 +42,3 @@
target_link_libraries(comm-databasemanagers
Folly::folly
)
-
-install(TARGETS comm-databasemanagers EXPORT comm-databasemanagers-export
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-databasemanagers
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-databasemanagers
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-databasemanagers
-)
-
-install(FILES ${TOOLS_HDRS} DESTINATION include/comm/DatabaseManagers)
-
-set(_builddir_export_path cmake/comm-tools/comm-databasemanagers-targets.cmake)
-export(TARGETS comm-databasemanagers
- NAMESPACE comm-databasemanagers::
- FILE ${CMAKE_CURRENT_BINARY_DIR}/${_builddir_export_path}
-)
-
-# For installation
-install(EXPORT comm-databasemanagers-export
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-databasemanagers
- NAMESPACE comm-tools::
-)
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
@@ -80,33 +80,3 @@
# HACK
"../../../node_modules/react-native/ReactCommon/jsi"
)
-
-set(_components native persistentstorage)
-
-foreach(component ${_components})
- install(TARGETS comm-modules-${component} EXPORT comm-modules-export
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-modules
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-modules
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-modules
- )
-endforeach()
-
-install(FILES ${INTERNAL_HDRS} DESTINATION include/InternalModules)
-install(FILES ${NATIVE_HDRS} DESTINATION include/NativeModules)
-install(FILES ${MESSAGE_HDRS} DESTINATION include/PersistentStorageUtilities)
-install(FILES ${MESSAGE_SPEC_HDRS}
- DESTINATION include/PersistentStorageUtilities/MessageSpecs
-)
-install(FILES ${THREAD_OP_HDRS} DESTINATION include/ThreadOperationsUtilities)
-
-export(TARGETS comm-modules-native
- NAMESPACE comm-modules::
- FILE ${CMAKE_CURRENT_BINARY_DIR}/cmake/comm-modules/comm-modules-targets.cmake
-)
-
-# For installation
-install(EXPORT comm-modules-export
- FILE comm-modules-targets.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-modules
- NAMESPACE comm-modules::
-)
diff --git a/native/cpp/CommonCpp/Tools/CMakeLists.txt b/native/cpp/CommonCpp/Tools/CMakeLists.txt
--- a/native/cpp/CommonCpp/Tools/CMakeLists.txt
+++ b/native/cpp/CommonCpp/Tools/CMakeLists.txt
@@ -3,8 +3,6 @@
include(GNUInstallDirs)
-find_package(Folly REQUIRED)
-
set(TOOLS_HDRS
"CommSecureStore.h"
"Logger.h"
@@ -31,23 +29,3 @@
$
$
)
-
-install(TARGETS comm-tools EXPORT comm-tools-export
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-tools
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-tools
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-tools
-)
-
-install(FILES ${TOOLS_HDRS} DESTINATION include/Tools)
-
-export(TARGETS comm-tools
- NAMESPACE comm-tools::
- FILE ${CMAKE_CURRENT_BINARY_DIR}/cmake/comm-tools/comm-tools-targets.cmake
-)
-
-# For installation
-install(EXPORT comm-tools-export
- FILE comm-tools-targets.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-tool
- NAMESPACE comm-tools::
-)