@@ -115,6 +115,7 @@ OPTION(WT_NO_STD_LOCALE "Build Wt to run on a system without std::locale support
115115OPTION (WT_NO_STD_WSTRING "Build Wt to run on a system without std::wstring support" OFF )
116116OPTION (ENABLE_OPENGL "Build Wt with support for server-side opengl rendering" ON )
117117OPTION (WT_WARN_HEADER_MISSING_H "Output a warning if a Wt header without .h extension is included (deprecated since Wt 4.0.0)" ON )
118+ OPTION (ENABLE_UNWIND "Build Wt with stacktrace support using libunwind" OFF )
118119
119120IF (NOT CMAKE_CXX_STANDARD)
120121 SET (CMAKE_CXX_STANDARD 11)
@@ -290,6 +291,8 @@ SET(SKIA_PREFIX ${USERLIB_PREFIX} CACHE PATH
290291 "Prefix of skia library (overrides USERLIB_PREFIX)" )
291292SET (ASIO_PREFIX ${USERLIB_PREFIX} CACHE PATH
292293 "Prefix of Asio (overrides USERLIB_PREFIX), only used when WT_ASIO_IMPLEMENTATION is standalone" )
294+ SET (UNWIND_PREFIX ${UNWIND_PREFIX} CACHE PATH
295+ "Prefix of unwind library (overrides USERLIB_PREFIX)" )
293296
294297OPTION (DEBUG "Support for debugging, must be enabled also in wt_config.xml" OFF )
295298
@@ -338,6 +341,10 @@ INCLUDE(cmake/WtFindGm.txt)
338341INCLUDE (cmake/WtFindGL.txt)
339342INCLUDE (cmake/WtFindSkia.txt)
340343
344+ IF (ENABLE_UNWIND)
345+ INCLUDE (cmake/WtFindUnwind.txt)
346+ ENDIF (ENABLE_UNWIND)
347+
341348IF (ENABLE_PANGO)
342349 INCLUDE (cmake/WtFindPangoFt2.txt)
343350ENDIF (ENABLE_PANGO)
@@ -615,6 +622,10 @@ IF(ENABLE_OPENGL AND GL_FOUND AND WT_HAS_WRASTERIMAGE)
615622 SET (HAVE_GL TRUE )
616623ENDIF (ENABLE_OPENGL AND GL_FOUND AND WT_HAS_WRASTERIMAGE)
617624
625+ IF (ENABLE_UNWIND AND UNWIND_FOUND)
626+ SET (HAVE_UNWIND ON )
627+ ENDIF (ENABLE_UNWIND AND UNWIND_FOUND)
628+
618629# Compile time constants & make sure our build finds it
619630FILE (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /Wt)
620631SET (WCONFIG_H_PATH ${CMAKE_CURRENT_BINARY_DIR} /Wt/WConfig.h)
0 commit comments