Skip to content

Commit a72223e

Browse files
authored
Merge branch 'master' into develop
2 parents 33b1013 + 2de9d3b commit a72223e

2 files changed

Lines changed: 65 additions & 71 deletions

File tree

CMakeLists.txt

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
2-
cmake_minimum_required(VERSION 3.12)
3-
4-
project("libdbcppp" VERSION 0.1.0)
5-
6-
option(build_tests "Build tests" ON)
7-
option(build_examples "Build examples" ON)
8-
9-
set(CMAKE_CXX_STANDARD 17)
10-
set(CMAKE_STATIC_LIBRARY_PREFIX "")
11-
set(CMAKE_SHARED_LIBRARY_PREFIX "")
12-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
13-
14-
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
15-
add_definitions("/bigobj")
16-
endif()
17-
18-
include_directories("include")
19-
include_directories("third-party/libxml2/include")
20-
include_directories("third-party/libxmlmm/libxmlmm")
21-
include_directories("third-party/boost")
22-
include_directories("third-party/cxxopts/include")
23-
24-
set(LIBXML2_WITH_ICONV OFF)
25-
set(LIBXML2_WITH_LZMA OFF)
26-
set(LIBXML2_WITH_PYTHON OFF)
27-
set(LIBXML2_WITH_ZLIB OFF)
28-
set(LIBXML2_WITH_TESTS OFF)
29-
30-
add_subdirectory(third-party/libxml2)
31-
32-
file(GLOB libxmlmm_header
33-
"third-party/libxmlmm/libxmlmm/*.h"
34-
)
35-
file(GLOB libxmlmm_src
36-
"third-party/libxmlmm/libxmlmm/*.cpp"
37-
)
38-
39-
add_library(libxmlmm SHARED "")
40-
target_link_libraries(libxmlmm LibXml2)
41-
42-
target_sources("libxmlmm"
43-
PRIVATE ${libxmlmm_header}
44-
PRIVATE ${libxmlmm_src}
45-
)
46-
47-
install(
48-
TARGETS "libxmlmm"
49-
DESTINATION ${CMAKE_INSTALL_LIBDIR})
50-
install(
51-
DIRECTORY "libxmlmm"
52-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxmlmm
53-
FILES_MATCHING PATTERN "*.h")
54-
55-
add_subdirectory(src)
56-
if (build_tests)
57-
add_subdirectory(tests)
58-
endif()
59-
if (build_examples)
60-
add_subdirectory(examples)
61-
endif()
62-
63-
set(CMAKE_STATIC_LIBRARY_PREFIX "")
64-
set(CMAKE_SHARED_LIBRARY_PREFIX "")
65-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
1+
2+
cmake_minimum_required(VERSION 3.12)
3+
4+
project("libdbcppp" VERSION 0.1.0)
5+
6+
option(build_tests "Build tests" ON)
7+
option(build_examples "Build examples" ON)
8+
9+
set(CMAKE_CXX_STANDARD 17)
10+
set(CMAKE_STATIC_LIBRARY_PREFIX "")
11+
set(CMAKE_SHARED_LIBRARY_PREFIX "")
12+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
13+
14+
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
15+
add_definitions("/bigobj")
16+
endif()
17+
18+
include_directories("include")
19+
include_directories("third-party/libxml2/include")
20+
include_directories("third-party/libxmlmm/libxmlmm")
21+
include_directories("third-party/boost")
22+
include_directories("third-party/cxxopts/include")
23+
24+
set(LIBXML2_WITH_ICONV OFF)
25+
set(LIBXML2_WITH_LZMA OFF)
26+
set(LIBXML2_WITH_PYTHON OFF)
27+
set(LIBXML2_WITH_ZLIB OFF)
28+
set(LIBXML2_WITH_TESTS OFF)
29+
30+
add_subdirectory(third-party/libxml2)
31+
32+
file(GLOB libxmlmm_header
33+
"third-party/libxmlmm/libxmlmm/*.h"
34+
)
35+
file(GLOB libxmlmm_src
36+
"third-party/libxmlmm/libxmlmm/*.cpp"
37+
)
38+
39+
add_library(libxmlmm SHARED "")
40+
target_link_libraries(libxmlmm LibXml2)
41+
42+
target_sources("libxmlmm"
43+
PRIVATE ${libxmlmm_header}
44+
PRIVATE ${libxmlmm_src}
45+
)
46+
47+
install(
48+
TARGETS "libxmlmm"
49+
DESTINATION ${CMAKE_INSTALL_LIBDIR})
50+
install(
51+
DIRECTORY "libxmlmm"
52+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libxmlmm
53+
FILES_MATCHING PATTERN "*.h")
54+
55+
add_subdirectory(src)
56+
if (build_tests)
57+
add_subdirectory(tests)
58+
endif()
59+
if (build_examples)
60+
add_subdirectory(examples)
61+
endif()
62+
63+
set(CMAKE_STATIC_LIBRARY_PREFIX "")
64+
set(CMAKE_SHARED_LIBRARY_PREFIX "")
65+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ int main()
102102
if (dbcppp_MessageId(tmp) == frame.can_id)
103103
{
104104
printf("Received message: %s\n", dbcppp_MessageGetName(msg));
105-
void print_signal_data(const dbcppp_Signal* sig, void* data)
106-
{
107-
uint64_t raw = dbcppp_SignalDecode(sig, frame->data);
108-
double phys = dbcppp_SignalRawToPhys(sig, raw);
109-
printf("\t%s=%f\n", dbcppp_SignalGetName(sig), phys);
110-
}
111105
dbcppp_MessageForEachSignal(msg, print_signal_data, &frame);
112106
for (uint64_t i = 0; i < dbcppp_MessageSignals_Size(msg); i++)
113107
{

0 commit comments

Comments
 (0)