diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 80 |
1 files changed, 63 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cb951fd7..087b2a49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ if (POLICY CMP0075) endif () project (wsjtx - VERSION 3.0.0.0 + VERSION 3.0.1.0 LANGUAGES C CXX Fortran ) set (PROJECT_DESCRIPTION "WSJT-X: Digital Modes for Weak Signal Communications in Amateur Radio") @@ -152,6 +152,7 @@ option (WSJT_RIG_NONE_CAN_SPLIT "Allow split operation with \"None\" as rig.") option (WSJT_TRACE_UDP "Debugging option that turns on UDP message protocol diagnostics.") option (WSJT_BUILD_UTILS "Build simulators and code demonstrators." ON) option (WSJT_FOX_OTP "Enable Fox OTP Verification Messages." ON) +option (WSJT_SKIP_MAP65 "Skip building MAP65 EME decoder (legacy Fortran; fails on GCC 15)." OFF) CMAKE_DEPENDENT_OPTION (WSJT_QDEBUG_IN_RELEASE "Leave Qt debugging statements in Release configuration." OFF "NOT is_debug_build" OFF) CMAKE_DEPENDENT_OPTION (WSJT_ENABLE_EXPERIMENTAL_FEATURES "Enable features not fully ready for public releases." ON @@ -932,21 +933,30 @@ set_property (SOURCE ${all_C_and_CXXSRCS} APPEND PROPERTY OBJECT_DEPENDS ${CMAKE if (WIN32) # generate the OmniRig COM interface source - find_program (DUMPCPP dumpcpp) - if (DUMPCPP-NOTFOUND) - message (FATAL_ERROR "dumpcpp tool not found") - endif (DUMPCPP-NOTFOUND) - execute_process ( - COMMAND ${DUMPCPP} -getfile {4FE359C5-A58F-459D-BE95-CA559FB4F270} - OUTPUT_VARIABLE AXSERVER - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - string (STRIP "${AXSERVER}" AXSERVER) - if (NOT AXSERVER) - message (FATAL_ERROR "You need to install OmniRig on this computer") - endif (NOT AXSERVER) - string (REPLACE "\"" "" AXSERVER ${AXSERVER}) - file (TO_CMAKE_PATH ${AXSERVER} AXSERVERSRCS) + if (OMNIRIG_TYPE_LIB) + # CI / headless build: type library path provided directly. Bypasses + # COM registration which is not available in CI. Pass via + # -DOMNIRIG_TYPE_LIB=<path-to-OmniRig.tlb>. + file (TO_CMAKE_PATH "${OMNIRIG_TYPE_LIB}" AXSERVERSRCS) + message (STATUS "Using OmniRig type library: ${AXSERVERSRCS}") + else () + # Normal local build: query the COM registry for the type library. + find_program (DUMPCPP dumpcpp) + if (DUMPCPP-NOTFOUND) + message (FATAL_ERROR "dumpcpp tool not found") + endif (DUMPCPP-NOTFOUND) + execute_process ( + COMMAND ${DUMPCPP} -getfile {4FE359C5-A58F-459D-BE95-CA559FB4F270} + OUTPUT_VARIABLE AXSERVER + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string (STRIP "${AXSERVER}" AXSERVER) + if (NOT AXSERVER) + message (FATAL_ERROR "You need to install OmniRig on this computer, or pass -DOMNIRIG_TYPE_LIB=<path>") + endif (NOT AXSERVER) + string (REPLACE "\"" "" AXSERVER ${AXSERVER}) + file (TO_CMAKE_PATH ${AXSERVER} AXSERVERSRCS) + endif () endif () @@ -1074,6 +1084,17 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -fexceptions -frtti") +# MinGW gcc 16.x (MSYS2 rolled forward 2026-05) raises false-positive +# -Wmaybe-uninitialized on the placement-new'd HRDMessage flexible-array +# struct in Transceiver/HRDTransceiver.cpp. Demote to a warning on Windows +# + gcc 16+ until upstream gcc tightens the analysis or HRDMessage is +# refactored. Scoped narrowly so other platforms keep -Werror discipline. +if (WIN32 + AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16.0") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=maybe-uninitialized") +endif () + if (NOT APPLE) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas") if (${OPENMP_FOUND}) @@ -1613,7 +1634,9 @@ endif (${OPENMP_FOUND} OR APPLE) if (WIN32) find_package (Portaudio REQUIRED) - add_subdirectory (map65) + if (NOT WSJT_SKIP_MAP65) + add_subdirectory (map65) + endif () endif () add_subdirectory (qmap) @@ -1624,12 +1647,30 @@ generate_version_info (wsjtx_VERSION_RESOURCES ICON ${WSJTX_ICON_FILE} ) +# Embed a Windows application manifest declaring per-monitor V2 DPI +# awareness. Without it, Windows treats wsjtx.exe as DPI-unaware and +# applies legacy bitmap-stretching scaling on high-DPI displays — +# fonts/widgets appear larger than locally-built (MSVC) executables +# which auto-embed a manifest. Resource ID 1, type RT_MANIFEST (24). +set (wsjtx_PLATFORM_RESOURCES) +if (WIN32) + set (WSJTX_MANIFEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}/wsjtx.exe.manifest") + configure_file ( + "${CMAKE_CURRENT_SOURCE_DIR}/CMake/Modules/wsjtx-manifest.rc.in" + "${CMAKE_CURRENT_BINARY_DIR}/wsjtx-manifest.rc" + @ONLY + ) + list (APPEND wsjtx_PLATFORM_RESOURCES + "${CMAKE_CURRENT_BINARY_DIR}/wsjtx-manifest.rc") +endif (WIN32) + add_executable (wsjtx MACOSX_BUNDLE ${wsjtx_CXXSRCS} ${wsjtx_GENUISRCS} ${WSJTX_ICON_FILE} ${wsjtx_RESOURCES_RCC} ${wsjtx_VERSION_RESOURCES} + ${wsjtx_PLATFORM_RESOURCES} ) if (WSJT_CREATE_WINMAIN) @@ -1779,6 +1820,11 @@ install (TARGETS jt9 wsprd fmtave fcal fmeasure BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime ) +install (TARGETS qmap + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime + BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime + ) + if(WSJT_BUILD_UTILS) install (TARGETS ft8code jt65code jt9code jt4code msk144code q65code fst4sim ft8sim q65sim EchoCallSim testEchoCall echosim hash22calc cablog |
