-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
1715 lines (1508 loc) · 51.2 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
cmake_minimum_required (VERSION 2.8.10 FATAL_ERROR)
if (APPLE)
#
# The following variables define the portability and compatability attributes of the Mac OS X build
# they are choosen with care and should not be changed without good cause.
#
# Among other things these options are chosen to match the portability and compatability options of the
# Qt framework dylibs which can be checked as follows:
#
# otool -l <binary> | grep -A3 LC_VERSION_MIN_MACOSX
#
set (CMAKE_OSX_DEPLOYMENT_TARGET 10.9
CACHE STRING "Earliest version of OS X supported
Earliest version we can support with Qt 5.8, C++11 & libc++ is 10.9.
Do not override this if you intend to build an official deployable installer.")
set (CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
CACHE STRING "Mac OS X SDK to build with
Change this to the newest SDK available that you can install on your system (10.11 preferred).
Do not override this if you intend to build an official deployable installer.")
endif (APPLE)
project (wsjtx C CXX Fortran)
#
# CMake policies
#
if (POLICY CMP0020)
cmake_policy (SET CMP0020 NEW) # link to Qt winmain on Windows
endif (POLICY CMP0020)
if (POLICY CMP0043)
cmake_policy (SET CMP0043 NEW) # ignore COMPILE_DEFINITIONS_<CONFIG>
endif (POLICY CMP0043)
if (POLICY CMP0063)
cmake_policy (SET CMP0063 NEW) # honour visibility properties for all library types
endif (POLICY CMP0063)
include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake)
message (STATUS "Building ${CMAKE_PROJECT_NAME}-${wsjtx_VERSION}")
#
# project information
#
set (PROJECT_NAME "WSJT-X")
set (PROJECT_VENDOR "Joe Taylor, K1JT")
set (PROJECT_CONTACT "Joe Taylor <[email protected]>")
set (PROJECT_COPYRIGHT "Copyright (C) 2001-2017 by Joe Taylor, K1JT")
set (PROJECT_HOMEPAGE http://www.physics.princeton.edu/pulsar/K1JT/wsjtx.html)
set (PROJECT_MANUAL wsjtx-main)
set (PROJECT_MANUAL_DIRECTORY_URL http://www.physics.princeton.edu/pulsar/K1JT/wsjtx-doc/)
set (PROJECT_SAMPLES_URL http://downloads.sourceforge.net/project/wsjt/)
set (PROJECT_SAMPLES_UPLOAD_DEST frs.sourceforge.net:/home/frs/project/wsjt/)
set (PROJECT_SUMMARY_DESCRIPTION "${PROJECT_NAME} - Digital Modes for Weak Signal Communicaitons in Amateur Radio.")
set (PROJECT_DESCRIPTION "${PROJECT_SUMMARY_DESCRIPTION}
${PROJECT_NAME} is a computer program designed to facilitate basic amateur
radio communication using very weak signals. The first four letters in
the program name stand for `(W)eak (S)ignal communication by
K1(JT),` while the suffix `-X` indicates that ${PROJECT_NAME} started as
an extended and experimental branch of the program
WSJT.
.
${PROJECT_NAME} Version 1.8 offers nine different protocols or modes: FT8,
JT4, JT9, JT65, QRA64, ISCAT, MSK144, WSPR, and Echo.
The first five are designed for making reliable QSOs under extreme
weak-signal conditions. They use nearly identical message structure
and source encoding. JT65 and QRA64 were designed for EME
(`moonbounce`) on the VHF/UHF bands and have also proven very
effective for worldwide QRP communication on the HF bands. QRA64 has
a number of advantages over JT65, including better performance on the
very weakest signals. We imagine that over time it may replace JT65
for EME use. JT9 was originally designed for the LF, MF, and lower HF
bands. Its submode JT9A is 2 dB more sensitive than JT65 while using
less than 10% of the bandwidth. JT4 offers a wide variety of tone
spacings and has proven highly effective for EME on microwave bands up
to 24 GHz. These four `slow` modes use one-minute timed sequences
of alternating transmission and reception, so a minimal QSO takes four
to six minutes — two or three transmissions by each station, one
sending in odd UTC minutes and the other even. FT8 is operationally
similar but four times faster (15-second T/R sequences) and less
sensitive by a few dB. On the HF bands, world-wide QSOs are possible
with any of these modes using power levels of a few watts (or even
milliwatts) and compromise antennas. On VHF bands and higher, QSOs
are possible (by EME and other propagation types) at signal levels 10
to 15 dB below those required for CW.
.
ISCAT, MSK144, and optionally submodes JT9E-H are `fast`
protocols designed to take advantage of brief signal enhancements from
ionized meteor trails, aircraft scatter, and other types of scatter
propagation. These modes use timed sequences of 5, 10, 15, or 30 s
duration. User messages are transmitted repeatedly at high rate (up
to 250 characters per second, for MSK144) to make good use of the
shortest meteor-trail reflections or `pings`. ISCAT uses free-form
messages up to 28 characters long, while MSK144 uses the same
structured messages as the slow modes and optionally an abbreviated
format with hashed callsigns.
.
WSPR (pronounced `whisper`) stands for (W)eak (S)ignal
(P)ropagation (R)eporter. The WSPR protocol was designed for probing
potential propagation paths using low-power transmissions. WSPR
messages normally carry the transmitting station’s callsign, grid
locator, and transmitter power in dBm, and they can be decoded at
signal-to-noise ratios as low as -28 dB in a 2500 Hz bandwidth. WSPR
users with internet access can automatically upload reception
reports to a central database called wsprnet that provides a mapping
facility, archival storage, and many other features.
.
Echo mode allows you to detect and measure your own station's echoes
from the moon, even if they are far below the audible threshold.
.
${PROJECT_NAME} provides spectral displays for receiver passbands as wide as
5 kHz, flexible rig control for nearly all modern radios used by
amateurs, and a wide variety of special aids such as automatic Doppler
tracking for EME QSOs and Echo testing. The program runs equally well
on Windows, Macintosh, and Linux systems, and installation packages
are available for all three platforms.
.
Be sure to read the online ${PROJECT_NAME} User's Guide.")
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/Modules ${CMAKE_MODULE_PATH})
# make sure that the default configuration is a RELEASE
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING
"Choose the type of build, options are: None Debug Release."
FORCE)
endif (NOT CMAKE_BUILD_TYPE)
if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]")
set (is_debug_build 1)
endif ()
#
# Options & features
#
# Some of these directly effect compilation by being defined in
# wsjtx_config.h.in which makes them available to the C/C++
# pre-processor.
#
include (CMakeDependentOption)
# Allow the developer to select if Dynamic or Static libraries are built
OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
# Set the LIB_TYPE variable to STATIC
SET (LIB_TYPE STATIC)
if (BUILD_SHARED_LIBS)
# User wants to build Dynamic Libraries, so change the LIB_TYPE variable to CMake keyword 'SHARED'
set (LIB_TYPE SHARED)
endif (BUILD_SHARED_LIBS)
option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts
files (WARNING: make clean will delete the source .ts files! Danger!)")
option (WSJT_SHARED_RUNTIME "Debugging option that allows running from a shared Cloud directory.")
option (WSJT_QDEBUG_TO_FILE "Redirect Qt debuging messages to a trace file.")
option (WSJT_TRACE_CAT "Debugging option that turns on CAT diagnostics.")
option (WSJT_TRACE_CAT_POLLS "Debugging option that turns on CAT diagnostics during polling.")
option (WSJT_HAMLIB_TRACE "Debugging option that turns on minimal Hamlib internal diagnostics.")
option (WSJT_SOFT_KEYING "Apply a ramp to CW keying envelope to reduce transients." ON)
option (WSJT_SKIP_MANPAGES "Skip *nix manpage generation.")
option (WSJT_GENERATE_DOCS "Generate documentation files." ON)
option (WSJT_RIG_NONE_CAN_SPLIT "Allow split operation with \"None\" as rig.")
CMAKE_DEPENDENT_OPTION (WSJT_HAMLIB_VERBOSE_TRACE "Debugging option that turns on full Hamlib internal diagnostics." OFF WSJT_HAMLIB_TRACE OFF)
CMAKE_DEPENDENT_OPTION (WSJT_QDEBUG_IN_RELEASE "Leave Qt debugging statements in Release configuration." OFF
"NOT is_debug_build" OFF)
CMAKE_DEPENDENT_OPTION (WSJT_ENABLE_EXPERIMENTAL_FEATURES "Enable features not fully ready for public releases." ON
is_debug_build OFF)
CMAKE_DEPENDENT_OPTION (WSJT_CREATE_WINMAIN
"The wsjtx target is normally built as GUI executable with a WinMain entry point on Windows,
if you want a console application instead then set this option to OFF.
If you just want to see the debug output from the application then the easiest way is to
attach a debugger which will then receive the console output inside its console." ON
"WIN32" OFF)
set (PROJECT_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
if (NOT PROJECT_ARCHITECTURE)
# This is supposed to happen already on Windows
set (PROJECT_ARCHITECTURE "$ENV{PROCESSOR_ARCHITECTURE}")
endif (NOT PROJECT_ARCHITECTURE)
message (STATUS "******************************************************")
message (STATUS "Building for for: ${CMAKE_SYSTEM_NAME}-${PROJECT_ARCHITECTURE}")
message (STATUS "******************************************************")
#
# install locations
#
if (APPLE)
set (CMAKE_INSTALL_BINDIR ${CMAKE_PROJECT_NAME}.app/Contents/MacOS)
set (CMAKE_INSTALL_DATAROOTDIR ${CMAKE_PROJECT_NAME}.app/Contents/Resources)
endif ()
include (GNUInstallDirs)
set (PLUGIN_DESTINATION ${CMAKE_INSTALL_LIBDIR}/plugins)
set (QT_CONF_DESTINATION ${CMAKE_INSTALL_BINDIR})
if (WIN32)
set (PLUGIN_DESTINATION plugins)
elseif (APPLE)
set (PLUGIN_DESTINATION ${CMAKE_INSTALL_BINDIR}/../PlugIns)
set (QT_CONF_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR})
endif ()
set (WSJT_PLUGIN_DESTINATION ${PLUGIN_DESTINATION} CACHE PATH "Path for plugins")
set (WSJT_QT_CONF_DESTINATION ${QT_CONF_DESTINATION} CACHE PATH "Path for the qt.conf file")
#
# Project sources
#
set (wsjt_qt_CXXSRCS
qt_helpers.cpp
MessageBox.cpp
MetaDataRegistry.cpp
NetworkServerLookup.cpp
revision_utils.cpp
WFPalette.cpp
Radio.cpp
RadioMetaType.cpp
IARURegions.cpp
Bands.cpp
Modes.cpp
FrequencyList.cpp
StationList.cpp
FrequencyLineEdit.cpp
CandidateKeyFilter.cpp
ForeignKeyDelegate.cpp
LiveFrequencyValidator.cpp
GetUserId.cpp
TraceFile.cpp
AudioDevice.cpp
Transceiver.cpp
TransceiverBase.cpp
EmulateSplitTransceiver.cpp
TransceiverFactory.cpp
PollingTransceiver.cpp
HamlibTransceiver.cpp
HRDTransceiver.cpp
DXLabSuiteCommanderTransceiver.cpp
NetworkMessage.cpp
MessageClient.cpp
LettersSpinBox.cpp
HintedSpinBox.cpp
RestrictedSpinBox.cpp
HelpTextWindow.cpp
SampleDownloader.cpp
SampleDownloader/DirectoryDelegate.cpp
SampleDownloader/Directory.cpp
SampleDownloader/FileNode.cpp
SampleDownloader/RemoteFile.cpp
DisplayManual.cpp
MultiSettings.cpp
MaidenheadLocatorValidator.cpp
CallsignValidator.cpp
SplashScreen.cpp
EqualizationToolsDialog.cpp
DoubleClickablePushButton.cpp
DoubleClickableRadioButton.cpp
)
set (wsjt_qtmm_CXXSRCS
Audio/BWFFile.cpp
)
set (jt9_FSRCS
lib/jt9.f90
lib/jt9a.f90
)
set (jt9_CXXSRCS
lib/ipcomm.cpp
)
set (wsjtx_CXXSRCS
logbook/adif.cpp
logbook/countrydat.cpp
logbook/countriesworked.cpp
logbook/logbook.cpp
psk_reporter.cpp
Modulator.cpp
Detector.cpp
logqso.cpp
displaytext.cpp
decodedtext.cpp
getfile.cpp
soundout.cpp
soundin.cpp
meterwidget.cpp
signalmeter.cpp
plotter.cpp
widegraph.cpp
echograph.cpp
echoplot.cpp
fastgraph.cpp
fastplot.cpp
about.cpp
astro.cpp
messageaveraging.cpp
WsprTxScheduler.cpp
mainwindow.cpp
Configuration.cpp
main.cpp
wsprnet.cpp
WSPRBandHopping.cpp
)
set (wsjt_CXXSRCS
lib/crc10.cpp
lib/crc12.cpp
)
# deal with a GCC v6 UB error message
set_source_files_properties (
lib/crc10.cpp
lib/crc12.cpp
PROPERTIES COMPILE_FLAGS -fpermissive)
if (WIN32)
set (wsjt_CXXSRCS
${wsjt_CXXSRCS}
killbyname.cpp
)
set (wsjt_qt_CXXSRCS
${wsjt_qt_CXXSRCS}
OmniRigTransceiver.cpp
)
endif (WIN32)
set (wsjt_FSRCS
# put module sources first in the hope that they get rebuilt before use
lib/crc.f90
lib/fftw3mod.f90
lib/hashing.f90
lib/iso_c_utilities.f90
lib/jt4.f90
lib/jt4_decode.f90
lib/jt65_decode.f90
lib/jt65_mod.f90
lib/ft8_decode.f90
lib/jt9_decode.f90
lib/options.f90
lib/packjt.f90
lib/readwav.f90
lib/timer_C_wrapper.f90
lib/timer_impl.f90
lib/timer_module.f90
lib/wavhdr.f90
# remaining non-module sources
lib/addit.f90
lib/afc65b.f90
lib/afc9.f90
lib/ana64.f90
lib/ana932.f90
lib/analytic.f90
lib/astro.f90
lib/astrosub.f90
lib/astro0.f90
lib/avecho.f90
lib/averms.f90
lib/azdist.f90
lib/badmsg.f90
lib/fsk4hf/baseline.f90
lib/bpdecode40.f90
lib/bpdecode144.f90
lib/fsk4hf/bpdecode120.f90
lib/fsk4hf/bpdecode168.f90
lib/fsk4hf/bpdecode174.f90
lib/fsk4hf/bpdecode300.f90
lib/baddata.f90
lib/calibrate.f90
lib/ccf2.f90
lib/ccf65.f90
lib/fsk4hf/chkcrc10.f90
lib/fsk4hf/chkcrc12.f90
lib/fsk4hf/chkcrc12a.f90
lib/chkcall.f90
lib/chkhist.f90
lib/chkmsg.f90
lib/chkss2.f90
lib/coord.f90
lib/fsk4hf/cpolyfit.f90
lib/fsk4hf/cpolyfitw.f90
lib/db.f90
lib/decode4.f90
lib/decode65a.f90
lib/decode65b.f90
lib/decode9w.f90
lib/decoder.f90
lib/deep4.f90
lib/deg2grid.f90
lib/degrade_snr.f90
lib/demod64a.f90
lib/determ.f90
lib/downsam9.f90
lib/encode232.f90
lib/encode4.f90
lib/encode_msk40.f90
lib/encode_msk144.f90
lib/fsk4hf/encode120.f90
lib/fsk4hf/encode168.f90
lib/fsk4hf/encode174.f90
lib/fsk4hf/encode300.f90
lib/entail.f90
lib/ephem.f90
lib/extract.f90
lib/extract4.f90
lib/extractmessage144.f90
lib/fsk4hf/extractmessage168.f90
lib/fsk4hf/extractmessage174.f90
lib/fano232.f90
lib/fast9.f90
lib/fast_decode.f90
lib/fchisq.f90
lib/fchisq0.f90
lib/fchisq65.f90
lib/fil3.f90
lib/fil3c.f90
lib/fil4.f90
lib/fil6521.f90
lib/filbig.f90
lib/fitcal.f90
lib/fix_contest_msg.f90
lib/flat1.f90
lib/flat1a.f90
lib/flat1b.f90
lib/flat2.f90
lib/flat4.f90
lib/flat65.f90
lib/fmtmsg.f90
lib/foldspec9f.f90
lib/four2a.f90
lib/fqso_first.f90
lib/freqcal.f90
lib/fsk4hf/fsk4hf.f90
lib/fsk4hf/ft8apset.f90
lib/fsk4hf/ft8b.f90
lib/fsk4hf/ft8_downsample.f90
lib/fsk4hf/ft8sim.f90
lib/gen4.f90
lib/gen65.f90
lib/gen9.f90
lib/geniscat.f90
lib/fsk4hf/genfsk4hf.f90
lib/fsk4hf/genft8.f90
lib/genmsk144.f90
lib/genmsk40.f90
lib/fsk4hf/genmskhf.f90
lib/fsk4hf/genwsprlf.f90
lib/fsk4hf/genwspr_fsk8.f90
lib/fsk4hf/getfc1.f90
lib/fsk4hf/getfc2.f90
lib/fsk4hf/getfc1w.f90
lib/fsk4hf/getfc2w.f90
lib/genqra64.f90
lib/fsk4hf/genft8refsig.f90
lib/genwspr.f90
lib/geodist.f90
lib/getlags.f90
lib/getmet4.f90
lib/graycode.f90
lib/graycode65.f90
lib/grayline.f90
lib/grid2deg.f90
lib/hash.f90
lib/hint65.f90
lib/hspec.f90
lib/indexx.f90
lib/init_random_seed.f90
lib/interleave4.f90
lib/interleave63.f90
lib/interleave9.f90
lib/inter_wspr.f90
lib/iscat.f90
lib/jplsubs.f
lib/jt9fano.f90
lib/jtmsg.f90
lib/ldpcsim144.f90
lib/fsk4hf/ldpcsim120.f90
lib/fsk4hf/ldpcsim168.f90
lib/fsk4hf/ldpcsim174.f90
lib/fsk4hf/ldpcsim300.f90
lib/ldpcsim40.f90
lib/libration.f90
lib/lorentzian.f90
lib/lpf1.f90
lib/mixlpf.f90
lib/makepings.f90
lib/moondopjpl.f90
lib/morse.f90
lib/move.f90
lib/msk144d2.f90
lib/msk40decodeframe.f90
lib/msk144decodeframe.f90
lib/msk144sd.f90
lib/msk40spd.f90
lib/msk144spd.f90
lib/msk40sync.f90
lib/msk144sync.f90
lib/msk40_freq_search.f90
lib/msk144_freq_search.f90
lib/mskrtd.f90
lib/msk144signalquality.f90
lib/msk144sim.f90
lib/fsk4hf/mskhfsim.f90
lib/mskrtd.f90
lib/fsk4hf/msksoftsym.f90
lib/fsk4hf/msksoftsymw.f90
lib/fsk4hf/osd174.f90
lib/fsk4hf/osd300.f90
lib/pctile.f90
lib/peakdt9.f90
lib/peakup.f90
lib/polyfit.f90
lib/fsk4hf/polyfit4.f90
lib/prog_args.f90
lib/ps4.f90
lib/qra64a.f90
lib/refspectrum.f90
lib/savec2.f90
lib/sec_midn.f90
lib/setup65.f90
lib/sh65.f90
lib/sh65snr.f90
lib/slasubs.f
lib/sleep_msec.f90
lib/slope.f90
lib/smo.f90
lib/smo121.f90
lib/softsym.f90
lib/softsym9f.f90
lib/softsym9w.f90
lib/shell.f90
lib/fsk4hf/spec4.f90
lib/spec64.f90
lib/fsk4hf/spec8.f90
lib/spec9f.f90
lib/stdmsg.f90
lib/subtract65.f90
lib/fsk4hf/subtractft8.f90
lib/sun.f90
lib/symspec.f90
lib/symspec2.f90
lib/symspec65.f90
lib/sync4.f90
lib/sync64.f90
lib/sync65.f90
lib/fsk4hf/sync8.f90
lib/fsk4hf/sync8d.f90
lib/sync9.f90
lib/sync9f.f90
lib/sync9w.f90
lib/synciscat.f90
lib/timf2.f90
lib/to_contest_msg.f90
lib/tweak1.f90
lib/twkfreq.f90
lib/fsk4hf/twkfreq1.f90
lib/twkfreq65.f90
lib/unpackmsg144.f90
lib/update_recent_calls.f90
lib/update_hasharray.f90
lib/fsk4hf/watterson.f90
lib/wav11.f90
lib/wav12.f90
lib/xcor.f90
lib/xcor4.f90
lib/wqdecode.f90
lib/wqencode.f90
lib/fsk4hf/wspr_fsk8d.f90
lib/fsk4hf/wspr_fsk8_sim.f90
lib/fsk4hf/wspr_fsk8_wav.f90
lib/fsk4hf/wspr_fsk8_downsample.f90
lib/fsk4hf/wsprlfsim.f90
lib/wspr_downsample.f90
lib/zplot9.f90
)
set (ka9q_CSRCS
lib/ftrsd/decode_rs.c
lib/ftrsd/encode_rs.c
lib/ftrsd/init_rs.c
)
set_source_files_properties (${ka9q_CSRCS} PROPERTIES COMPILE_FLAGS -Wno-sign-compare)
set (qra_CSRCS
lib/qra/qra64/qra64.c
lib/qra/qra64/qra64_subs.c
lib/qra/qracodes/npfwht.c
lib/qra/qracodes/pdmath.c
lib/qra/qracodes/qra12_63_64_irr_b.c
lib/qra/qracodes/qra13_64_64_irr_e.c
lib/qra/qracodes/qracodes.c
lib/qra/qracodes/normrnd.c
)
set (wsjt_CSRCS
${ka9q_CSRCS}
lib/ftrsd/ftrsd2.c
lib/sgran.c
lib/golay24_table.c
lib/gran.c
lib/igray.c
lib/init_random_seed.c
lib/ldpc32_table.c
lib/wsprd/nhash.c
lib/tab.c
lib/tmoonsub.c
lib/usleep.c
lib/vit213.c
lib/wisdom.c
lib/wrapkarn.c
${ldpc_CSRCS}
${qra_CSRCS}
)
set (wsjt_qt_UISRCS
wf_palette_design_dialog.ui
)
set (wsprsim_CSRCS
lib/wsprd/wsprsim.c
lib/wsprd/wsprsim_utils.c
lib/wsprd/wsprd_utils.c
lib/wsprd/fano.c
lib/wsprd/tab.c
lib/wsprd/nhash.c
)
set (wsprd_CSRCS
lib/wsprd/wsprd.c
lib/wsprd/wsprsim_utils.c
lib/wsprd/wsprd_utils.c
lib/wsprd/fano.c
lib/wsprd/jelinek.c
lib/wsprd/tab.c
lib/wsprd/nhash.c
lib/init_random_seed.c
)
set (wsjtx_UISRCS
mainwindow.ui
about.ui
astro.ui
echograph.ui
fastgraph.ui
messageaveraging.ui
widegraph.ui
logqso.ui
Configuration.ui
)
set (UDP_library_CXXSRCS
Radio.cpp
RadioMetaType.cpp
NetworkMessage.cpp
MessageServer.cpp
)
set (UDP_library_HEADERS
Radio.hpp
MessageServer.hpp
${PROJECT_BINARY_DIR}/udp_export.h
)
set (message_aggregator_CXXSRCS
UDPExamples/MessageAggregator.cpp
UDPExamples/MessageAggregatorMainWindow.cpp
UDPExamples/DecodesModel.cpp
UDPExamples/BeaconsModel.cpp
UDPExamples/ClientWidget.cpp
)
set (message_aggregator_STYLESHEETS
UDPExamples/qss/default.qss
)
set (qcp_CXXSRCS
qcustomplot-source/qcustomplot.cpp
)
set (all_CXXSRCS
${wsjt_CXXSRCS}
${wsjt_qt_CXXSRCS}
${wsjt_qtmm_CXXSRCS}
${jt9_CXXSRCS}
${wsjtx_CXXSRCS}
${qcp_CXXSRCS}
)
set (all_C_and_CXXSRCS
${wsjt_CSRCS}
${wsprsim_CSRCS}
${wsprd_CSRCS}
${all_CXXSRCS}
)
set (TOP_LEVEL_RESOURCES
shortcuts.txt
mouse_commands.txt
prefixes.txt
cty.dat
icons/Darwin/wsjtx.iconset/icon_128x128.png
contrib/gpl-v3-logo.svg
artwork/splash.png
)
set (PALETTE_FILES
Palettes/Banana.pal
Palettes/Blue1.pal
Palettes/Blue2.pal
Palettes/Blue3.pal
Palettes/Brown.pal
Palettes/Cyan1.pal
Palettes/Cyan2.pal
Palettes/Cyan3.pal
Palettes/Default.pal
Palettes/Digipan.pal
Palettes/Fldigi.pal
Palettes/Gray1.pal
Palettes/Gray2.pal
Palettes/Green1.pal
Palettes/Green2.pal
Palettes/Jungle.pal
Palettes/Linrad.pal
Palettes/Negative.pal
Palettes/Orange.pal
Palettes/Pink.pal
Palettes/Rainbow.pal
Palettes/Scope.pal
Palettes/Sunburst.pal
Palettes/VK4BDJ.pal
Palettes/YL2KF.pal
Palettes/Yellow1.pal
Palettes/Yellow2.pal
Palettes/ZL1FZ.pal
)
if (APPLE)
set (WSJTX_ICON_FILE ${CMAKE_PROJECT_NAME}.icns)
set (ICONSRCS
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_16x16.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/[email protected]
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_32x32.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/[email protected]
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_128x128.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/[email protected]
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_256x256.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/[email protected]
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_512x512.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/[email protected]
)
add_custom_command (
OUTPUT ${WSJTX_ICON_FILE}
COMMAND iconutil -c icns --output "${CMAKE_BINARY_DIR}/${WSJTX_ICON_FILE}" "${CMAKE_SOURCE_DIR}/icons/Darwin/${CMAKE_PROJECT_NAME}.iconset"
DEPENDS ${ICONSRCS}
COMMENT "Building Icons"
)
endif (APPLE)
set_source_files_properties (${WSJTX_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
if (WSJT_QDEBUG_IN_RELEASE)
# context info in Qt message handler in release configuration
set_property (DIRECTORY APPEND PROPERTY
COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_MESSAGELOGCONTEXT>
)
else (WSJT_QDEBUG_IN_RELEASE)
# disable Qt trace and warning messages from release configurations
set_property (DIRECTORY APPEND PROPERTY
COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT;QT_NO_WARNING_OUTPUT>
)
endif (WSJT_QDEBUG_IN_RELEASE)
set_property (SOURCE ${all_C_and_CXXSRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -include wsjtx_config.h")
set_property (SOURCE ${all_C_and_CXXSRCS} APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/wsjtx_config.h)
if (WIN32)
# generate the OmniRig COM interface source
find_program (DUMPCPP dumpcpp)
if (DUMPCPP-NOTFOUND)
message (FATAL_ERROR "dumpcpp tool not found")
endif (DUMPCPP-NOTFOUND)
execute_process (
COMMAND ${DUMPCPP} -getfile {4FE359C5-A58F-459D-BE95-CA559FB4F270}
OUTPUT_VARIABLE AXSERVER
OUTPUT_STRIP_TRAILING_WHITESPACE
)
string (STRIP "${AXSERVER}" AXSERVER)
if (NOT AXSERVER)
message (FATAL_ERROR "You need to install OmniRig on this computer")
endif (NOT AXSERVER)
string (REPLACE "\"" "" AXSERVER ${AXSERVER})
file (TO_CMAKE_PATH ${AXSERVER} AXSERVERSRCS)
endif (WIN32)
#
# decide on platform specifc packing and fixing up
#
if (APPLE)
set (WSJTX_BUNDLE_VERSION ${wsjtx_VERSION})
# make sure CMAKE_INSTALL_PREFIX ends in /
string (LENGTH "${CMAKE_INSTALL_PREFIX}" LEN)
math (EXPR LEN "${LEN} -1" )
string (SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH)
if (NOT "${ENDCH}" STREQUAL "/")
set (CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/")
endif ()
endif (APPLE)
#
# find some useful tools
#
find_program(CTAGS ctags)
find_program(ETAGS etags)
#
# Boost
#
set (Boost_NO_SYSTEM_PATHS TRUE)
if (Boost_NO_SYSTEM_PATHS)
set (BOOST_ROOT ${PROJECT_SOURCE_DIR}/boost)
endif ()
find_package (Boost 1.63 REQUIRED)
if (Boost_FOUND)
include_directories (${Boost_INCLUDE_DIRS})
endif ()
#
# OpenMP
#
find_package (OpenMP)
#
# fftw3 single precision library
#
find_package (FFTW3 COMPONENTS double single threads REQUIRED)
#
# libhamlib setup
#
set (hamlib_STATIC 1)
find_package (hamlib 3 REQUIRED)
find_program (RIGCTL_EXE rigctl)
find_program (RIGCTLD_EXE rigctld)
message (STATUS "hamlib_INCLUDE_DIRS: ${hamlib_INCLUDE_DIRS}")
message (STATUS "hamlib_LIBRARIES: ${hamlib_LIBRARIES}")
message (STATUS "hamlib_LIBRARY_DIRS: ${hamlib_LIBRARY_DIRS}")
#
# Qt5 setup
#
# Widgets finds its own dependencies.
find_package (Qt5Widgets 5 REQUIRED)
find_package (Qt5Multimedia 5 REQUIRED)
find_package (Qt5PrintSupport 5 REQUIRED)
if (WIN32)
add_definitions (-DQT_NEEDS_QTMAIN)
find_package (Qt5AxContainer REQUIRED)
endif (WIN32)
#
# sub-directories
#
add_subdirectory (samples)
if (WSJT_GENERATE_DOCS)
add_subdirectory (doc)
endif (WSJT_GENERATE_DOCS)
#
# Library building setup
#
include (GenerateExportHeader)
set (CMAKE_CXX_VISIBILITY_PRESET hidden)
set (CMAKE_C_VISIBILITY_PRESET hidden)
set (CMAKE_Fortran_VISIBILITY_PRESET hidden)
set (CMAKE_VISIBILITY_INLINES_HIDDEN ON)
#set (CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON)
#
# C & C++ setup
#
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fexceptions -frtti")
if (NOT APPLE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas")
if (${OPENMP_FOUND})
if (OpenMP_C_FLAGS)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
endif ()
endif ()
set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fdata-sections -ffunction-sections")
set (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -fdata-sections -ffunction-sections")
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fdata-sections -ffunction-sections")
set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -fdata-sections -ffunction-sections")
endif (NOT APPLE)
if (WIN32)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
endif (WIN32)
if (APPLE AND ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
else ()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=gnu++11 -pthread")
endif ()
#
# Fortran setup
#
set (General_FFLAGS "-Wall -Wno-conversion -fno-second-underscore")
# FFLAGS depend on the compiler
get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME)
if (Fortran_COMPILER_NAME MATCHES "gfortran.*")
# gfortran
# CMake compiler test is supposed to do this but doesn't yet
if (CMAKE_OSX_DEPLOYMENT_TARGET)
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif (CMAKE_OSX_DEPLOYMENT_TARGET)
if (CMAKE_OSX_SYSROOT)
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
endif (CMAKE_OSX_SYSROOT)
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -funroll-all-loops -fno-f2c ${General_FFLAGS}")
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fbounds-check -fno-f2c ${General_FFLAGS}")
elseif (Fortran_COMPILER_NAME MATCHES "ifort.*")
# ifort (untested)
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -f77rtl ${General_FFLAGS}")
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -f77rtl ${General_FFLAGS}")
elseif (Fortran_COMPILER_NAME MATCHES "g77")
# g77
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -funroll-all-loops -fno-f2c -m32 ${General_FFLAGS}")
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fbounds-check -fno-f2c -m32 ${General_FFLAGS}")
else (Fortran_COMPILER_NAME MATCHES "gfortran.*")
message ("CMAKE_Fortran_COMPILER full path: " ${CMAKE_Fortran_COMPILER})
message ("Fortran compiler: " ${Fortran_COMPILER_NAME})
message ("No optimized Fortran compiler flags are known, we just try -O3...")
set (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -O3 ${General_FFLAGS}")
set (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -fbounds-check ${General_FFLAGS}")
endif (Fortran_COMPILER_NAME MATCHES "gfortran.*")
#
# Linker setup
#
if (NOT APPLE)
set (CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Wl,--gc-sections")
set (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL} -Wl,--gc-sections")
endif (NOT APPLE)
#
# setup and test Fortran C/C++ interaction
#
include (FortranCInterface)
FortranCInterface_VERIFY (CXX)
FortranCInterface_HEADER (FC.h MACRO_NAMESPACE "FC_" SYMBOL_NAMESPACE "FC_"
SYMBOLS
grayline
)
#
# sort out pre-requisites
#
#
# Setup RPATH so that built executable targets will run in both the
# build tree and the install location without having to set a
# (DYLD|LD)_LIBRARY_PATH override.
#
# use the full RPATH of the build tree
set (CMAKE_SKIP_BUILD_RPATH FALSE)
# when building, don't use the install RPATH, it will still be used
# later on in the install phase