Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3341583
D4295.id15556.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4295.id15556.diff
View Options
diff --git a/native/cpp/CommonCpp/Tools/CMakeLists.txt b/native/cpp/CommonCpp/Tools/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/native/cpp/CommonCpp/Tools/CMakeLists.txt
@@ -0,0 +1,56 @@
+project(comm-tools)
+cmake_minimum_required(VERSION 3.4)
+
+include(GNUInstallDirs)
+
+find_package(Folly REQUIRED)
+
+set(TOOLS_HDRS
+ "CommSecureStore.h"
+ "Logger.h"
+ "PlatformSpecificTools.h"
+ "WorkerThread.h"
+)
+
+set(TOOLS_SRCS
+ "WorkerThread.cpp"
+)
+
+add_library(comm-tools
+ ${TOOLS_HDRS}
+ ${TOOLS_SRCS}
+)
+
+target_link_libraries(comm-tools
+ Folly::folly
+)
+
+# reference local directory when building, use installation path when installing
+target_include_directories(comm-tools
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../CryptoTools>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../Tools>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+ $<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::
+)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 11:15 PM (17 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2566432
Default Alt Text
D4295.id15556.diff (1 KB)
Attached To
Mode
D4295: [services] Export cpp tools as CMake project
Attached
Detach File
Event Timeline
Log In to Comment