summaryrefslogtreecommitdiff
path: root/lib/base/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base/CMakeLists.txt')
-rw-r--r--lib/base/CMakeLists.txt45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/base/CMakeLists.txt b/lib/base/CMakeLists.txt
new file mode 100644
index 0000000..c71485f
--- /dev/null
+++ b/lib/base/CMakeLists.txt
@@ -0,0 +1,45 @@
+cmake_minimum_required(VERSION 3.22)
+
+project(base VERSION 1.0.0 DESCRIPTION "base")
+
+add_library(base STATIC
+ abi_compatibility.cpp
+ chrono_utils.cpp
+ file.cpp
+ liblog_symbols.cpp
+ logging.cpp
+ mapped_file.cpp
+ parsebool.cpp
+ parsenetaddress.cpp
+ process.cpp
+ properties.cpp
+ stringprintf.cpp
+ strings.cpp
+ threads.cpp
+ test_utils.cpp
+ errors_unix.cpp
+)
+
+target_include_directories(base PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}/../include
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
+
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR})
+
+target_compile_options(base PRIVATE -std=c++17)
+
+#cd ../base
+#case "$OSTYPE" in
+# linux* | darwin*)
+# src="errors_unix.cpp"
+# ;;
+# *)
+# src="errors_windows.cpp utf8.cpp"
+# ;;
+#esac
+#$CC -std=c++17 -I../include ${CFLAGS} -c abi_compatibility.cpp chrono_utils.cpp file.cpp liblog_symbols.cpp logging.cpp mapped_file.cpp parsebool.cpp parsenetaddress.cpp process.cpp properties.cpp stringprintf.cpp strings.cpp threads.cpp test_utils.cpp ${src}
+#$AR rcs ../lib/libbase.a *.o
+#rm -r *.o
+#unset src \ No newline at end of file