I just build a package for Fedora 20 and needed to tweak a few things in
the CMake config to get a good build.

I addressed two issues:
1. PortAudio is required but is not detected or linked against.
2. Move the linking of palir-2.dll (which I'm guessing is a pre-built PA
library for windows) to the if(WIN32) conditional since it's not
appropriate for *nix systems.

Thanks,
Richard

diff -Naur wsprx-1.3.svn4329.orig/CMakeLists.txt
wsprx-1.3.svn4329/CMakeLists.txt
--- wsprx-1.3.svn4329.orig/CMakeLists.txt       2014-03-25
12:33:56.261722000 -0500
+++ wsprx-1.3.svn4329/CMakeLists.txt    2014-09-17 11:40:12.955116075 -0500
@@ -80,6 +80,16 @@
    find_library (usb_RUNTIME NAMES usb0 PATH_SUFFIXES bin)
 endif (WIN32)

+#
+# PortAudio
+#
+if(UNIX)
+   include(FindPkgConfig)
+   pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0)
+   include_directories(${PORTAUDIO_INCLUDE_DIRS})
+   string(REPLACE ";" " " PORTAUDIO_CFLAGS "${PORTAUDIO_CFLAGS}")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PORTAUDIO_CFLAGS}")
+endif()

 #
 # Qt5 setup
@@ -143,9 +153,9 @@
 qt5_wrap_ui (GENUISRCS ${UISRCS})

 add_executable (wsprx ${CXXSRCS} ${CSRCS} ${GENUISRCS} wsprx.rc)
-target_link_libraries (wsprx wsprximpl ${hamlib_LIBRARIES}
${fftw3f_LIBRARIES} ${CMAKE_CURRENT_SOURCE_DIR}/palir-02.dll)
+target_link_libraries (wsprx wsprximpl ${hamlib_LIBRARIES}
${fftw3f_LIBRARIES} ${PORTAUDIO_LIBRARIES})
 if (WIN32)
-  target_link_libraries (wsprx)
+  target_link_libraries (wsprx ${CMAKE_CURRENT_SOURCE_DIR}/palir-02.dll)
   set_target_properties (wsprx PROPERTIES LINK_FLAGS_RELEASE
"${LINKER_FLAGS_RELEASE} -mwindows")
 endif (WIN32)
 add_dependencies (wsprx kvasd)
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to