Skip to content

Commit a8f10b0

Browse files
committed
Fix build on FreeBSD (and possibly NetBSD) where backtrace() is in libexecinfo
1 parent 02a8d13 commit a8f10b0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/CMakeLists.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,12 @@ if ( WIN32 )
447447
endif ()
448448
set ( system_libs ${basic_windows_libs} SDLmain ${static_flags} )
449449
endif ()
450+
451+
# backtrace(3) requires libexecinfo on some *BSD systems
452+
if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD OR ${CMAKE_SYSTEM_NAME} MATCHES NetBSD)
453+
set ( system_libs -lexecinfo )
454+
endif ()
455+
450456
target_link_libraries ( openxcom ${system_libs} ${SDLIMAGE_LIBRARY} ${SDLMIXER_LIBRARY} ${SDLGFX_LIBRARY} ${SDL_LIBRARY} ${OPENGL_gl_LIBRARY} debug ${YAMLCPP_LIBRARY_DEBUG} optimized ${YAMLCPP_LIBRARY} )
451457

452458
set ( bin_data_dirs TFTD UFO common standard )

0 commit comments

Comments
 (0)