-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
1889 lines (1671 loc) · 55.7 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 3.7.2 FATAL_ERROR)
if (APPLE)
#
# The following variables define the portability and compatability attributes of the Mac macOS 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.12
CACHE STRING "Earliest version of macOS supported
Earliest version we can support with Qt 5.12, C++11 & libc++ is 10.12.
Do not override this if you intend to build an official deployable installer.")
endif (APPLE)
#
# CMake policies
#
if (POLICY CMP0020)
cmake_policy (SET CMP0020 NEW) # link to Qt winmain on Windows
endif ()
if (POLICY CMP0043)
cmake_policy (SET CMP0043 NEW) # ignore COMPILE_DEFINITIONS_<CONFIG>
endif ()
if (POLICY CMP0048)
cmake_policy (SET CMP0048 NEW) # clear PROJECT_Version_* variables if not set in project() command
endif ()
if (POLICY CMP0063)
cmake_policy (SET CMP0063 NEW) # honour visibility properties for all library types
endif ()
if (POLICY CMP0071)
cmake_policy (SET CMP0071 NEW) # run automoc and autouic on generated sources
endif ()
if (POLICY CMP0075)
cmake_policy (SET CMP0075 NEW) # honour CMAKE_REQUIRED_LIBRARIES in config checks
endif ()
project (wsjtx
VERSION 2.4.0.0
LANGUAGES C CXX Fortran
)
set (PROJECT_DESCRIPTION "WSJT-X: Digital Modes for Weak Signal Communications in Amateur Radio")
set (CMAKE_PROJECT_DESCRIPTION ${PROJECT_DESCRIPTION})
#
# Local CMake modules and support files
#
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/Modules ${CMAKE_MODULE_PATH})
set (PROJECT_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}")
if (NOT PROJECT_ARCHITECTURE)
# This is supposed to happen already on Windows
if (CMAKE_SIZEOF_VOID_P MATCHES 8)
set (PROJECT_ARCHITECTURE "x64")
else ()
set (PROJECT_ARCHITECTURE "$ENV{PROCESSOR_ARCHITECTURE}")
endif ()
endif ()
message (STATUS "******************************************************")
message (STATUS "Building for for: ${CMAKE_SYSTEM_NAME}-${PROJECT_ARCHITECTURE}")
message (STATUS "******************************************************")
include (set_build_type)
# RC 0 or omitted is a development build, GA is a General Availability release build
set_build_type (GA)
set (wsjtx_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${BUILD_TYPE_REVISION}")
#
# project information
#
set (PROJECT_BUNDLE_NAME "WSJT-X")
set (PROJECT_VENDOR "Joe Taylor, K1JT")
set (PROJECT_CONTACT "Joe Taylor <k1jt@arrl.net>")
set (PROJECT_COPYRIGHT "Copyright (C) 2001-2021 by Joe Taylor, K1JT")
set (PROJECT_HOMEPAGE https://www.physics.princeton.edu/pulsar/K1JT/wsjtx.html)
set (PROJECT_MANUAL wsjtx-main)
set (PROJECT_MANUAL_DIRECTORY_URL https://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/)
# 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_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.")
option (WSJT_TRACE_UDP "Debugging option that turns on UDP message protocol diagnostics.")
option (WSJT_BUILD_UTILS "Build simulators and code demonstrators." ON)
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)
#
# 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 (fort_qt_CXXSRCS
lib/shmem.cpp
)
set (wsjt_qt_CXXSRCS
qt_helpers.cpp
widgets/MessageBox.cpp
MetaDataRegistry.cpp
Network/NetworkServerLookup.cpp
revision_utils.cpp
L10nLoader.cpp
WFPalette.cpp
Radio.cpp
RadioMetaType.cpp
NonInheritingProcess.cpp
models/IARURegions.cpp
models/Bands.cpp
models/Modes.cpp
models/FrequencyList.cpp
models/StationList.cpp
widgets/FrequencyLineEdit.cpp
widgets/FrequencyDeltaLineEdit.cpp
item_delegates/CandidateKeyFilter.cpp
item_delegates/ForeignKeyDelegate.cpp
validators/LiveFrequencyValidator.cpp
GetUserId.cpp
Audio/AudioDevice.cpp
Transceiver/Transceiver.cpp
Transceiver/TransceiverBase.cpp
Transceiver/EmulateSplitTransceiver.cpp
Transceiver/TransceiverFactory.cpp
Transceiver/PollingTransceiver.cpp
Transceiver/HamlibTransceiver.cpp
Transceiver/HRDTransceiver.cpp
Transceiver/DXLabSuiteCommanderTransceiver.cpp
Network/NetworkMessage.cpp
Network/MessageClient.cpp
widgets/LettersSpinBox.cpp
widgets/HintedSpinBox.cpp
widgets/RestrictedSpinBox.cpp
widgets/HelpTextWindow.cpp
SampleDownloader.cpp
SampleDownloader/DirectoryDelegate.cpp
SampleDownloader/Directory.cpp
SampleDownloader/FileNode.cpp
SampleDownloader/RemoteFile.cpp
DisplayManual.cpp
MultiSettings.cpp
validators/MaidenheadLocatorValidator.cpp
validators/CallsignValidator.cpp
widgets/SplashScreen.cpp
EqualizationToolsDialog.cpp
widgets/DoubleClickablePushButton.cpp
widgets/DoubleClickableRadioButton.cpp
Network/LotWUsers.cpp
models/DecodeHighlightingModel.cpp
widgets/DecodeHighlightingListView.cpp
models/FoxLog.cpp
widgets/AbstractLogWindow.cpp
widgets/FoxLogWindow.cpp
widgets/CabrilloLogWindow.cpp
item_delegates/CallsignDelegate.cpp
item_delegates/MaidenheadLocatorDelegate.cpp
item_delegates/FrequencyDelegate.cpp
item_delegates/FrequencyDeltaDelegate.cpp
item_delegates/SQLiteDateTimeDelegate.cpp
models/CabrilloLog.cpp
logbook/AD1CCty.cpp
logbook/WorkedBefore.cpp
logbook/Multiplier.cpp
Network/NetworkAccessManager.cpp
widgets/LazyFillComboBox.cpp
widgets/CheckableItemComboBox.cpp
)
set (wsjt_qtmm_CXXSRCS
Audio/BWFFile.cpp
)
set (jt9_FSRCS
lib/jt9.f90
lib/jt9a.f90
)
set (wsjtx_CXXSRCS
WSJTXLogging.cpp
logbook/logbook.cpp
Network/PSKReporter.cpp
Modulator/Modulator.cpp
Detector/Detector.cpp
widgets/logqso.cpp
widgets/displaytext.cpp
Decoder/decodedtext.cpp
getfile.cpp
Audio/soundout.cpp
Audio/soundin.cpp
widgets/meterwidget.cpp
widgets/signalmeter.cpp
widgets/plotter.cpp
widgets/widegraph.cpp
widgets/echograph.cpp
widgets/echoplot.cpp
widgets/fastgraph.cpp
widgets/fastplot.cpp
widgets/about.cpp
widgets/astro.cpp
widgets/messageaveraging.cpp
widgets/colorhighlighting.cpp
WSPR/WsprTxScheduler.cpp
widgets/mainwindow.cpp
Configuration.cpp
main.cpp
Network/wsprnet.cpp
WSPR/WSPRBandHopping.cpp
widgets/ExportCabrillo.cpp
)
set (wsjt_CXXSRCS
Logger.cpp
lib/crc10.cpp
lib/crc13.cpp
lib/crc14.cpp
)
# deal with a GCC v6 UB error message
set_source_files_properties (
lib/crc10.cpp
lib/crc13.cpp
lib/crc14.cpp
PROPERTIES COMPILE_FLAGS -fpermissive)
if (WIN32)
set (wsjt_CXXSRCS
${wsjt_CXXSRCS}
killbyname.cpp
)
set (wsjt_qt_CXXSRCS
${wsjt_qt_CXXSRCS}
Transceiver/OmniRigTransceiver.cpp
)
endif (WIN32)
set (wsjt_FSRCS
# put module sources first in the hope that they get rebuilt before use
lib/types.f90
lib/C_interface_module.f90
lib/shmem.f90
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/ft4_decode.f90
lib/fst4_decode.f90
lib/jt9_decode.f90
lib/options.f90
lib/packjt.f90
lib/77bit/packjt77.f90
lib/qra/q65/q65.f90
lib/q65_decode.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/ft8/baseline.f90
lib/ft4/ft4_baseline.f90
lib/blanker.f90
lib/bpdecode40.f90
lib/bpdecode128_90.f90
lib/ft8/bpdecode174_91.f90
lib/baddata.f90
lib/calibrate.f90
lib/ccf2.f90
lib/ccf65.f90
lib/ft8/chkcrc13a.f90
lib/ft8/chkcrc14a.f90
lib/chkcall.f90
lib/chkhist.f90
lib/chkmsg.f90
lib/chkss2.f90
lib/ft4/clockit.f90
lib/ft8/compress.f90
lib/coord.f90
lib/db.f90
lib/decode4.f90
lib/decode65a.f90
lib/decode65b.f90
lib/decode9w.f90
lib/ft8/decode174_91.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_128_90.f90
lib/ft8/encode174_91.f90
lib/ft8/encode174_91_nocrc.f90
lib/entail.f90
lib/ephem.f90
lib/extract.f90
lib/extract4.f90
lib/extractmessage77.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/ft8/filt8.f90
lib/fitcal.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/ft8/foxfilt.f90
lib/ft8/foxgen.f90
lib/ft8/foxgen_wrap.f90
lib/freqcal.f90
lib/ft8/ft8apset.f90
lib/ft8/ft8b.f90
lib/ft8/ft8code.f90
lib/ft8/ft8_downsample.f90
lib/ft8/ft8sim.f90
lib/gen4.f90
lib/gen65.f90
lib/gen9.f90
lib/genwave.f90
lib/ft8/genft8.f90
lib/qra/q65/genq65.f90
lib/genmsk_128_90.f90
lib/genmsk40.f90
lib/ft4/ft4code.f90
lib/ft4/genft4.f90
lib/ft4/gen_ft4wave.f90
lib/ft8/gen_ft8wave.f90
lib/ft8/genft8refsig.f90
lib/genwspr.f90
lib/geodist.f90
lib/ft8/get_crc14.f90
lib/getlags.f90
lib/getmet4.f90
lib/ft8/get_spectrum_baseline.f90
lib/ft2/gfsk_pulse.f90
lib/graycode.f90
lib/graycode65.f90
lib/grayline.f90
lib/grid2deg.f90
lib/ft8/h1.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/jplsubs.f
lib/jt9fano.f90
lib/jtmsg.f90
lib/libration.f90
lib/lorentzian.f90
lib/fst4/lorentzian_fading.f90
lib/lpf1.f90
lib/mixlpf.f90
lib/makepings.f90
lib/moondopjpl.f90
lib/morse.f90
lib/move.f90
lib/msk40decodeframe.f90
lib/msk144decodeframe.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/mskrtd.f90
lib/nuttal_window.f90
lib/ft4/ft4sim.f90
lib/ft4/ft4sim_mult.f90
lib/ft4/ft4_downsample.f90
lib/77bit/my_hash.f90
lib/wsprd/osdwspr.f90
lib/ft8/osd174_91.f90
lib/osd128_90.f90
lib/pctile.f90
lib/peakdt9.f90
lib/peakup.f90
lib/plotsave.f90
lib/platanh.f90
lib/pltanh.f90
lib/polyfit.f90
lib/prog_args.f90
lib/ps4.f90
lib/qra/q65/q65_ap.f90
lib/qra/q65/q65_loops.f90
lib/qra/q65/q65_set_list.f90
lib/refspectrum.f90
lib/savec2.f90
lib/sec0.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/spec64.f90
lib/spec9f.f90
lib/stdmsg.f90
lib/subtract65.f90
lib/ft8/subtractft8.f90
lib/ft4/subtractft4.f90
lib/sun.f90
lib/symspec.f90
lib/symspec2.f90
lib/symspec65.f90
lib/sync4.f90
lib/sync65.f90
lib/ft4/getcandidates4.f90
lib/ft4/get_ft4_bitmetrics.f90
lib/ft8/sync8.f90
lib/ft8/sync8d.f90
lib/ft4/sync4d.f90
lib/sync9.f90
lib/sync9f.f90
lib/sync9w.f90
lib/timf2.f90
lib/tweak1.f90
lib/twkfreq.f90
lib/ft8/twkfreq1.f90
lib/twkfreq65.f90
lib/update_recent_calls.f90
lib/update_msk40_hasharray.f90
lib/ft8/watterson.f90
lib/wav11.f90
lib/wav12.f90
lib/xcor.f90
lib/xcor4.f90
lib/wqdecode.f90
lib/wqencode.f90
lib/wspr_downsample.f90
lib/zplot9.f90
lib/fst4/decode240_101.f90
lib/fst4/decode240_74.f90
lib/fst4/encode240_101.f90
lib/fst4/encode240_74.f90
lib/fst4/fst4sim.f90
lib/fst4/gen_fst4wave.f90
lib/fst4/genfst4.f90
lib/fst4/get_fst4_bitmetrics.f90
lib/fst4/get_fst4_bitmetrics2.f90
lib/fst4/ldpcsim240_101.f90
lib/fst4/ldpcsim240_74.f90
lib/fst4/osd240_101.f90
lib/fst4/osd240_74.f90
lib/fst4/fastosd240_74.f90
lib/fst4/get_crc24.f90
lib/fst4/fst4_baseline.f90
)
# temporary workaround for a gfortran v7.3 ICE on Fedora 27 64-bit
set_source_files_properties (lib/slasubs.f PROPERTIES COMPILE_FLAGS -O2)
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/qracodes/qra12_63_64_irr_b.c
lib/qra/qracodes/qra13_64_64_irr_e.c
lib/qra/q65/npfwht.c
lib/qra/q65/pdmath.c
lib/qra/q65/qracodes.c
lib/qra/q65/normrnd.c
lib/qra/q65/qra15_65_64_irr_e23.c
lib/qra/q65/q65.c
lib/qra/q65/q65_subs.c
)
set (wsjt_CSRCS
${ka9q_CSRCS}
lib/ftrsd/ftrsdap.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
widgets/FoxLogWindow.ui
widgets/CabrilloLogWindow.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
widgets/mainwindow.ui
widgets/about.ui
widgets/astro.ui
widgets/colorhighlighting.ui
widgets/echograph.ui
widgets/fastgraph.ui
widgets/messageaveraging.ui
widgets/widegraph.ui
widgets/logqso.ui
Configuration.ui
widgets/ExportCabrillo.ui
)
set (UDP_library_CXXSRCS
Radio.cpp
RadioMetaType.cpp
Network/NetworkMessage.cpp
UDPExamples/MessageServer.cpp
)
set (UDP_library_HEADERS
Radio.hpp
UDPExamples/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
validators/MaidenheadLocatorValidator.cpp
)
set (message_aggregator_STYLESHEETS
UDPExamples/qss/default.qss
)
set (qcp_CXXSRCS
qcustomplot-source/qcustomplot.cpp
)
set (all_CXXSRCS
${wsjt_CXXSRCS}
${fort_qt_CXXSRCS}
${wsjt_qt_CXXSRCS}
${wsjt_qtmm_CXXSRCS}
${wsjtx_CXXSRCS}
${qcp_CXXSRCS}
)
set (all_C_and_CXXSRCS
${wsjt_CSRCS}
${wsprsim_CSRCS}
${wsprd_CSRCS}
${all_CXXSRCS}
)
set (TOP_LEVEL_RESOURCES
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/icon_16x16@2x.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_32x32.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_32x32@2x.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_128x128.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_128x128@2x.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_256x256.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_256x256@2x.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_512x512.png
icons/Darwin/${CMAKE_PROJECT_NAME}.iconset/icon_512x512@2x.png
)
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"
)
else ()
set (WSJTX_ICON_FILE icons/windows-icons/wsjtx.ico)
endif (APPLE)
set_source_files_properties (${WSJTX_ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
# suppress intransigent compiler diagnostics
set_source_files_properties (lib/decoder.f90 PROPERTIES COMPILE_FLAGS "-Wno-unused-dummy-argument")
set_source_files_properties (lib/filbig.f90 PROPERTIES COMPILE_FLAGS "-Wno-aliasing")
## 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>
# )
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 ()
#
# 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
#
include (CheckTypeSize)
include (CheckCSourceCompiles)
include (CheckSymbolExists)
include (generate_version_info)
find_program(CTAGS ctags)
find_program(ETAGS etags)
#
# Standard C Math Library
#
set (LIBM_TEST_SOURCE "#include<math.h>\nfloat f; int main(){sqrt(f);return 0;}")
check_c_source_compiles ("${LIBM_TEST_SOURCE}" HAVE_MATH)
if (HAVE_MATH)
set (LIBM_LIBRARIES)
else ()
set (CMAKE_REQUIRED_LIBRARIES m)
check_c_source_compiles ("${LIBM_TEST_SOURCE}" HAVE_LIBM_MATH)
unset (CMAKE_REQUIRED_LIBRARIES)
if (NOT HAVE_LIBM_MATH)
message (FATAL_ERROR "Unable to use C math library functions")
endif ()
set (LIBM_LIBRARIES m)
endif ()
#
# Boost
#
if (WIN32)
set (Boost_USE_STATIC_LIBS OFF)
endif ()
find_package (Boost 1.62 REQUIRED COMPONENTS log_setup log)
#
# OpenMP
#
find_package (OpenMP)
#
# fftw3 single precision library
#
find_package (FFTW3 COMPONENTS single threads REQUIRED)
#
# libhamlib setup
#
set (hamlib_STATIC 1)
find_package (hamlib 3 REQUIRED)
find_program (RIGCTL_EXE rigctl)
find_program (RIGCTLD_EXE rigctld)
find_program (RIGCTLCOM_EXE rigctlcom)
message (STATUS "hamlib_INCLUDE_DIRS: ${hamlib_INCLUDE_DIRS}")
message (STATUS "hamlib_LIBRARIES: ${hamlib_LIBRARIES}")
message (STATUS "hamlib_LIBRARY_DIRS: ${hamlib_LIBRARY_DIRS}")
set (CMAKE_REQUIRED_INCLUDES "${hamlib_INCLUDE_DIRS}")
set (CMAKE_REQUIRED_LIBRARIES "${hamlib_LIBRARIES}")
set (CMAKE_EXTRA_INCLUDE_FILES "hamlib/rig.h")
check_type_size (CACHE_ALL HAMLIB_OLD_CACHING)
check_symbol_exists (rig_set_cache_timeout_ms "hamlib/rig.h" HAVE_HAMLIB_CACHING)
#
# Qt5 setup
#
# Widgets finds its own dependencies.
find_package (Qt5 COMPONENTS Widgets SerialPort Multimedia PrintSupport Sql LinguistTools REQUIRED)
if (WIN32)
add_definitions (-DQT_NEEDS_QTMAIN)
find_package (Qt5AxContainer REQUIRED)
endif (WIN32)
#
# sub-directories
#
if (EXISTS ${CMAKE_SOURCE_DIR}/samples AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/samples)
add_subdirectory (samples)
endif ()
if (WSJT_GENERATE_DOCS)
add_subdirectory (doc)
endif (WSJT_GENERATE_DOCS)
if (EXISTS ${CMAKE_SOURCE_DIR}/tests AND IS_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
add_subdirectory (tests)
endif ()
#
# 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} -Werror -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} -fbounds-check -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