Changes to integrate into WSJT-X build system

A  separate install  of the  portaudio  library is  now required,  see
"doc/building on MS Windows.txt" for a suitable recipe.

The map65  code base  is still  MS Windows specific  in some  areas so
don't expect successful builds on Linux or macOS yet.
This commit is contained in:
Bill Somerville
2021-04-10 12:25:28 +01:00
parent 769e00ab88
commit 74bd3c1d0c
24 changed files with 305 additions and 1750 deletions
+47
View File
@@ -0,0 +1,47 @@
# - Try to find portaudio
#
# Once done, this will define:
#
# portaudio_FOUND - system has portaudio
# portaudio_INCLUDE_DIRS - the portaudio include directories
# portaudio_LIBRARIES - link these to use portaudio
# portaudio_LIBRARY_DIRS - required shared/dynamic libraries are here
#
# If portaudio_STATIC is TRUE then static linking will be assumed
#
include (LibFindMacros)
set (portaudio_LIBRARY_DIRS)
# pkg-config?
find_path (__portaudio_pc_path NAMES portaudio-2.0.pc
PATH_SUFFIXES lib/pkgconfig lib64/pkgconfig
)
if (__portaudio_pc_path)
set (__pc_path $ENV{PKG_CONFIG_PATH})
list (APPEND __pc_path "${__portaudio_pc_path}")
set (ENV{PKG_CONFIG_PATH} "${__pc_path}")
unset (__pc_path CACHE)
endif ()
unset (__portaudio_pc_path CACHE)
# Use pkg-config to get hints about paths, libs and, flags
unset (__pkg_config_checked_hamlib CACHE)
libfind_pkg_check_modules (PORTAUDIO portaudio-2.0)
if (portaudio_STATIC)
set (portaudio_PROCESS_INCLUDES PORTAUDIO_STATIC_INCLUDE_DIRS)
set (portaudio_PROCESS_LIBS PORTAUDIO_STATIC_LDFLAGS)
set (portaudio_LIBRARY_DIRS ${PORTAUDIO_STATIC_LIBRARY_DIRS})
else ()
set (portaudio_PROCESS_INCLUDES PORTAUDIO_INCLUDE_DIRS)
set (portaudio_PROCESS_LIBS PORTAUDIO_LDFLAGS)
set (portaudio_LIBRARY_DIRS ${PORTAUDIO_LIBRARY_DIRS})
endif ()
libfind_process (portaudio)
# Handle the QUIETLY and REQUIRED arguments and set PORTAUDIO_FOUND to
# TRUE if all listed variables are TRUE
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (portaudio DEFAULT_MSG portaudio_INCLUDE_DIRS portaudio_LIBRARIES portaudio_LIBRARY_DIRS)
+57
View File
@@ -0,0 +1,57 @@
# Findusb
# =======
#
# Find the usb library
#
# This will define the following variables::
#
# usb_FOUND - True if the system has the usb library
# usb_VERSION - The verion of the usb library which was found
#
# and the following imported targets::
#
# usb::usb - The libusb library
find_package (PkgConfig)
pkg_check_modules (PC_usb QUIET usb)
find_path (usb_INCLUDE_DIR
NAMES libusb.h
PATHS ${PC_usb_INCLUDE_DIRS}
PATH_SUFFIXES libusb-1.0
)
find_library (usb_LIBRARY
NAMES libusb-1.0
PATHS $PC_usb_LIBRARY_DIRS}
)
set (usb_VERSION ${PC_usb_VERSION})
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (usb
FOUND_VAR usb_FOUND
REQUIRED_VARS
usb_LIBRARY
usb_INCLUDE_DIR
VERSION_VAR usb_VERSION
)
if (usb_FOUND)
set (usb_LIBRARIES ${usb_LIBRARY})
set (usb_INCLUDE_DIRS ${usb_INCLUDE_DIR})
set (usb_DEFINITIONS ${PC_usb_CFLAGS_OTHER})
endif ()
if (usb_FOUND AND NOT TARGET usb::usb)
add_library (usb::usb UNKNOWN IMPORTED)
set_target_properties (usb::usb PROPERTIES
IMPORTED_LOCATION "${usb_LIBRARY}"
INTERFACE_COMPILE_OPTIONS "${PC_usb_CFLAGS_OTHER}"
INTERFACE_INCLUDE_DIRECTORIES "${usb_INCLUDE_DIR}"
)
endif ()
mark_as_advanced (
usb_INCLUDE_DIR
usb_LIBRARY
)