-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathCMakeLists.txt
45 lines (39 loc) · 1.35 KB
/
CMakeLists.txt
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
# Diagnostic Client library CMake File
# Copyright (C) 2024 Avijit Dey
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Entry Project CMake
#
cmake_minimum_required(VERSION 3.22)
project(diag-client)
# Cmake options
option(BUILD_DIAG_CLIENT "Option to use Dlt for logging" ON)
option(BUILD_SHARED_LIBS "Option to build as shared library" OFF)
option(BUILD_WITH_DLT "Option to use Dlt for logging" ON)
option(BUILD_DOXYGEN "Option to generate doxygen file" OFF)
option(BUILD_WITH_TEST "Option to build test target" ON)
option(BUILD_EXAMPLES "Option to build example targets" OFF)
# add compiler preprocessor flag when dlt enabled
if (BUILD_WITH_DLT)
add_compile_definitions(ENABLE_DLT_LOGGER)
message("Dlt logging enabled in diag-client library")
endif (BUILD_WITH_DLT)
# Build diag-client library
if (BUILD_DIAG_CLIENT)
add_subdirectory(diag-client-lib)
endif (BUILD_DIAG_CLIENT)
# Build diag-client doxygen documentation
if (BUILD_DOXYGEN)
add_subdirectory(docs)
endif (BUILD_DOXYGEN)
# Build diag-client test targets
if (BUILD_WITH_TEST)
add_subdirectory(test)
endif (BUILD_WITH_TEST)
# Build diag-client example targets
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif (BUILD_EXAMPLES)