Merge branch 'master' into ms-page-fault
commit
040c116c41
|
@ -432,6 +432,27 @@ if(HAMLIB_LIBRARY AND HAMLIB_INCLUDE_DIR)
|
|||
message(STATUS "Hamlib library found.")
|
||||
include_directories(${HAMLIB_INCLUDE_DIR})
|
||||
list(APPEND FREEDV_LINK_LIBS ${HAMLIB_LIBRARY})
|
||||
|
||||
# Special-case to determine whether the user is using Hamlib >=4.6.
|
||||
# In 4.6, RIGCAPS_NO_CONST is no longer defined and causes compiler
|
||||
# errors during build without special logic to handle this. This may
|
||||
# also be true in 4.7 as the test script below prints 4.7~git on Fedora
|
||||
# 42 as of 2025-06-15.
|
||||
if (NOT CMAKE_CROSSCOMPILING)
|
||||
try_run(HAMLIB_RUN_RESULT HAMLIB_COMPILE_RESULT
|
||||
SOURCES ${CMAKE_SOURCE_DIR}/cmake/hamlib-test.c
|
||||
CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${HAMLIB_INCLUDE_DIR}
|
||||
LINK_LIBRARIES ${HAMLIB_LIBRARY}
|
||||
RUN_OUTPUT_VARIABLE HAMLIB_VERSION)
|
||||
if (NOT HAMLIB_COMPILE_RESULT OR NOT HAMLIB_RUN_RESULT OR NOT HAMLIB_VERSION)
|
||||
message(FATAL_ERROR "Could not determine Hamlib version.")
|
||||
else()
|
||||
if (NOT HAMLIB_VERSION STRLESS "Hamlib 4.6")
|
||||
message(STATUS "Enabling Hamlib 4.6 compile workaround.")
|
||||
add_definitions(-DHAMLIB_CONST_WORKAROUND)
|
||||
endif (NOT HAMLIB_VERSION STRLESS "Hamlib 4.6")
|
||||
endif (NOT HAMLIB_COMPILE_RESULT OR NOT HAMLIB_RUN_RESULT OR NOT HAMLIB_VERSION)
|
||||
endif (NOT CMAKE_CROSSCOMPILING)
|
||||
else(HAMLIB_LIBRARY AND HAMLIB_INCLUDE_DIR)
|
||||
message(STATUS "Using own Hamlib build")
|
||||
include(cmake/BuildHamlib.cmake)
|
||||
|
|
|
@ -805,6 +805,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
|
|||
* FreeDV Reporter: Work around Linux bug preventing some flag emojis from being fully deleted on backspace. (PR #931)
|
||||
* Fix GTK+ assertion after FreeDV Reporter has been open for a long time. (PR #929)
|
||||
* Easy Setup: Use card names instead of device names for generating device list. (PR #932)
|
||||
* Fix compiler error on Fedora 42 when using Hamlib packages. (PR #936)
|
||||
* Prevent real-time memory from being swapped by OS to reduce audio dropouts. (PR #933)
|
||||
2. Documentation:
|
||||
* Add missing dependency for macOS builds to README. (PR #925; thanks @relistan!)
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#include <stdio.h>
|
||||
#include <hamlib/rig.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
printf("%s", hamlib_version);
|
||||
return 1;
|
||||
}
|
|
@ -37,11 +37,11 @@ HamlibRigController::RigList HamlibRigController::RigList_;
|
|||
HamlibRigController::RigNameList HamlibRigController::RigNameList_;
|
||||
std::mutex HamlibRigController::RigListMutex_;
|
||||
|
||||
#if RIGCAPS_NOT_CONST
|
||||
#if RIGCAPS_NOT_CONST && !HAMLIB_CONST_WORKAROUND
|
||||
int HamlibRigController::BuildRigList_(struct rig_caps *rig, rig_ptr_t rigList) {
|
||||
#else
|
||||
int HamlibRigController::BuildRigList_(const struct rig_caps *rig, rig_ptr_t rigList) {
|
||||
#endif // RIGCAPS_NOT_CONST
|
||||
#endif // RIGCAPS_NOT_CONST && !HAMLIB_CONST_WORKAROUND
|
||||
((HamlibRigController::RigList *)rigList)->push_back(rig);
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -107,11 +107,11 @@ private:
|
|||
|
||||
static bool RigCompare_(const struct rig_caps *rig1, const struct rig_caps *rig2);
|
||||
|
||||
#if RIGCAPS_NOT_CONST
|
||||
#if RIGCAPS_NOT_CONST && !HAMLIB_CONST_WORKAROUND
|
||||
static int BuildRigList_(struct rig_caps *rig, rig_ptr_t);
|
||||
#else
|
||||
static int BuildRigList_(const struct rig_caps *rig, rig_ptr_t);
|
||||
#endif // RIGCAPS_NOT_CONST
|
||||
#endif // RIGCAPS_NOT_CONST && !HAMLIB_CONST_WORKAROUND
|
||||
};
|
||||
|
||||
#endif // HAMLIB_RIG_CONTROLLER_H
|
||||
|
|
Loading…
Reference in New Issue