Page MenuHomePhabricator

D5686.id18598.diff
No OneTemporary

D5686.id18598.diff

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
@@ -37,23 +37,25 @@
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
-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::
-)
+if(NOT ANDROID_NDK)
+ 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::
+ )
+endif()
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
@@ -45,22 +45,24 @@
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
-)
+if(NOT ANDROID_NDK)
+ 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)
+ 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}
-)
+ 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::
-)
+ # For installation
+ install(EXPORT comm-databasemanagers-export
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-databasemanagers
+ NAMESPACE comm-tools::
+ )
+endif()
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
@@ -95,33 +95,35 @@
"../../../node_modules/react-native/ReactCommon/jsi"
)
-set(_components internal 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
+if(NOT ANDROID_NDK)
+ set(_components internal 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)
-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-internal comm-modules-native
- NAMESPACE comm-modules::
- FILE ${CMAKE_CURRENT_BINARY_DIR}/cmake/comm-modules/comm-modules-targets.cmake
-)
+ export(TARGETS comm-modules-internal 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::
-)
+ # For installation
+ install(EXPORT comm-modules-export
+ FILE comm-modules-targets.cmake
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-modules
+ NAMESPACE comm-modules::
+ )
+endif()
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
@@ -32,22 +32,24 @@
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
-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::
-)
+if(NOT ANDROID_NDK)
+ 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::
+ )
+endif()
diff --git a/native/cpp/CommonCpp/grpc/CMakeLists.txt b/native/cpp/CommonCpp/grpc/CMakeLists.txt
--- a/native/cpp/CommonCpp/grpc/CMakeLists.txt
+++ b/native/cpp/CommonCpp/grpc/CMakeLists.txt
@@ -46,23 +46,25 @@
"../../../node_modules/react-native/ReactCommon/jsi"
)
-install(TARGETS comm-client EXPORT comm-export
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-client
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client
-)
+if(NOT ANDROID_NDK)
+ install(TARGETS comm-client EXPORT comm-export
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT comm-client
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT comm-client
+ )
-install(FILES ${CLIENT_HDRS} DESTINATION include/grpc)
+ install(FILES ${CLIENT_HDRS} DESTINATION include/grpc)
-# For development purposes, able to reference build directory
-export(TARGETS comm-client
- NAMESPACE comm::
- FILE ${CMAKE_CURRENT_BINARY_DIR}/cmake/comm/comm-grpc-client-targets.cmake
-)
+ # For development purposes, able to reference build directory
+ export(TARGETS comm-client
+ NAMESPACE comm::
+ FILE ${CMAKE_CURRENT_BINARY_DIR}/cmake/comm/comm-grpc-client-targets.cmake
+ )
-# For installation
-install(EXPORT comm-export
- FILE comm-grpc-targets.cmake
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-grpc
- NAMESPACE comm-grpc::
-)
+ # For installation
+ install(EXPORT comm-export
+ FILE comm-grpc-targets.cmake
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/comm-grpc
+ NAMESPACE comm-grpc::
+ )
+endif()
diff --git a/shared/protos/CMakeLists.txt b/shared/protos/CMakeLists.txt
--- a/shared/protos/CMakeLists.txt
+++ b/shared/protos/CMakeLists.txt
@@ -2,8 +2,9 @@
cmake_minimum_required(VERSION 3.4)
include(GNUInstallDirs)
-find_package(Protobuf REQUIRED)
-find_package(gRPC REQUIRED)
+
+find_package(Protobuf)
+find_package(gRPC)
set(CMAKE_CXX_STANDARD 14)
# Allow for tools on PATH to be found
@@ -55,6 +56,7 @@
)
add_library(${LIB_NAME}
+ STATIC
${BIN_PROTO_HDRS} ${BIN_PROTO_SRCS}
)

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 6:12 AM (19 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690452
Default Alt Text
D5686.id18598.diff (9 KB)

Event Timeline