$NetBSD: patch-CMakeLists.txt,v 1.8 2022/11/01 08:59:25 adam Exp $ Do not make application bundle on Darwin. editcap needs -lm, like tfshark: editcap.c:(.text.startup+0x5b8): undefined reference to `modf' --- CMakeLists.txt.orig 2022-10-26 17:36:47.000000000 +0000 +++ CMakeLists.txt @@ -1530,7 +1530,7 @@ else () set(EXTCAP_INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/extcap" CACHE INTERNAL "The extcap dir") endif() -if(APPLE) +if(APPLE AND ENABLE_APPLICATION_BUNDLE) # # As https://developer.apple.com/library/archive/technotes/tn2206/_index.html # says, @@ -2599,7 +2599,11 @@ if(BUILD_wireshark AND QT_FOUND) ${MINIZIP_LIBRARIES} ) - add_executable(wireshark WIN32 MACOSX_BUNDLE ${wireshark_FILES} ${EXTRA_BUNDLE_FILES}) + if(ENABLE_APPLICATION_BUNDLE) + add_executable(wireshark WIN32 MACOSX_BUNDLE ${wireshark_FILES} ${EXTRA_BUNDLE_FILES}) + else() + add_executable(wireshark WIN32 ${wireshark_FILES} ${EXTRA_BUNDLE_FILES}) + endif() if(WIN32) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT wireshark) endif() @@ -3099,6 +3103,7 @@ endif() if(BUILD_editcap) set(editcap_LIBS + m ui wiretap version_info