blob: 24437faa49ffc7a18d1a852fb3def04c47bc9cf8 (
plain)
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
|
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set (map65_CXXSRCS
about.cpp
astro.cpp
bandmap.cpp
cqdatasender.cpp
commons.cpp
devsetup.cpp
displaytext.cpp
fortran_mutex.cpp
getdev.cpp
# getfile.cpp
livecq_decode.cpp
# map65_paths.cpp
main.cpp
mainwindow.cpp
map65_decode_display_filter.cpp
messages.cpp
meterwidget.cpp
plotter.cpp
pskreporter_decode.cpp
pskreporter_settings.cpp
Radio.cpp
runtime_paths.cpp
../Network/LiveCQUpload.cpp
../Network/PSKReporter.cpp
../Network/PSKReporterIPFIX.cpp
set570.cpp
signalmeter.cpp
soundin.cpp
soundout.cpp
txtune.cpp
widegraph.cpp
)
set (map65_UISRCS
about.ui
astro.ui
bandmap.ui
devsetup.ui
mainwindow.ui
messages.ui
txtune.ui
widegraph.ui
)
set (map65_C_and_CXXSRCS
${map65_CSRCS}
${map65_CXXSRCS}
)
set_property (SOURCE ${map65_C_and_CXXSRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -include wsjtx_config.h")
set_property (SOURCE ${map65_C_and_CXXSRCS} APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/wsjtx_config.h)
# build the subdirectories
add_subdirectory (libm65)
# UI generation
qt5_wrap_ui (map65_GENUISRCS ${map65_UISRCS})
# windres doesn't track a .rc file's ICON directive as a dependency, so an icon-only edit needs this to trigger a rebuild.
set_property (SOURCE map65.rc APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/wsjt.ico)
# Resource generation (About dialog logo + GPL logo)
qt5_add_resources (map65_RESOURCES_RCC about.qrc)
# Executable: only the .rc file is Windows-only
if (WIN32)
add_executable(map65
${map65_CXXSRCS}
${map65_CSRCS}
${map65_GENUISRCS}
${map65_RESOURCES_RCC}
map65.rc
)
else()
add_executable(map65
${map65_CXXSRCS}
${map65_CSRCS}
${map65_GENUISRCS}
${map65_RESOURCES_RCC}
)
endif()
# Include directories (same on all platforms)
target_include_directories(map65 PRIVATE
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/map65/libm65
${FFTW3_INCLUDE_DIRS}
)
# Link libraries (same on all platforms except libusb)
target_link_libraries(map65 PRIVATE
wsjt_qt
m65impl
${FFTW3_LIBRARIES}
Qt5::Widgets
Qt5::Network
Qt5::SerialPort
Portaudio::Portaudio
Usb::Usb
)
if (APPLE)
target_link_libraries(map65 PRIVATE m65_qt)
endif ()
# Linux needs libusb
# if (UNIX AND NOT APPLE)
# find_package(PkgConfig REQUIRED)
# pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
# target_include_directories(map65 PRIVATE ${LIBUSB_INCLUDE_DIRS})
# target_link_libraries(map65 PRIVATE ${LIBUSB_LIBRARIES})
# endif()
# MAP65 must ALWAYS be a console subsystem executable on Windows
if (WIN32)
set_target_properties(map65 PROPERTIES WIN32_EXECUTABLE OFF)
endif()
# WSJT_CREATE_WINMAIN now ONLY controls console visibility
if (WIN32 AND WSJT_CREATE_WINMAIN)
target_compile_definitions(map65 PRIVATE MAP_GUI_SUBSYSTEM)
endif()
|