SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1)
+
# Sub modules
+ADD_SUBDIRECTORY(include)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src/crash-service)
+
ADD_SUBDIRECTORY(src/crash-manager)
-ADD_SUBDIRECTORY(src/crash-pipe)
+ADD_SUBDIRECTORY(src/crash-stack)
ADD_SUBDIRECTORY(src/dump_systemstate)
+IF("${LIVEDUMPER}" STREQUAL "ON")
+ ADD_SUBDIRECTORY(src/livedumper)
+ENDIF()
+
+IF("${CRASH_SERVICE}" STREQUAL "ON")
+ if (NOT "${LIVEDUMPER}" STREQUAL "ON")
+ message(FATAL_ERROR "Livedumper is required to build crash-service")
+ ENDIF()
+ ADD_SUBDIRECTORY(src/crash-service)
+ENDIF()
+
+ADD_SUBDIRECTORY(tests)
+