mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 04:50:34 -04:00 
			
		
		
		
	Merge branch 'feat-map65-integration' of bitbucket.org:k1jt/wsjtx into feat-map65-integration
This commit is contained in:
		
						commit
						c143c2c279
					
				
							
								
								
									
										64
									
								
								CMake/Modules/FindHamlib.cmake
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								CMake/Modules/FindHamlib.cmake
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,64 @@ | ||||
| # | ||||
| # Find the hamlib library | ||||
| # | ||||
| # This will define the following variables:: | ||||
| # | ||||
| #  Hamlib_FOUND		- True if the system has the usb library | ||||
| #  Hamlib_VERSION	- The verion of the usb library which was found | ||||
| # | ||||
| # and the following imported targets:: | ||||
| # | ||||
| #  Hamlib::Hamlib	- The hamlib library | ||||
| # | ||||
| 
 | ||||
| include (LibFindMacros) | ||||
| 
 | ||||
| libfind_pkg_detect (Hamlib hamlib | ||||
|   FIND_PATH hamlib/rig.h PATH_SUFFIXES hamlib | ||||
|   FIND_LIBRARY hamlib | ||||
|   ) | ||||
| 
 | ||||
| libfind_package (Hamlib Usb) | ||||
| 
 | ||||
| libfind_process (Hamlib) | ||||
| 
 | ||||
| if (NOT Hamlib_PKGCONF_FOUND) | ||||
|   if (WIN32) | ||||
|     set (Hamlib_LIBRARIES ${Hamlib_LIBRARIES};ws2_32) | ||||
|   else () | ||||
|     set (Hamlib_LIBRARIES ${Hamlib_LIBRARIES};m;dl) | ||||
|   endif () | ||||
| elseif (UNIX AND NOT APPLE) | ||||
|   set (Hamlib_LIBRARIES ${Hamlib_PKGCONF_STATIC_LDFLAGS}) | ||||
| endif () | ||||
| 
 | ||||
| # fix up extra link libraries for macOS as target_link_libraries gets | ||||
| # it wrong for frameworks | ||||
| unset (_next_is_framework) | ||||
| unset (_Hamlib_EXTRA_LIBS) | ||||
| foreach (_lib IN LISTS Hamlib_PKGCONF_LDFLAGS) | ||||
|   if (_next_is_framework) | ||||
|     list (APPEND _Hamlib_EXTRA_LIBS "-framework ${_lib}") | ||||
|     unset (_next_is_framework) | ||||
|   elseif (${_lib} STREQUAL "-framework") | ||||
|     set (_next_is_framework TRUE) | ||||
|   else () | ||||
|     list (APPEND _Hamlib_EXTRA_LIBS ${_lib}) | ||||
|   endif () | ||||
| endforeach () | ||||
| 
 | ||||
| if (Hamlib_FOUND AND NOT TARGET Hamlib::Hamlib) | ||||
|   add_library (Hamlib::Hamlib UNKNOWN IMPORTED) | ||||
|   set_target_properties (Hamlib::Hamlib PROPERTIES | ||||
|     IMPORTED_LOCATION "${Hamlib_LIBRARY}" | ||||
|     INTERFACE_COMPILE_OPTIONS "${Hamlib_PKGCONF_STATIC_OTHER}" | ||||
|     INTERFACE_INCLUDE_DIRECTORIES "${Hamlib_INCLUDE_DIR}" | ||||
|     INTERFACE_LINK_LIBRARIES "${_Hamlib_EXTRA_LIBS}" | ||||
|     ) | ||||
| endif () | ||||
| 
 | ||||
| mark_as_advanced ( | ||||
|   Hamlib_INCLUDE_DIR | ||||
|   Hamlib_LIBRARY | ||||
|   Hamlib_LIBRARIES | ||||
|   ) | ||||
| @ -5,12 +5,12 @@ | ||||
| # | ||||
| # This will define the following variables:: | ||||
| # | ||||
| #  libusb_FOUND		- True if the system has the usb library | ||||
| #  libusb_VERSION	- The verion of the usb library which was found | ||||
| #  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:: | ||||
| # | ||||
| #  libusb::libusb	- The libusb library | ||||
| #  Usb::Usb	- The libusb library | ||||
| # | ||||
| 
 | ||||
