summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVo Trung Chi <chi.votrung@vn.bosch.com>2019-07-03 09:41:38 +0700
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2019-07-03 11:41:38 +0900
commitb757183f51920e8445ed0ea0bbdb490d99781ec6 (patch)
treeab984058504593f58a842f79b945dd6c6f12751f /include
parentc232148a950c536b99bf91033a78ada6ee6f1771 (diff)
downloadDLT-daemon-b757183f51920e8445ed0ea0bbdb490d99781ec6.tar.gz
cmake-improvements (#135)
1. Allow building as a subproject of another cmake project (CMAKE_* vs PROJECT_* variables) 2. Do not generate header files within source – bad practice, use build directory for that(e.g. change location where dlt_version.h is being generated) 3. Use add_compile_options() instead of *_C/CXX_FLAGS variables for proper compile environment definition, also bad practice, also see p.2 4. Add WITH_DLT_PKGCONFIG – add generate pkgconfig .pc files as switchable option, should probably be part of headers install routine. Signed-off-by: Radoslaw Kaczorowski <external.radoslaw.kaczorowski@bosch-softtec.com>
Diffstat (limited to 'include')
-rw-r--r--include/dlt/CMakeLists.txt15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/dlt/CMakeLists.txt b/include/dlt/CMakeLists.txt
index 057af1f..d782d8a 100644
--- a/include/dlt/CMakeLists.txt
+++ b/include/dlt/CMakeLists.txt
@@ -15,13 +15,16 @@
# @licence end@
#######
-install(FILES dlt.h dlt_user.h dlt_user_macros.h dlt_client.h dlt_protocol.h dlt_common.h dlt_types.h dlt_version.h dlt_shm.h dlt_offline_trace.h dlt_filetransfer.h dlt_common_api.h
+install(FILES dlt.h dlt_user.h dlt_user_macros.h dlt_client.h dlt_protocol.h
+ dlt_common.h dlt_types.h dlt_shm.h dlt_offline_trace.h
+ dlt_filetransfer.h dlt_common_api.h
+ ${PROJECT_BINARY_DIR}/include/dlt/dlt_version.h
DESTINATION include/dlt
COMPONENT devel)
+if(WITH_DLT_CXX11_EXT)
+ install(FILES dlt_cpp_extension.hpp
+ DESTINATION include/dlt
+ COMPONENT devel)
+endif()
-if(${WITH_DLT_CXX11_EXT})
- install(FILES dlt_cpp_extension.hpp
- DESTINATION include/dlt
- COMPONENT devel)
-endif() \ No newline at end of file