forked from analogdevicesinc/scopy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Paul Cercueil <[email protected]>
- Loading branch information
Paul Cercueil
committed
Sep 13, 2016
1 parent
2f561de
commit ecb160f
Showing
168 changed files
with
27,670 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CMakeLists.txt.user | ||
CMakeCache.txt | ||
CMakeFiles | ||
cmake_install.cmake | ||
Makefile | ||
moc_*.cpp | ||
*_automoc.cpp | ||
ui_*.h | ||
build | ||
scopy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
# Copyright 2016 Analog Devices, Inc. | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 3, or (at your option) | ||
# any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with GNU Radio; see the file COPYING. If not, write to | ||
# the Free Software Foundation, Inc., 51 Franklin Street, | ||
# Boston, MA 02110-1301, USA. | ||
|
||
project(scopy) | ||
cmake_minimum_required(VERSION 3.1.3) | ||
|
||
if (MSVC) | ||
# http://www.suodenjoki.dk/us/archive/2010/min-max.htm | ||
add_definitions(-DNOMINMAX) | ||
|
||
# http://www.qtcentre.org/threads/32028-unresolved-external-symbol-quot-public-static-struct-QMetaObject-const-QwtPlot-staticMe | ||
add_definitions(-DQWT_DLL) | ||
endif (MSVC) | ||
|
||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
set(CMAKE_AUTOMOC ON) | ||
#set(CMAKE_AUTOUIC ON) - Can't figure out how to configure it to look under ui/ | ||
# for the .ui file. Use qt5_wrap_ui instead. | ||
|
||
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/Modules) | ||
|
||
if (NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING | ||
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." | ||
FORCE) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS None Debug Release RelWithDebInfo MinSizeRel) | ||
endif() | ||
|
||
if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") | ||
add_definitions(-DQT_NO_DEBUG_OUTPUT=1) | ||
endif() | ||
|
||
list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_constexpr OUT_CONSTEXPR) | ||
if (NOT "${OUT_CONSTEXPR}" STREQUAL "-1") | ||
add_definitions(-DHAS_CONSTEXPR=1) | ||
endif() | ||
|
||
find_package(Qt5Widgets REQUIRED) | ||
find_package(Qt5WebKitWidgets REQUIRED) | ||
find_package(Qt5Concurrent REQUIRED) | ||
find_package(Qwt REQUIRED) | ||
|
||
set(GR_REQUIRED_COMPONENTS RUNTIME ANALOG BLOCKS FFT FILTER IIO VOLK PMT) | ||
find_package(Gnuradio PATHS "c:/Program Files/gnuradio/lib/cmake/gnuradio" REQUIRED) | ||
|
||
GR_MODULE(IIO gnuradio-iio gnuradio/iio/api.h gnuradio-iio) | ||
|
||
find_package(Boost "1.58" COMPONENTS | ||
filesystem | ||
system | ||
thread | ||
date_time | ||
chrono | ||
REQUIRED | ||
) | ||
|
||
set(VC_PATH "$ENV{VS120COMNTOOLS}/../../VC") | ||
find_library(IIO_LIBRARIES NAMES iio libiio PATHS ${VC_PATH}/lib ${VC_PATH}/lib/amd64) | ||
find_path(IIO_INCLUDE_DIRS iio.h PATHS ${VC_PATH}/include) | ||
|
||
include_directories( | ||
${GNURADIO_ALL_INCLUDE_DIRS} | ||
${Boost_INCLUDE_DIRS} | ||
${Qt5Widgets_INCLUDE_DIRS} | ||
${Qt5WebKitWidgets_INCLUDE_DIRS} | ||
${Qt5Concurrent_INCLUDE_DIRS} | ||
${QWT_INCLUDE_DIRS} | ||
${IIO_INCLUDE_DIRS} | ||
${CMAKE_SOURCE_DIR}/src | ||
) | ||
|
||
link_directories( | ||
${Boost_LIBRARY_DIRS} | ||
${GNURADIO_RUNTIME_LIBRARY_DIRS} | ||
) | ||
|
||
FILE(GLOB SRC_LIST src/*.cpp src/*.cc) | ||
|
||
FILE(GLOB M2KSCOPE_UIS ui/*.ui) | ||
qt5_wrap_ui (m2kscope_FORMS_HEADERS ${M2KSCOPE_UIS}) | ||
|
||
FILE(GLOB M2KSCOPE_RESOURCES resources/*.qrc) | ||
qt5_add_resources(m2kscope_RESOURCES ${M2KSCOPE_RESOURCES}) | ||
|
||
set(RESOURCES resources/icon.rc) | ||
|
||
add_executable(${PROJECT_NAME} WIN32 | ||
${SRC_LIST} | ||
${RESOURCES} | ||
${m2kscope_RESOURCES} | ||
${m2kscope_FORMS_HEADERS} | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} LINK_PRIVATE | ||
${Qt5Widgets_LIBRARIES} | ||
${Qt5WebKitWidgets_LIBRARIES} | ||
${Qt5Concurrent_LIBRARIES} | ||
${GNURADIO_ALL_LIBRARIES} | ||
${Boost_LIBRARIES} | ||
${QWT_LIBRARIES} | ||
${IIO_LIBRARIES} | ||
) | ||
|
||
set_target_properties(${PROJECT_NAME} PROPERTIES | ||
CXX_STANDARD 11 | ||
CXX_STANDARD_REQUIRED ON | ||
CXX_EXTENSIONS OFF | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Scopy | ||
Scopy is a software oscilloscope and signal analysis toolset. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# - try to find Qwt libraries and include files | ||
# QWT_INCLUDE_DIR where to find qwt_global.h, etc. | ||
# QWT_LIBRARIES libraries to link against | ||
# QWT_FOUND If false, do not try to use Qwt | ||
# qwt_global.h holds a string with the QWT version; | ||
# test to make sure it's at least 5.2 | ||
|
||
find_path(QWT_INCLUDE_DIRS | ||
NAMES qwt_global.h | ||
HINTS | ||
${CMAKE_INSTALL_PREFIX}/include/qwt | ||
PATHS | ||
/usr/local/include/qwt-qt5 | ||
/usr/local/include/qwt | ||
/usr/include/qwt6 | ||
/usr/include/qwt-qt5 | ||
/usr/include/qwt | ||
/usr/include/qwt5 | ||
/opt/local/include/qwt | ||
/sw/include/qwt | ||
/usr/local/lib/qwt.framework/Headers | ||
) | ||
|
||
find_library (QWT_LIBRARIES | ||
NAMES qwt6 qwt6-qt5 qwt qwt-qt5 | ||
HINTS | ||
${CMAKE_INSTALL_PREFIX}/lib | ||
${CMAKE_INSTALL_PREFIX}/lib64 | ||
PATHS | ||
/usr/local/lib | ||
/usr/lib | ||
/opt/local/lib | ||
/sw/lib | ||
/usr/local/lib/qwt.framework | ||
) | ||
|
||
set(QWT_FOUND FALSE) | ||
if(QWT_INCLUDE_DIRS) | ||
file(STRINGS "${QWT_INCLUDE_DIRS}/qwt_global.h" | ||
QWT_STRING_VERSION REGEX "QWT_VERSION_STR") | ||
set(QWT_WRONG_VERSION True) | ||
set(QWT_VERSION "No Version") | ||
string(REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" QWT_VERSION ${QWT_STRING_VERSION}) | ||
string(COMPARE LESS ${QWT_VERSION} "5.2.0" QWT_WRONG_VERSION) | ||
string(COMPARE GREATER ${QWT_VERSION} "6.2.0" QWT_WRONG_VERSION) | ||
|
||
message(STATUS "QWT Version: ${QWT_VERSION}") | ||
if(NOT QWT_WRONG_VERSION) | ||
set(QWT_FOUND TRUE) | ||
else(NOT QWT_WRONG_VERSION) | ||
message(STATUS "QWT Version must be >= 5.2 and <= 6.2.0, Found ${QWT_VERSION}") | ||
endif(NOT QWT_WRONG_VERSION) | ||
|
||
endif(QWT_INCLUDE_DIRS) | ||
|
||
if(QWT_FOUND) | ||
# handle the QUIETLY and REQUIRED arguments and set QWT_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
include ( FindPackageHandleStandardArgs ) | ||
find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARIES QWT_INCLUDE_DIRS ) | ||
MARK_AS_ADVANCED(QWT_LIBRARIES QWT_INCLUDE_DIRS) | ||
endif(QWT_FOUND) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"generic": { | ||
"name": "Generic libiio-compatible device", | ||
"compatible": [ "signal-generator", "voltmeter" ] | ||
}, | ||
|
||
"m2k": { | ||
"name": "M2K", | ||
"compatible": [ "signal-generator", "voltmeter", "power-controller", "oscilloscope" ], | ||
"oscilloscope-device": "m2k-adc", | ||
"voltmeter-device": "m2k-adc", | ||
"signal-generator-device": "m2k-dac" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
AppIcon ICON DISCARDABLE "icon.ico" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.