summaryrefslogtreecommitdiff
path: root/src/core_dump_handler/CMakeLists.txt
diff options
context:
space:
mode:
authorLutz Helwing <lutz_helwing@mentor.com>2016-01-20 15:09:27 +0100
committerLutz Helwing <lutz_helwing@mentor.com>2016-02-01 10:02:17 +0100
commite712b34212b6e0f03ec4843531ae2df03c53ec7d (patch)
tree2c2ae1c2d52bc11057c54f5372110f4eac9acda9 /src/core_dump_handler/CMakeLists.txt
parent2dbef064093bc17ff58c734280a3301fb1e3eded (diff)
downloadDLT-daemon-e712b34212b6e0f03ec4843531ae2df03c53ec7d.tar.gz
Fixed core pattern to use correct dlt-cdh install path
- 50-coredump.conf is now generated and installed by cmake and uses @CMAKE_INSTALL_PREFIX@ for setting path to dlt-cdh - README updated Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
Diffstat (limited to 'src/core_dump_handler/CMakeLists.txt')
-rw-r--r--src/core_dump_handler/CMakeLists.txt39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/core_dump_handler/CMakeLists.txt b/src/core_dump_handler/CMakeLists.txt
index 99cf31a..4545e93 100644
--- a/src/core_dump_handler/CMakeLists.txt
+++ b/src/core_dump_handler/CMakeLists.txt
@@ -15,28 +15,31 @@
# @licence end@
#######
-set( PLATFORM_DIR ${CMAKE_SOURCE_DIR}/src/core_dump_handler/${TARGET_CPU_NAME} )
-set(dlt_cdh_SRCS dlt_cdh.c dlt_cdh_context.c dlt_cdh_coredump.c ${PLATFORM_DIR}/dlt_cdh_cpuinfo.c dlt_cdh_crashid.c dlt_cdh_streamer.c)
+if(WITH_DLT_COREDUMPHANDLER)
-#set(COREDUMP_CONF_DIR "/usr/lib/sysctl.d/")
+ set( PLATFORM_DIR ${CMAKE_SOURCE_DIR}/src/core_dump_handler/${TARGET_CPU_NAME} )
+ set(dlt_cdh_SRCS dlt_cdh.c dlt_cdh_context.c dlt_cdh_coredump.c ${PLATFORM_DIR}/dlt_cdh_cpuinfo.c dlt_cdh_crashid.c dlt_cdh_streamer.c)
-#add_definitions( -fno-strict-aliasing )
+ set(COREDUMP_CONF_DIR "/usr/lib/sysctl.d/")
-if(WITH_CITYHASH)
- set( CITYHASH_DIR ${CMAKE_SOURCE_DIR}/src/core_dump_handler/cityhash_c )
- add_definitions( -DHAS_CITYHASH_C )
- set(dlt_cdh_SRCS ${CITYHASH_DIR}/city_c.c ${dlt_cdh_SRCS} )
-endif(WITH_CITYHASH)
+ #add_definitions( -fno-strict-aliasing )
-add_executable(dlt-cdh ${dlt_cdh_SRCS})
-target_link_libraries(dlt-cdh z)
-set_target_properties(dlt-cdh PROPERTIES LINKER_LANGUAGE C)
+ if(WITH_CITYHASH)
+ set( CITYHASH_DIR ${CMAKE_SOURCE_DIR}/src/core_dump_handler/cityhash_c )
+ add_definitions( -DHAS_CITYHASH_C )
+ set(dlt_cdh_SRCS ${CITYHASH_DIR}/city_c.c ${dlt_cdh_SRCS} )
+ endif(WITH_CITYHASH)
+ add_executable(dlt-cdh ${dlt_cdh_SRCS})
+ target_link_libraries(dlt-cdh z)
+ set_target_properties(dlt-cdh PROPERTIES LINKER_LANGUAGE C)
-install(TARGETS dlt-cdh
- RUNTIME DESTINATION bin
- COMPONENT base)
+ configure_file(${CMAKE_SOURCE_DIR}/src/core_dump_handler/50-coredump.conf.cmake ${PROJECT_BINARY_DIR}/core_dump_handler/50-coredump.conf)
-#install(FILES 50-coredump.conf
-# DESTINATION ${COREDUMP_CONF_DIR}
-# COMPONENT base)
+ install(TARGETS dlt-cdh
+ RUNTIME DESTINATION bin
+ COMPONENT base)
+
+ install(FILES ${PROJECT_BINARY_DIR}/core_dump_handler/50-coredump.conf DESTINATION ${COREDUMP_CONF_DIR} )
+
+endif(WITH_DLT_COREDUMPHANDLER)