summaryrefslogtreecommitdiff
path: root/lib/base/CMakeLists.txt
blob: c71485f5c03bdda59eb4c5584de9d39b78a9ed52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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