-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists-vs2013.txt
227 lines (209 loc) · 6.33 KB
/
CMakeLists-vs2013.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
#
# CMakeLists.txt --- CMake input file for linrad
#
# Copyright (c) 2014 Juergen Kahrs
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify,
# merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
# OR OTHER DEALINGS IN THE SOFTWARE.
## process this file with CMake to produce Makefile
# Support for NASM is available only with CMake 2.8.8 or later.
cmake_minimum_required (VERSION 2.6)
project (linrad)
# Read file vernr.h and extract the parts of the version number.
FILE( READ vernr.h VERNR_H )
STRING( REGEX MATCH "PROGRAM_NAME \"Linrad-[0-9][0-9].[0-9][0-9]" LINRAD_VERSION "${VERNR_H}")
STRING( REGEX REPLACE "PROGRAM_NAME \"Linrad-" "" LINRAD_VERSION "${LINRAD_VERSION}")
STRING( REGEX REPLACE "([0-9][0-9]).[0-9][0-9]" "\\1" LINRAD_MAJOR_VERSION "${LINRAD_VERSION}")
STRING( REGEX REPLACE "[0-9][0-9].([0-9][0-9])" "\\1" LINRAD_MINOR_VERSION "${LINRAD_VERSION}")
STRING( REGEX REPLACE "[0-9][0-9].[0-9][0-9](.*)" "\\1" LINRAD_BUGFIX_VERSION "${LINRAD_VERSION}")
include(CheckIncludeFile)
include(CheckTypeSize)
include(CheckLibraryExists)
include(CheckPrototypeDefinition)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Set build type. We do this only to prevent compile flag -O3.
set(CMAKE_BUILD_TYPE Debug)
# Create empty files to be included by the .c sources.
# Instead of using these files we will set auto-detected definitions below.
file(WRITE ${CMAKE_SOURCE_DIR}/conf.h "/* empty file, all settings defined by CMake. */\n" )
file(WRITE ${CMAKE_SOURCE_DIR}/lconf.h "/* empty file, all settings defined by CMake. */\n" )
set(EXTRA_LIBS "")
set(EXTRA_LIB_LOC "")
#set(CMAKE_THREAD_PREFER_PTHREAD 1)
#include(FindThreads)
#if (NOT CMAKE_USE_PTHREADS_INIT)
# message(STATUS " Couldn't find pthreads")
#endif()
#file(WRITE ${CMAKE_SOURCE_DIR}/conf.h "#include <sys/ioctl.h>\n" )
#file(WRITE ${CMAKE_SOURCE_DIR}/lconf.h "#include <sys/ioctl.h>\n" )
file(WRITE ${CMAKE_SOURCE_DIR}/conf.h "\n" )
file(WRITE ${CMAKE_SOURCE_DIR}/lconf.h "\n" )
add_definitions(-DSHM_INSTALLED=0)
add_definitions(-DOPENCL_PRESENT=0)
set(OPENCL_FOUND 0)
add_definitions(-DOSNUM=2)
add_definitions(-DDARWIN=0)
add_definitions(-DIA64=0)
# Set CPU to ARM regardless of actual platform.
# This is necessary to avoid the usage of assembly language sources.
set (CPU "CPU_ARM")
message(STATUS "Found CPU type \"${CMAKE_SYSTEM_PROCESSOR}\" on target system")
add_definitions(-DCPU=${CPU})
add_definitions(-DALSA_LIBNAME=\"asound\")
add_definitions(-DFTDI_LIBNAME=\"ftdi\")
add_definitions(-DLIBUSB0_LIBNAME=\"loadusb\")
add_definitions(-DLIBUSB1_LIBNAME=\"libusb-1.0\")
add_definitions(-DUDEV_LIBNAME=\"libudev\")
add_definitions(-DBLADERF_LIBNAME=\"bladeRF\")
add_definitions(-DMIRISDR_LIBNAME=\"mirisdr\")
add_definitions(-DPERSEUS_LIBNAME=\"perseus-sdr\")
add_definitions(-DRTLSDR_LIBNAME=\"rtlsdr\")
add_definitions(-DFDMS1_LIBNAME=\"fdms1\")
add_definitions(-DAIRSPY_LIBNAME=\"airspy\")
add_definitions(-DPORTAUDIO_PRESENT=0)
add_definitions(-DPA_LINUX_REALTIME=0)
add_definitions(-DPA_LIBNAME=\"portaudio\")
add_definitions(-DHAVE_OSS=0)
add_definitions(-DSOFT66_LIBNAME=\"soft66\")
add_definitions(-DPCI_LIBNAME=\"wd_dask\")
# This list of files should be sorted later
# so that the sequence makes sense to a reader.
set (LINRAD_SOURCES
ui.c
uivar.c
screen.c
mouse.c
fonts.c
screenvar.c
screensub.c
sigvar.c
modesub.c
palette.c
extio.c
thrvar.c
tx.c
txssb.c
txvar.c
hwaredriver.c
wide_graph.c
pol_graph.c
afc_graph.c
afcsub.c
coh_osc.c
network.c
eme.c
help.c
wxsys.c
keyboard_var.c
powtvar.c
powtim.c
tx_graph.c
fft0.c
fft1.c
fft1_re.c
fft2.c
fft3.c
fft3var.c
llsqvar.c
fft1var.c
fft2var.c
fft3var.c
calvar.c
caliq.c
calsub.c
selvar.c
buf.c
blnkvar.c
coherent.c
cohsub.c
freq_control.c
gifsave.c
calsub2.c
llsq.c
cwspeed.c
cwdetect.c
sdrip.c
sdrvar.c
baseb_graph.c
wse.c
hires_graph.c
meter_graph.c
rxin.c
rxout.c
wcw.c
mix1.c
menu.c
tune.c
morse.c
calibrate.c
spur.c
spursub.c
timing.c
excalibur.c
sdr14.c
radar.c
timf2.c
pavar.c
blank1.c
mix2.c
fm.c
adtest.c
perseus.c
sellim.c
txtest.c
elektor.c
fcdpp.c
si570.c
usb2lpt.c
rtl2832.c
bladerf.c
mirics.c
pcie9842.c
pa.c
hwaredriver.c
openhpsdr.c
httpd.c
afedri.c
soft66.c
affinity.c
loadusb.c
elad.c
airspy.c
soundcard.c
)
# set(LINRAD_SOURCES ${LINRAD_SOURCES} html_server.c)
# add_definitions(-DSERVER=1)
add_definitions(-DLUSERS_ROUTINES_PRESENT=0)
add_definitions(-DWUSERS_ROUTINES_PRESENT=0)
add_definitions(-DLUSERS_DEFINES_PRESENT=0)
add_definitions(-DWUSERS_DEFINES_PRESENT=0)
add_definitions(-DUSERS_EXTRA_PRESENT=0)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
#set(LINRAD_SOURCES ${LINRAD_SOURCES} split.s fft2mmxa.s fft2mmxb.s fft2mmxc.s fftasm.s getiq.s simdasm.s hware.s )
set(LINRAD_SOURCES ${LINRAD_SOURCES} csplit.c)
set(LINRAD_SOURCES ${LINRAD_SOURCES} wmain.c wsys.c winvar.c wsetad.c wsdr.c hidwin.c)
set(EXTRA_LIBS ${EXTRA_LIBS} ws2_32 winmm gdi32 setupapi ole32)
# Build clinrad, the only executable that can be built with CMake.
# clinrad uses xmain.c as the main program.
# Therefore clinrad should behave exactly as xlinrad.
add_executable (clinrad ${LINRAD_SOURCES})
#add_definitions(-Wall -Werror)
#target_link_libraries (clinrad m ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${EXTRA_LIBS})
target_link_libraries (clinrad ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS} ${EXTRA_LIBS})