--- a/servatrice/CMakeLists.txt	2026-05-08 10:02:50.000000000 -0500
+++ b/servatrice/CMakeLists.txt	2026-06-11 21:05:37.315465280 -0500
@@ -30,7 +30,7 @@
 endif(WIN32)
 
 # Under FreeBSD we need libexecinfo to use backtrace_symbols_fd()
-if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD")
+if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD" OR (ENABLE_LIBEXECINFO))
   find_package(Libexecinfo REQUIRED)
   set(SYSTEM_LIBRARIES ${EXECINFO_LIBRARY} ${SYSTEM_LIBRARIES})
 endif()
@@ -99,7 +99,7 @@
 # Build servatrice binary and link it
 add_executable(servatrice MACOSX_BUNDLE ${servatrice_MOC_SRCS} ${servatrice_RESOURCES_RCC} ${servatrice_SOURCES})
 
-if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD")
+if(CMAKE_HOST_SYSTEM MATCHES "FreeBSD" OR (ENABLE_LIBEXECINFO))
   target_link_libraries(
     servatrice libcockatrice_deck_list libcockatrice_network_server_remote Threads::Threads ${SERVATRICE_QT_MODULES}
     ${LIBEXECINFO_LIBRARY}
