Commit 8d7db041 authored by Andreas Bombe's avatar Andreas Bombe

New upstream version 0.2.0+git20170310+dfsg

parent ac88baf7
......@@ -6,19 +6,69 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")
SET(CUBICSDR_VERSION_MAJOR "0")
SET(CUBICSDR_VERSION_MINOR "2")
SET(CUBICSDR_VERSION_PATCH "0")
SET(CUBICSDR_VERSION_REL "")
SET(CUBICSDR_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}${CUBICSDR_VERSION_REL}")
SET(CUBICSDR_VERSION_PATCH "2")
SET(CUBICSDR_VERSION_SUFFIX "-alpha")
SET(CUBICSDR_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}${CUBICSDR_VERSION_SUFFIX}")
SET(CPACK_PACKAGE_VERSION "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}")
SET(CPACK_PACKAGE_VERSION_MAJOR ${CUBICSDR_VERSION_MAJOR})
SET(CPACK_PACKAGE_VERSION_MINOR ${CUBICSDR_VERSION_MINOR})
SET(CPACK_PACKAGE_VERSION_PATCH ${CUBICSDR_VERSION_PATCH})
SET (VERSION_SUFFIX "" CACHE STRING "Add custom version suffix to CubicSDR application title.")
SET (CUSTOM_BUILD OFF CACHE BOOL "Enable custom build options")
# Build options for custom deploys, optimization and debugging
IF(CUSTOM_BUILD)
SET (CUBICSDR_BUILD_TITLE CACHE STRING "Custom Title")
# bundle flags
SET (CUBICSDR_INSTALL_NAME CACHE "CubicSDR" "Installation Name")
SET (CUBICSDR_INSTALL_TITLE CACHE "CubicSDR" "Installation Title")
SET (CUBICSDR_HEADER_IMAGE CACHE "" "Image file to display in header")
SET (CUBICSDR_HEADER_BG CACHE "000000" "Background Color (HEX) for header")
# feature flags
SET (CUBICSDR_ENABLE_VIEW_DEMOD ON CACHE BOOL "Enable Second Demodulator Spectrum/Waterfall view.")
SET (CUBICSDR_ENABLE_VIEW_SCOPE ON CACHE BOOL "Enable Demodulator Scope/Spectrum view.")
SET (CUBICSDR_MODEM_EXCLUDE CACHE "" "Comma-separated list of modems to exclude.")
IF (NOT CUBICSDR_HEADER_IMAGE STREQUAL "")
SET(CUBICSDR_HAS_HEADER_IMAGE TRUE)
GET_FILENAME_COMPONENT(CUBICSDR_HEADER_IMAGE_FILE "${CUBICSDR_HEADER_IMAGE}" NAME)
GET_FILENAME_COMPONENT(CUBICSDR_HEADER_IMAGE_DIR "${CUBICSDR_HEADER_IMAGE}" PATH)
ADD_DEFINITIONS(
-DCUBICSDR_HEADER_IMAGE="${CUBICSDR_HEADER_IMAGE_FILE}"
-DCUBICSDR_HEADER_BG="${CUBICSDR_HEADER_BG}"
)
ENDIF()
IF (NOT CUBICSDR_MODEM_EXCLUDE STREQUAL "")
ADD_DEFINITIONS(
-DCUBICSDR_MODEM_EXCLUDE="${CUBICSDR_MODEM_EXCLUDE}"
)
ENDIF()
ELSE()
SET (CUBICSDR_BUILD_TITLE "CubicSDR v${CUBICSDR_VERSION} :: www.cubicsdr.com")
# bundle flags
SET (CUBICSDR_INSTALL_NAME "CubicSDR")
SET (CUBICSDR_INSTALL_TITLE "CubicSDR ${CUBICSDR_VERSION} Installer")
SET (CUBICSDR_HEADER_IMAGE "")
SET (CUBICSDR_HEADER_BG "")
# feature flags
SET (CUBICSDR_ENABLE_VIEW_DEMOD TRUE)
SET (CUBICSDR_ENABLE_VIEW_SCOPE TRUE)
SET (CUBICSDR_EXCLUDE_MODEM "")
ENDIF()
IF(CUBICSDR_ENABLE_VIEW_DEMOD)
ADD_DEFINITIONS( -DCUBICSDR_ENABLE_VIEW_DEMOD=1 )
ENDIF()
IF(CUBICSDR_ENABLE_VIEW_SCOPE)
ADD_DEFINITIONS( -DCUBICSDR_ENABLE_VIEW_SCOPE=1 )
ENDIF()
ADD_DEFINITIONS(
-DCUBICSDR_VERSION="${CUBICSDR_VERSION}${VERSION_SUFFIX}"
-DCUBICSDR_INSTALL_NAME="${CUBICSDR_INSTALL_NAME}"
-DCUBICSDR_VERSION="${CUBICSDR_VERSION}"
-DCUBICSDR_BUILD_TITLE="${CUBICSDR_BUILD_TITLE}"
)
SET (ENABLE_DIGITAL_LAB OFF CACHE BOOL "Enable 'Digital Lab' testing features.")
......@@ -26,16 +76,6 @@ IF(ENABLE_DIGITAL_LAB)
ADD_DEFINITIONS(
-DENABLE_DIGITAL_LAB=1
)
IF(MSVC)
SET (ENABLE_LIQUID_EXPERIMENTAL OFF CACHE BOOL "Enable experimental liquid-dsp features (requires latest liquid-dsp installed)")
ELSE()
SET (ENABLE_LIQUID_EXPERIMENTAL ON CACHE BOOL "Enable experimental liquid-dsp features (requires latest liquid-dsp installed)")
ENDIF()
IF(ENABLE_LIQUID_EXPERIMENTAL)
ADD_DEFINITIONS(
-DENABLE_LIQUID_EXPERIMENTAL=1
)
ENDIF()
ENDIF()
set(USE_HAMLIB OFF CACHE BOOL "Support hamlib for radio control functions.")
......@@ -107,7 +147,7 @@ IF (MSVC)
SET(LIQUID_INCLUDES "${PROJECT_SOURCE_DIR}/external/liquid-dsp/include/" CACHE STRING "Liquid-DSP include directory")
SET(LIQUID_LIBRARIES "${PROJECT_SOURCE_DIR}/external/liquid-dsp/msvc/${EX_PLATFORM}/libliquid.lib" CACHE STRING "Liquid-DSP Library")
SET(LIQUID_DLL "${PROJECT_SOURCE_DIR}/external/liquid-dsp/msvc/${EX_PLATFORM}/libliquid.dll" CACHE STRING "Liquid-DSP DLL")
SET(HAMLIB_DLLS "${PROJECT_SOURCE_DIR}/external/hamlib/${EX_PLATFORM}/libhamlib-2.dll;${PROJECT_SOURCE_DIR}/external/hamlib/${EX_PLATFORM}/libwinpthread-1.dll" CACHE STRING "HAMLIB DLLS")
SET(HAMLIB_DLLS "${PROJECT_SOURCE_DIR}/external/hamlib/${EX_PLATFORM}/libhamlib-2.dll" CACHE STRING "HAMLIB DLLS")
ELSE (MSVC)
ADD_DEFINITIONS(
-std=c++0x
......@@ -174,35 +214,57 @@ IF (WIN32)
ENDIF()
ENDIF (WIN32)
MACRO(use_included_rtaudio)
SET (cubicsdr_sources
${cubicsdr_sources}
external/rtaudio/RtAudio.cpp
)
SET (cubicsdr_headers
${cubicsdr_headers}
external/rtaudio/RtAudio.h
)
SOURCE_GROUP("_ext-RTAudio" REGULAR_EXPRESSION "external/rtaudio/.*${REG_EXT}")
include_directories(${PROJECT_SOURCE_DIR}/external/rtaudio)
ENDMACRO(use_included_rtaudio)
IF (UNIX AND NOT APPLE)
set(BUILD_DEB OFF CACHE BOOL "Build DEB")
SET(USE_SYSTEM_RTAUDIO OFF CACHE BOOL "Use the system RtAudio which in turn provides OSS, ALSA, JACK, PulseAudio support depending on how it was compiled")
SET(LIQUID_LIB liquid)
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} dl)
IF(USE_SYSTEM_RTAUDIO)
find_package(RtAudio)
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} ${RTAUDIO_LIBRARIES})
ADD_DEFINITIONS(${RTAUDIO_DEFINITIONS})
include_directories(${RTAUDIO_INCLUDE_DIR})
ELSE(USE_SYSTEM_RTAUDIO)
use_included_rtaudio()
SET(USE_AUDIO_PULSE ON CACHE BOOL "Use Pulse Audio")
SET(USE_AUDIO_JACK OFF CACHE BOOL "Use Jack Audio")
SET(USE_AUDIO_ALSA OFF CACHE BOOL "Use ALSA Audio")
SET(USE_AUDIO_OSS OFF CACHE BOOL "Use OSS Audio")
SET(LIQUID_LIB liquid)
SET(OTHER_LIBRARIES ${OTHER_LIBRARIES} dl)
IF(USE_AUDIO_PULSE)
IF(USE_AUDIO_PULSE)
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} pulse-simple pulse)
ADD_DEFINITIONS(
-D__LINUX_PULSE__
)
ENDIF(USE_AUDIO_PULSE)
ENDIF(USE_AUDIO_PULSE)
IF(USE_AUDIO_JACK)
IF(USE_AUDIO_JACK)
find_package(Jack)
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} ${JACK_LIBRARIES})
ADD_DEFINITIONS(
-D__UNIX_JACK__
)
include_directories(${JACK_INCLUDE_DIRS})
ENDIF(USE_AUDIO_JACK)
ENDIF(USE_AUDIO_JACK)
IF(USE_AUDIO_ALSA)
IF(USE_AUDIO_ALSA)
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} asound)
set(ALSA_INCLUDE_DIR "/usr/include" CACHE FILEPATH "ALSA include path")
include_directories(${ALSA_INCLUDE_DIR})
......@@ -211,14 +273,17 @@ IF(USE_AUDIO_ALSA)
ADD_DEFINITIONS(
-D__LINUX_ALSA__
)
ENDIF(USE_AUDIO_ALSA)
ENDIF(USE_AUDIO_ALSA)
IF(USE_AUDIO_OSS)
IF(USE_AUDIO_OSS)
SET (OTHER_LIBRARIES ${OTHER_LIBRARIES} oss)
ADD_DEFINITIONS(
-D__LINUX_OSS__
)
ENDIF(USE_AUDIO_OSS)
ENDIF(USE_AUDIO_OSS)
ENDIF(USE_SYSTEM_RTAUDIO)
ELSE(UNIX AND NOT APPLE)
use_included_rtaudio()
ENDIF(UNIX AND NOT APPLE)
IF (APPLE)
......@@ -240,6 +305,7 @@ ENDIF (APPLE)
SET (cubicsdr_sources
${cubicsdr_sources}
src/CubicSDR.cpp
src/AppFrame.cpp
src/AppConfig.cpp
......@@ -247,6 +313,7 @@ SET (cubicsdr_sources
src/DemodLabelDialog.cpp
src/IOThread.cpp
src/ModemProperties.cpp
src/BookmarkMgr.cpp
src/sdr/SDRDeviceInfo.cpp
src/sdr/SDRPostThread.cpp
src/sdr/SDREnumerator.cpp
......@@ -293,6 +360,7 @@ SET (cubicsdr_sources
src/visual/SpectrumCanvas.cpp
src/visual/WaterfallCanvas.cpp
src/visual/GainCanvas.cpp
src/visual/ImagePanel.cpp
src/process/VisualProcessor.cpp
src/process/ScopeVisualProcessor.cpp
src/process/SpectrumVisualProcessor.cpp
......@@ -304,7 +372,12 @@ SET (cubicsdr_sources
src/forms/SDRDevices/SDRDevicesForm.cpp
src/forms/SDRDevices/SDRDeviceAdd.cpp
src/forms/SDRDevices/SDRDeviceAddForm.cpp
external/rtaudio/RtAudio.cpp
src/forms/Bookmark/BookmarkPanel.cpp
src/forms/Bookmark/BookmarkView.cpp
src/forms/Dialog/ActionDialogBase.cpp
src/forms/Dialog/ActionDialog.cpp
src/forms/Dialog/AboutDialogBase.cpp
src/forms/Dialog/AboutDialog.cpp
external/lodepng/lodepng.cpp
external/tinyxml/tinyxml.cpp
external/tinyxml/tinystr.cpp
......@@ -329,16 +402,12 @@ IF(ENABLE_DIGITAL_LAB)
src/modules/modem/digital/ModemSQAM.cpp
src/modules/modem/digital/ModemQAM.cpp
src/modules/modem/digital/ModemQPSK.cpp
)
IF(ENABLE_LIQUID_EXPERIMENTAL)
SET (cubicsdr_sources
${cubicsdr_sources}
src/modules/modem/digital/ModemFSK.cpp
)
ENDIF()
ENDIF()
SET (cubicsdr_headers
${cubicsdr_headers}
src/CubicSDRDefs.h
src/CubicSDR.h
src/AppFrame.h
......@@ -347,6 +416,7 @@ SET (cubicsdr_headers
src/DemodLabelDialog.h
src/IOThread.h
src/ModemProperties.h
src/BookmarkMgr.h
src/sdr/SDRDeviceInfo.h
src/sdr/SDRPostThread.h
src/sdr/SDREnumerator.h
......@@ -371,7 +441,7 @@ SET (cubicsdr_headers
src/audio/AudioThread.h
src/util/Gradient.h
src/util/Timer.h
src/util/ThreadQueue.h
src/util/ThreadBlockingQueue.h
src/util/MouseTracker.h
src/util/GLExt.h
src/util/GLFont.h
......@@ -393,6 +463,7 @@ SET (cubicsdr_headers
src/visual/SpectrumCanvas.h
src/visual/WaterfallCanvas.h
src/visual/GainCanvas.h
src/visual/ImagePanel.h
src/process/VisualProcessor.h
src/process/ScopeVisualProcessor.h
src/process/SpectrumVisualProcessor.h
......@@ -408,7 +479,12 @@ SET (cubicsdr_headers
src/forms/SDRDevices/SDRDevicesForm.h
src/forms/SDRDevices/SDRDeviceAdd.h
src/forms/SDRDevices/SDRDeviceAddForm.h
external/rtaudio/RtAudio.h
src/forms/Bookmark/BookmarkPanel.h
src/forms/Bookmark/BookmarkView.h
src/forms/Dialog/ActionDialogBase.h
src/forms/Dialog/ActionDialog.h
src/forms/Dialog/AboutDialogBase.h
src/forms/Dialog/AboutDialog.h
external/lodepng/lodepng.h
external/tinyxml/tinyxml.h
external/tinyxml/tinystr.h
......@@ -444,13 +520,8 @@ SET (cubicsdr_headers
src/modules/modem/digital/ModemSQAM.h
src/modules/modem/digital/ModemQAM.h
src/modules/modem/digital/ModemQPSK.h
)
IF(ENABLE_LIQUID_EXPERIMENTAL)
SET (cubicsdr_sources
${cubicsdr_sources}
src/modules/modem/digital/ModemFSK.h
)
ENDIF()
)
ENDIF()
......@@ -495,6 +566,8 @@ set(REG_EXT "[^/]*([.]cpp|[.]c|[.]h|[.]hpp)$")
SOURCE_GROUP("Base" REGULAR_EXPRESSION "src/${REG_EXT}")
SOURCE_GROUP("Forms\\SDRDevices" REGULAR_EXPRESSION "src/forms/SDRDevices/${REG_EXT}")
SOURCE_GROUP("Forms\\Bookmark" REGULAR_EXPRESSION "src/forms/Bookmark/${REG_EXT}")
SOURCE_GROUP("Forms\\Dialog" REGULAR_EXPRESSION "src/forms/Dialog/${REG_EXT}")
SOURCE_GROUP("SDR" REGULAR_EXPRESSION "src/sdr/${REG_EXT}")
IF(USE_HAMLIB)
SOURCE_GROUP("Rig" REGULAR_EXPRESSION "src/rig/${REG_EXT}")
......@@ -512,7 +585,6 @@ SOURCE_GROUP("Visual" REGULAR_EXPRESSION "src/visual/${REG_EXT}")
SOURCE_GROUP("Panel" REGULAR_EXPRESSION "src/panel/${REG_EXT}")
SOURCE_GROUP("Process" REGULAR_EXPRESSION "src/process/${REG_EXT}")
SOURCE_GROUP("UI" REGULAR_EXPRESSION "src/ui/${REG_EXT}")
SOURCE_GROUP("_ext-RTAudio" REGULAR_EXPRESSION "external/rtaudio/.*${REG_EXT}")
SOURCE_GROUP("_ext-LodePNG" REGULAR_EXPRESSION "external/lodepng/.*${REG_EXT}")
SOURCE_GROUP("_ext-TinyXML" REGULAR_EXPRESSION "external/tinyxml/.*${REG_EXT}")
SOURCE_GROUP("_ext-CubicVR2" REGULAR_EXPRESSION "external/cubicvr2/.*${REG_EXT}")
......@@ -520,6 +592,8 @@ SOURCE_GROUP("_ext-CubicVR2" REGULAR_EXPRESSION "external/cubicvr2/.*${REG_EXT}"
include_directories (
${PROJECT_SOURCE_DIR}/src/forms/SDRDevices
${PROJECT_SOURCE_DIR}/src/forms/DigitalConsole
${PROJECT_SOURCE_DIR}/src/forms/Bookmark
${PROJECT_SOURCE_DIR}/src/forms/Dialog
${PROJECT_SOURCE_DIR}/src/sdr
${PROJECT_SOURCE_DIR}/src/demod
${PROJECT_SOURCE_DIR}/src/modules
......@@ -534,7 +608,6 @@ include_directories (
${PROJECT_SOURCE_DIR}/src/ui
${PROJECT_SOURCE_DIR}/src/rig
${PROJECT_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/external/rtaudio
${PROJECT_SOURCE_DIR}/external/lodepng
${PROJECT_SOURCE_DIR}/external/tinyxml
${PROJECT_SOURCE_DIR}/external/cubicvr2/math
......@@ -561,6 +634,9 @@ IF (NOT BUNDLE_APP)
IF(MSVC)
configure_files(${PROJECT_SOURCE_DIR}/external/liquid-dsp/msvc/${EX_PLATFORM}/ ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} "*.dll")
ENDIF()
IF (CUBICSDR_HAS_HEADER_IMAGE)
configure_files(${CUBICSDR_HEADER_IMAGE_DIR} ${CMAKE_BINARY_DIR}/${EX_PLATFORM_NAME} ${CUBICSDR_HEADER_IMAGE_FILE})
ENDIF()
add_executable(CubicSDR ${cubicsdr_sources} ${cubicsdr_headers} ${RES_FILES})
target_link_libraries(CubicSDR ${LIQUID_LIB} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${OTHER_LIBRARIES})
ENDIF (NOT BUNDLE_APP)
......@@ -575,6 +651,11 @@ IF (MSVC)
set_target_properties(CubicSDR PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
set_target_properties(CubicSDR PROPERTIES COMPILE_DEFINITIONS_MINSIZEREL "_WINDOWS")
set(CMAKE_CREATE_WIN32_EXE "/SUBSYSTEM:WINDOWS /ENTRY:\"mainCRTStartup\"")
set_target_properties (CubicSDR PROPERTIES OUTPUT_NAME "${CUBICSDR_INSTALL_NAME}")
ADD_DEFINITIONS(
/wd\"4996\"
)
ENDIF(MSVC)
IF (APPLE)
......@@ -639,7 +720,7 @@ IF (APPLE AND BUNDLE_APP)
MACOSX_BUNDLE_INFO_STRING "CubicSDR Open-Source Software-Defined Radio Application"
MACOSX_BUNDLE_BUNDLE_NAME "CubicSDR"
MACOSX_BUNDLE_BUNDLE_VERSION "${CUBICSDR_VERSION}"
MACOSX_BUNDLE_LONG_VERSION_STRING "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}.${CUBICSDR_VERSION_REL}"
MACOSX_BUNDLE_LONG_VERSION_STRING "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}${CUBICSDR_VERSION_SUFFIX}"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${CUBICSDR_VERSION_MAJOR}.${CUBICSDR_VERSION_MINOR}.${CUBICSDR_VERSION_PATCH}"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.cubicproductions.cubicsdr"
MACOSX_BUNDLE_ICON_FILE "CubicSDR.icns"
......@@ -651,9 +732,10 @@ IF (APPLE AND BUNDLE_APP)
# SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
IF (BUNDLE_SOAPY_MODS)
message(STATUS "SOAPY_ROOT: ${SOAPY_SDR_ROOT}")
file(GLOB SOAPY_MODS ${SOAPY_SDR_ROOT}/lib/SoapySDR/modules/*.so)
SET(SOAPY_SDR_MOD_PATH "${SOAPY_SDR_ROOT}/lib/SoapySDR/modules/${SOAPY_SDR_ABI_VERSION}")
file(GLOB SOAPY_MODS ${SOAPY_MOD_PATH}/*.so)
FOREACH(SOAPY_MOD_FILE ${SOAPY_MODS})
INSTALL( FILES "${SOAPY_MOD_FILE}"
......@@ -734,6 +816,7 @@ IF (APPLE AND BUNDLE_APP)
include(CPack)
ENDIF()
IF(APPLE AND NOT BUNDLE_APP)
IF (NOT CMAKE_INSTALL_PREFIX)
SET(CMAKE_INSTALL_PREFIX "/usr/")
......@@ -790,28 +873,35 @@ IF (WIN32 AND NOT BUILD_INSTALLER)
INSTALL(FILES
${CUBICSDR_FONTS}
DESTINATION share/cubicsdr/fonts)
IF (CUBICSDR_HAS_HEADER_IMAGE)
INSTALL(FILES
${CUBICSDR_HEADER_IMAGE}
DESTINATION share/cubicsdr/)
ENDIF()
ENDIF()
IF (WIN32 AND BUILD_INSTALLER)
set(BUNDLE_SOAPY_MODS OFF CACHE BOOL "Bundle local SoapySDR modules")
set(CPACK_GENERATOR NSIS)
set(CPACK_PACKAGE_NAME "CubicSDR")
set(CPACK_PACKAGE_NAME "${CUBICSDR_INSTALL_NAME}")
set(CPACK_NSIS_DISPLAY_NAME "${CUBICSDR_INSTALL_TITLE}")
set(CPACK_PACKAGE_VENDOR "cubicsdr.com")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CubicSDR ${CUBICSDR_VERSION} Installer")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CubicSDR")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CUBICSDR_INSTALL_NAME}")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "CubicSDR.ico")
SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/icon\\\\NSIS_Header.bmp")
IF(EX_PLATFORM EQUAL 64)
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
SET(CPACK_NSIS_PACKAGE_NAME "${CUBICSDR_INSTALL_NAME}")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CUBICSDR_INSTALL_NAME} ${CPACK_PACKAGE_VERSION}")
set(CMAKE_CL_64 TRUE) # This gets around a bug in the CPack installer name generation for MinGW 64-bit since 2.8
ELSE(EX_PLATFORM EQUAL 64)
SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
SET(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} (x86)")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION} (x86)")
SET(CPACK_NSIS_PACKAGE_NAME "${CUBICSDR_INSTALL_NAME} (x86)")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CUBICSDR_INSTALL_NAME} ${CPACK_PACKAGE_VERSION} (x86)")
set(CMAKE_CL_64 FALSE)
ENDIF(EX_PLATFORM EQUAL 64)
......@@ -827,6 +917,12 @@ IF (WIN32 AND BUILD_INSTALLER)
${CUBICSDR_FONTS}
DESTINATION fonts)
IF (CUBICSDR_HAS_HEADER_IMAGE)
INSTALL(FILES
${CUBICSDR_HEADER_IMAGE}
DESTINATION .)
ENDIF()
IF(USE_HAMLIB)
FOREACH(HAMLIB_DLL ${HAMLIB_DLLS})
message(STATUS "Copying Hamlib DLL: ${HAMLIB_DLL}")
......@@ -848,7 +944,7 @@ IF (WIN32 AND BUILD_INSTALLER)
ENDIF()
file(GLOB SOAPY_BINS ${SOAPY_SDR_ROOT}/bin/*.dll)
file(GLOB SOAPY_MODS ${SOAPY_SDR_ROOT}/lib/SoapySDR/modules/*.dll)
file(GLOB SOAPY_MODS ${SOAPY_SDR_ROOT}/lib/SoapySDR/modules${SOAPY_SDR_ABI_VERSION}/*.dll)
message(STATUS "SOAPY_BINS: ${SOAPY_BINS}")
message(STATUS "SOAPY_MODS: ${SOAPY_MODS}")
install(FILES ${SOAPY_BINS} DESTINATION .)
......@@ -856,9 +952,8 @@ IF (WIN32 AND BUILD_INSTALLER)
ENDIF(BUNDLE_SOAPY_MODS)
IF(MSVC AND EX_PLATFORM EQUAL 32)
install(FILES
${PROJECT_SOURCE_DIR}/external/msvc/${EX_PLATFORM_NAME}/libgcc_s_dw2-1.dll
DESTINATION .)
file(GLOB MSVC32_DEPS ${PROJECT_SOURCE_DIR}/external/msvc/${EX_PLATFORM_NAME}/*.dll)
install(FILES ${MSVC32_DEPS} DESTINATION .)
ENDIF(MSVC AND EX_PLATFORM EQUAL 32)
set(CPACK_PACKAGE_EXECUTABLES CubicSDR "CubicSDR")
......@@ -938,6 +1033,13 @@ IF(UNIX AND NOT APPLE AND NOT BUILD_DEB)
${CUBICSDR_FONTS}
DESTINATION share/cubicsdr/fonts)
IF (CUBICSDR_HAS_HEADER_IMAGE)
INSTALL(FILES
${CUBICSDR_HEADER_IMAGE}
DESTINATION share/cubicsdr)
ENDIF()
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/CubicSDR.desktop"
DESTINATION share/applications)
......
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
......@@ -290,8 +290,8 @@ to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
CubicSDR
Copyright (C) 2014 Charles J. Cliffe
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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
......@@ -329,7 +329,7 @@ necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
......@@ -337,4 +337,3 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
......@@ -48,4 +48,4 @@ Target Platforms:
License:
-------
- GPL
- GPL-2.0+
# https://github.com/idiap/juicer/blob/master/cmake/FindRtAudio.cmake
#
# Copyright 2015 by Idiap Research Institute
#
# Licensed under 3-clause BSD.
#
# Author(s):
# Phil Garner, November 2015
#
# ...but basically copied from FindSndFile in libube, in turn from the examples
# on the web.
#
#
# Try to find RtAudio
# Once done this will define
# RTAUDIO_FOUND - System has RtAudio
# RTAUDIO_INCLUDE_DIR - The RtAudio include directories
# RTAUDIO_LIBRARIES - The libraries needed to use RtAudio
# RTAUDIO_DEFINITIONS - Compiler switches required for using RtAudio
# RTAUDIO_VERSION_STRING - the version of RtAudio found
#
find_package(PkgConfig)
pkg_check_modules(PC_RTAUDIO rtaudio)
set(RTAUDIO_DEFINITIONS ${PC_RTAUDIO_CFLAGS_OTHER})
set(RTAUDIO_VERSION_STRING ${PC_RTAUDIO_VERSION})
find_path(
RTAUDIO_INCLUDE_DIR RtAudio.h
HINTS ${PC_RTAUDIO_INCLUDEDIR} ${PC_RTAUDIO_INCLUDE_DIRS}
)
find_library(
RTAUDIO_LIBRARIES NAMES rtaudio
HINTS ${PC_RTAUDIO_LIBDIR} ${PC_RTAUDIO_LIBRARY_DIRS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
RtAudio
REQUIRED_VARS RTAUDIO_LIBRARIES RTAUDIO_INCLUDE_DIR
VERSION_VAR RTAUDIO_VERSION_STRING
)
#mark_as_advanced(RTAUDIO_INCLUDE_DIR RTAUDIO_LIBRARIES)
/*
LodePNG version 20160501
LodePNG version 20161127
Copyright (c) 2005-2016 Lode Vandevenne
......@@ -39,7 +39,7 @@ Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for
#pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/
#endif /*_MSC_VER */
const char* LODEPNG_VERSION_STRING = "20160501";
const char* LODEPNG_VERSION_STRING = "20161127";
/*
This source file is built up in the following large parts. The code sections
......@@ -3534,8 +3534,8 @@ void lodepng_color_profile_init(LodePNGColorProfile* profile)
{
profile->colored = 0;
profile->key = 0;
profile->alpha = 0;
profile->key_r = profile->key_g = profile->key_b = 0;
profile->alpha = 0;
profile->numcolors = 0;
profile->bits = 1;
}
......@@ -3622,8 +3622,8 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
if(a != 65535 && (a != 0 || (profile->key && !matchkey)))
{
profile->alpha = 1;
profile->key = 0;
alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
}
else if(a == 0 && !profile->alpha && !profile->key)
{
......@@ -3636,6 +3636,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{
/* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1;
profile->key = 0;
alpha_done = 1;
}
}
......@@ -3651,6 +3652,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{
/* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1;
profile->key = 0;
alpha_done = 1;
}
}
......@@ -3684,6 +3686,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
if(a != 255 && (a != 0 || (profile->key && !matchkey)))
{
profile->alpha = 1;
profile->key = 0;
alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
}
......@@ -3698,6 +3701,7 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{
/* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1;
profile->key = 0;
alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
}
......@@ -3734,7 +3738,9 @@ unsigned lodepng_get_color_profile(LodePNGColorProfile* profile,
{
/* Color key cannot be used if an opaque pixel also has that RGB color. */
profile->alpha = 1;
profile->key = 0;
alpha_done = 1;
if(profile->bits < 8) profile->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
}
}
}
......@@ -3760,7 +3766,7 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
{
LodePNGColorProfile prof;
unsigned error = 0;
unsigned i, n, palettebits, grey_ok, palette_ok;
unsigned i, n, palettebits, palette_ok;
lodepng_color_profile_init(&prof);
error = lodepng_get_color_profile(&prof, image, w, h, mode_in);
......@@ -3770,14 +3776,14 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
if(prof.key && w * h <= 16)
{
prof.alpha = 1; /*too few pixels to justify tRNS chunk overhead*/
prof.key = 0;
if(prof.bits < 8) prof.bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/
}
grey_ok = !prof.colored && !prof.alpha; /*grey without alpha, with potentially low bits*/
n = prof.numcolors;
palettebits = n <= 2 ? 1 : (n <= 4 ? 2 : (n <= 16 ? 4 : 8));
palette_ok = n <= 256 && (n * 2 < w * h) && prof.bits <= 8;
palette_ok = n <= 256 && prof.bits <= 8;
if(w * h < n * 2) palette_ok = 0; /*don't add palette overhead if image has only a few pixels*/
if(grey_ok && prof.bits <= palettebits) palette_ok = 0; /*grey is less overhead*/
if(!prof.colored && prof.bits <= palettebits) palette_ok = 0; /*grey is less overhead*/
if(palette_ok)
{
......@@ -3806,7 +3812,7 @@ unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
mode_out->colortype = prof.alpha ? (prof.colored ? LCT_RGBA : LCT_GREY_ALPHA)
: (prof.colored ? LCT_RGB : LCT_GREY);
if(prof.key && !prof.alpha)
if(prof.key)
{
unsigned mask = (1u << mode_out->bitdepth) - 1u; /*profile always uses 16-bit, mask converts it*/
mode_out->key_r = prof.key_r & mask;
......
/*
LodePNG version 20160501
LodePNG version 20161127
Copyright (c) 2005-2016 Lode Vandevenne
......@@ -559,11 +559,11 @@ Used internally by default if "auto_convert" is enabled. Public because it's use
typedef struct LodePNGColorProfile
{
unsigned colored; /*not greyscale*/
unsigned key; /*if true, image is not opaque. Only if true and alpha is false, color key is possible.*/
unsigned short key_r; /*these values are always in 16-bit bitdepth in the profile*/
unsigned key; /*image is not opaque and color key is possible instead of full alpha*/
unsigned short key_r; /*key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255*/
unsigned short key_g;
unsigned short key_b;