| include (LibFindMacros) | ||||
| @ -25,25 +25,25 @@ if (WIN32) | ||||
|     set (_library_options PATH_SUFFIXES MinGW32/dll MinGW32/static) | ||||
|   endif () | ||||
| endif () | ||||
| libfind_pkg_detect (libusb libusb-1.0 | ||||
| libfind_pkg_detect (Usb usb-1.0 | ||||
|   FIND_PATH libusb.h PATH_SUFFIXES libusb-1.0 | ||||
|   FIND_LIBRARY usb-1.0 ${_library_options} | ||||
|   ) | ||||
| 
 | ||||
| libfind_process (libusb) | ||||
| libfind_process (Usb) | ||||
| 
 | ||||
| if (libusb_FOUND AND NOT TARGET libusb::libusb) | ||||
|   add_library (libusb::libusb UNKNOWN IMPORTED) | ||||
|   set_target_properties (libusb::libusb PROPERTIES | ||||
|     IMPORTED_LOCATION "${libusb_LIBRARY}" | ||||
|     INTERFACE_COMPILE_OPTIONS "${libusb_PKGCONF_CFLAGS_OTHER}" | ||||
|     INTERFACE_INCLUDE_DIRECTORIES "${libusb_INCLUDE_DIRS}" | ||||
|     INTERFACE_LINK_LIBRARIES "${libusb_LIBRARIES}" | ||||
| 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 "${Usb_PKGCONF_CFLAGS_OTHER}" | ||||
|     INTERFACE_INCLUDE_DIRECTORIES "${Usb_INCLUDE_DIRS}" | ||||
|     INTERFACE_LINK_LIBRARIES "${Usb_LIBRARIES}" | ||||
|     ) | ||||
| endif () | ||||
| 
 | ||||
| mark_as_advanced ( | ||||
|   libusb_INCLUDE_DIR | ||||
|   libusb_LIBRARY | ||||
|   libusb_LIBRARIES | ||||
|   Usb_INCLUDE_DIR | ||||
|   Usb_LIBRARY | ||||
|   Usb_LIBRARIES | ||||
|   ) | ||||
| @ -1,49 +0,0 @@ | ||||
| # | ||||
| # Find the hamlib library | ||||
| # | ||||
| # This will define the following variables:: | ||||
| # | ||||
| #  hamlib_FOUND		- True if the system has the usb library | ||||
| #  hamlib_VERSION	- The verion of the usb library which was found | ||||
| # | ||||
| # and the following imported targets:: | ||||
| # | ||||
| #  hamlib::hamlib	- The hamlib library | ||||
| # | ||||
| 
 | ||||
| include (LibFindMacros) | ||||
| 
 | ||||
| libfind_pkg_detect (hamlib hamlib | ||||
|   FIND_PATH hamlib/rig.h PATH_SUFFIXES hamlib | ||||
|   FIND_LIBRARY hamlib | ||||
|   ) | ||||
| 
 | ||||
| libfind_package (hamlib libusb) | ||||
| 
 | ||||
| libfind_process (hamlib) | ||||
| 
 | ||||
| if (NOT hamlib_PKGCONF_FOUND) | ||||
|   if (WIN32) | ||||
|     set (hamlib_LIBRARIES ${hamlib_LIBRARIES};ws2_32) | ||||
|   else () | ||||
|     set (hamlib_LIBRARIES ${hamlib_LIBRARIES};m;dl) | ||||
|   endif () | ||||
| elseif (UNIX AND NOT APPLE) | ||||
|   set (hamlib_LIBRARIES ${hamlib_PKGCONF_STATIC_LDFLAGS}) | ||||
| endif () | ||||
| 
 | ||||
| if (hamlib_FOUND AND NOT TARGET hamlib::hamlib) | ||||
|   add_library (hamlib::hamlib UNKNOWN IMPORTED) | ||||
|   set_target_properties (hamlib::hamlib PROPERTIES | ||||
|     IMPORTED_LOCATION "${hamlib_LIBRARY}" | ||||
|     INTERFACE_COMPILE_OPTIONS "${hamlib_PKGCONF_STATIC_CFLAGS_OTHER}" | ||||
|     INTERFACE_INCLUDE_DIRECTORIES "${hamlib_INCLUDE_DIR}" | ||||
|     INTERFACE_LINK_LIBRARIES "${hamlib_LIBRARIES}" | ||||
|     ) | ||||
| endif () | ||||
| 
 | ||||
| mark_as_advanced ( | ||||
|   hamlib_INCLUDE_DIR | ||||
|   hamlib_LIBRARY | ||||
|   hamlib_LIBRARIES | ||||
|   ) | ||||
| @ -870,9 +870,9 @@ find_package (OpenMP) | ||||
| find_package (FFTW3 COMPONENTS single threads REQUIRED) | ||||
| 
 | ||||
| # | ||||
| # libhamlib setup | ||||
| # hamlib setup | ||||
| # | ||||
| find_package (hamlib REQUIRED) | ||||
| find_package (Hamlib REQUIRED) | ||||
| find_program (RIGCTL_EXE rigctl) | ||||
| find_program (RIGCTLD_EXE rigctld) | ||||
| find_program (RIGCTLCOM_EXE rigctlcom) | ||||
| @ -1324,7 +1324,7 @@ target_link_libraries (qcp Qt5::Widgets Qt5::PrintSupport) | ||||
| add_library (wsjt_qt STATIC ${wsjt_qt_CXXSRCS} ${wsjt_qt_GENUISRCS} ${GENAXSRCS}) | ||||
| # set wsjtx_udp exports to static variants | ||||
| target_compile_definitions (wsjt_qt PUBLIC UDP_STATIC_DEFINE) | ||||
| target_link_libraries (wsjt_qt hamlib::hamlib Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql) | ||||
| target_link_libraries (wsjt_qt Hamlib::Hamlib Boost::log qcp Qt5::Widgets Qt5::Network Qt5::Sql) | ||||
| if (WIN32) | ||||
|   target_link_libraries (wsjt_qt Qt5::AxContainer Qt5::AxBase) | ||||
| endif (WIN32) | ||||
| @ -1709,7 +1709,7 @@ if (NOT is_debug_build) | ||||
|     # if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation | ||||
|     set (fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/${CMAKE_PROJECT_NAME}${CMAKE_EXECUTABLE_SUFFIX}") | ||||
| 
 | ||||
|     #get_filename_component (hamlib_lib_dir ${hamlib_LIBRARIES} PATH) | ||||
|     #get_filename_component (hamlib_lib_dir ${Hamlib_LIBRARIES} PATH) | ||||
| 
 | ||||
|     if (APPLE) | ||||
|       # install required Qt plugins | ||||
| @ -1823,9 +1823,9 @@ if (NOT is_debug_build) | ||||
|     endif (WIN32) | ||||
| 
 | ||||
|     #list (APPEND fixup_library_dirs ${hamlib_lib_dir}) | ||||
|     list (APPEND fixup_library_dirs ${hamlib_LIBRARY_DIRS}) | ||||
|     list (APPEND fixup_library_dirs ${Hamlib_LIBRARY_DIRS}) | ||||
| 
 | ||||
|     install (CODE " | ||||
|     INSTALL (CODE " | ||||
|         get_filename_component (the_path \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${WSJT_PLUGIN_DESTINATION}\" REALPATH) | ||||
|         file (GLOB_RECURSE QTPLUGINS \"\${the_path}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\") | ||||
|         set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/Modules ${CMAKE_MODULE_PATH}) | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| find_package (Portaudio REQUIRED) | ||||
| 
 | ||||
| find_package (libusb REQUIRED) | ||||
| find_package (Usb REQUIRED) | ||||
| 
 | ||||
| set (map65_CXXSRCS | ||||
|   about.cpp | ||||
| @ -52,7 +52,7 @@ add_subdirectory (libm65) | ||||
| qt5_wrap_ui (map65_GENUISRCS ${map65_UISRCS}) | ||||
| 
 | ||||
| add_executable (map65 ${map65_CXXSRCS} ${map65_CSRCS} ${map65_GENUISRCS} map65.rc) | ||||
| target_link_libraries (map65 m65impl ${FFTW3_LIBRARIES} Qt5::Widgets Qt5::Network Portaudio::Portaudio libusb::libusb) | ||||
| target_link_libraries (map65 m65impl ${FFTW3_LIBRARIES} Qt5::Widgets Qt5::Network Portaudio::Portaudio Usb::Usb) | ||||
| 
 | ||||
| install ( | ||||
|   TARGETS map65 | ||||
|  | ||||
| @ -44,8 +44,8 @@ subroutine ccf65(ss,nhsym,ssmax,sync1,ipol1,jpz,dt1,flipk,      & | ||||
| ! Not sure why, but it works significantly better without the following line: | ||||
| !        pr(j-1)=pr(j) | ||||
|      enddo | ||||
|      call four2a(pr,NFFT,1,-1,0) | ||||
|      call four2a(pr2,NFFT,1,-1,0) | ||||
|      call four2a(cpr,NFFT,1,-1,0) | ||||
|      call four2a(cpr2,NFFT,1,-1,0) | ||||
|      first=.false. | ||||
|   endif | ||||
|   syncshort=0. | ||||
| @ -64,7 +64,7 @@ subroutine ccf65(ss,nhsym,ssmax,sync1,ipol1,jpz,dt1,flipk,      & | ||||
|      call pctile(s,nhsym-1,50,base) | ||||
|      s(1:nhsym-1)=s(1:nhsym-1)-base | ||||
|      s(nhsym:NFFT)=0. | ||||
|      call four2a(s,NFFT,1,-1,0)                !Real-to-complex FFT | ||||
|      call four2a(cs,NFFT,1,-1,0)                !Real-to-complex FFT | ||||
|      do i=0,NH | ||||
|         cs2(i)=cs(i)*conjg(cpr2(i))            !Mult by complex FFT of pr2 | ||||
|         cs(i)=cs(i)*conjg(cpr(i))              !Mult by complex FFT of pr | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user