I believe you need the target as the first arg to target_link_libraries...I
didn't test this but sure sounds like what the error is saying...

target_link_libraries (wsprd ${FFTW3_LIBRARIES})

Mike W9MDB

-----Original Message-----
From: Joe Taylor [mailto:[email protected]] 
Sent: Friday, May 08, 2015 8:08 AM
To: [email protected]
Subject: [wsjt-devel] Help with CMakeLists.txt ?

Hi all,

Perhaps someone can help me to properly tweak CMakeLists.txt in the
wsjtx_exp branch so that the WSPR decoder wsprd[.exe] can be built by cmake
along with the other v1.6 executables.

Up to now I've been building wsprd manually, using one of the makefiles in
.../wsjtx_exp/lib/wsprd.  It's a trivial compile, using gcc or clang on the
files wsprd.c wsprd_utils.c fano.c tab.c nhash.c and linking the result
against the "double" version of FFTW3, libfftw3-3.dll.

Here's what I did to CMakeLists.txt:

############################################################################
#
(JTSDK-QT) C:\JTSDK\src\wsjtx_exp)svn diff
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt      (revision 5341)
+++ CMakeLists.txt      (working copy)
@@ -655,7 +655,6 @@
    set (QT_NEED_RPATH TRUE)
  endif ()

-
  #
  # OpenMP
  #
@@ -664,10 +663,9 @@
  #
  # fftw3 single precsion library
  #
-find_package (FFTW3 COMPONENTS single threads REQUIRED)
+find_package (FFTW3 COMPONENTS double single threads REQUIRED)
  include_directories (${FFTW3_INCLUDE_DIRS})

-
  #
  # libhamlib setup
  #
@@ -836,6 +834,9 @@
  add_executable (jt9code lib/jt9code.f90 wsjtx.rc)
  target_link_libraries (jt9code wsjt_fort wsjt_cxx)

+add_executable (wsprd lib/wsprd/wsprd.c lib/wsprd/wsprd_utils.c
lib/wsprd/fano.
c lib/wsprd/tab.c lib/wsprd/nhash.c wsjtx.rc)
+target_link_libraries (${FFTW3_LIBRARIES})
+

  add_executable (jt4code lib/jt4code.f90 wsjtx.rc)
  target_link_libraries (jt4code wsjt_fort wsjt_cxx)

@@ -940,7 +941,7 @@
    BUNDLE DESTINATION . COMPONENT runtime
    )

-install (TARGETS jt9 jt65code jt9code jt4code message_aggregator
+install (TARGETS jt9 jt65code jt9code jt4code wsprd message_aggregator
    RUNTIME DESTINATION ${WSJT_BIN_DESTINATION} COMPONENT runtime
    BUNDLE DESTINATION ${WSJT_BIN_DESTINATION} COMPONENT runtime
    )

############################################################################
#

... and here are the resulting error messages:

############################################################################
#
CMake Error at CMakeLists.txt:838 (target_link_libraries):
   Cannot specify link libraries for target "C:/JTSDK/fftw3f/libfftw3-3.dll"
   which is not built by this project.


-- Configuring incomplete, errors occurred!
See also "C:/JTSDK/wsjtx_exp/build/Release/CMakeFiles/CMakeOutput.log".

############################################################################
#

What needs to be done so that the double-precision FFTW library is
accessible for linking to wsprd?

(In passing, I'll mention that this need may be temporary -- I might change
to using the single-precision FFTW routines, as elsewhere in WSJT-X.  But
for now, I've built wsprd with the "double" FFTs.

Thanks for any help!

        -- Joe, K1JT

----------------------------------------------------------------------------
--
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications Performance
metrics, stats and reports that give you Actionable Insights Deep dive
visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to