forked from Ivasoft/DSView
Merge pull request #335 from vowstar/fix-desktop-and-build
Fix desktop and build
This commit is contained in:
@@ -7,42 +7,59 @@
|
||||
# also defined, but not for general use are
|
||||
# FFTW_LIBRARY, where to find the FFTW library.
|
||||
|
||||
FIND_PATH(FFTW_INCLUDE_DIR fftw3.h
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/opt/local/lib
|
||||
FIND_PATH(FFTW_INCLUDE_DIR
|
||||
NAMES
|
||||
fftw3.h
|
||||
PATHS
|
||||
/usr/local/include
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(FFTW_NAMES ${FFTW_NAMES} fftw3 fftw3f fftw3-3)
|
||||
SET(FFTW_NAMES ${FFTW_NAMES} fftw3 fftw3f fftw3l fftw3-3)
|
||||
FIND_LIBRARY(FFTW_LIBRARY
|
||||
NAMES ${FFTW_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib /opt/locala/lib
|
||||
NAMES
|
||||
${FFTW_NAMES}
|
||||
PATHS
|
||||
/usr/local/lib64
|
||||
/opt/local/lib64
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
# Find threads part of FFTW
|
||||
|
||||
SET(FFTW_THREADS_NAMES ${FFTW_THREADS_NAMES} fftw3f_threads fftw3_threads fftw3-3_threads)
|
||||
SET(FFTW_THREADS_NAMES ${FFTW_THREADS_NAMES} fftw3_threads fftw3f_threads fftw3l_threads fftw3-3_threads)
|
||||
FIND_LIBRARY(FFTW_THREADS_LIBRARY
|
||||
NAMES ${FFTW_THREADS_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib /opt/local/lib
|
||||
NAMES
|
||||
${FFTW_THREADS_NAMES}
|
||||
PATHS
|
||||
/usr/local/lib64
|
||||
/opt/local/lib64
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
IF (FFTW_THREADS_LIBRARY AND FFTW_INCLUDE_DIR)
|
||||
SET(FFTW_THREADS_LIBRARIES ${FFTW_THREADS_LIBRARY})
|
||||
SET(FFTW_THREADS_FOUND "YES")
|
||||
SET(FFTW_THREADS_LIBRARIES ${FFTW_THREADS_LIBRARY})
|
||||
SET(FFTW_THREADS_FOUND "YES")
|
||||
ELSE (FFTW_THREADS_LIBRARY AND FFTW_INCLUDE_DIR)
|
||||
SET(FFTW_THREADS_FOUND "NO")
|
||||
ENDIF (FFTW_THREADS_LIBRARY AND FFTW_INCLUDE_DIR)
|
||||
|
||||
|
||||
IF (FFTW_THREADS_FOUND)
|
||||
IF (NOT FFTW_THREADS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found FFTW threads: ${FFTW_THREADS_LIBRARIES}")
|
||||
ENDIF (NOT FFTW_THREADS_FIND_QUIETLY)
|
||||
IF (NOT FFTW_THREADS_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found FFTW threads: ${FFTW_THREADS_LIBRARIES}")
|
||||
ENDIF (NOT FFTW_THREADS_FIND_QUIETLY)
|
||||
ELSE (FFTW_THREADS_FOUND)
|
||||
IF (FFTW_THREADS_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find FFTW threads library")
|
||||
ENDIF (FFTW_THREADS_FIND_REQUIRED)
|
||||
IF (FFTW_THREADS_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could not find FFTW threads library")
|
||||
ENDIF (FFTW_THREADS_FIND_REQUIRED)
|
||||
ENDIF (FFTW_THREADS_FOUND)
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,45 @@
|
||||
# - Try to find libusb-1.0
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBUSB_1_FOUND - system has libusb
|
||||
# LIBUSB_1_INCLUDE_DIRS - the libusb include directory
|
||||
# LIBUSB_1_LIBRARIES - Link these to use libusb
|
||||
# LIBUSB_1_DEFINITIONS - Compiler switches required for using libusb
|
||||
# LIBUSB_1_FOUND - system has libusb
|
||||
# LIBUSB_1_INCLUDE_DIRS - the libusb include directory
|
||||
# LIBUSB_1_LIBRARIES - Link these to use libusb
|
||||
# LIBUSB_1_DEFINITIONS - Compiler switches required for using libusb
|
||||
#
|
||||
# Adapted from cmake-modules Google Code project
|
||||
# Adapted from cmake-modules Google Code project
|
||||
#
|
||||
# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
|
||||
# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
|
||||
#
|
||||
# (Changes for libusb) Copyright (c) 2008 Kyle Machulis <kyle@nonpolynomial.com>
|
||||
# (Changes for libusb) Copyright (c) 2008 Kyle Machulis <kyle@nonpolynomial.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
# CMake-Modules Project New BSD License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
#
|
||||
# * Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# * Neither the name of the CMake-Modules Project nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
|
||||
@@ -21,18 +49,26 @@ if (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
|
||||
else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
|
||||
find_path(LIBUSB_1_INCLUDE_DIR
|
||||
NAMES
|
||||
libusb-1.0/libusb.h
|
||||
libusb.h
|
||||
PATHS
|
||||
/usr/local/include
|
||||
PATH_SUFFIXES
|
||||
libusb-1.0
|
||||
/opt/local/include
|
||||
/usr/include
|
||||
|
||||
PATH_SUFFIXES
|
||||
libusb-1.0
|
||||
)
|
||||
|
||||
find_library(LIBUSB_1_LIBRARY
|
||||
NAMES
|
||||
usb-1.0
|
||||
usb-1.0 usb
|
||||
PATHS
|
||||
/usr/local/lib64
|
||||
/opt/local/lib64
|
||||
/usr/lib64
|
||||
/usr/local/lib
|
||||
/opt/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
|
||||
set(LIBUSB_1_INCLUDE_DIRS
|
||||
@@ -49,8 +85,8 @@ libusb-1.0
|
||||
if (LIBUSB_1_FOUND)
|
||||
if (NOT libusb_1_FIND_QUIETLY)
|
||||
message(STATUS "Found libusb-1.0:")
|
||||
message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}")
|
||||
message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
|
||||
message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}")
|
||||
message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
|
||||
endif (NOT libusb_1_FIND_QUIETLY)
|
||||
else (LIBUSB_1_FOUND)
|
||||
if (libusb_1_FIND_REQUIRED)
|
||||
|
||||
@@ -420,15 +420,17 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# Install the executable.
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin/)
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
|
||||
install(DIRECTORY res DESTINATION share/${PROJECT_NAME})
|
||||
install(FILES icons/logo.svg DESTINATION share/${PROJECT_NAME} RENAME logo.svg)
|
||||
install(FILES icons/logo.svg DESTINATION share/icons/hicolor/scalable/apps RENAME dsview.svg)
|
||||
install(FILES icons/logo.svg DESTINATION share/pixmaps RENAME dsview.svg)
|
||||
install(FILES ../NEWS25 DESTINATION share/${PROJECT_NAME} RENAME NEWS25)
|
||||
install(FILES ../NEWS31 DESTINATION share/${PROJECT_NAME} RENAME NEWS31)
|
||||
install(FILES ../ug25.pdf DESTINATION share/${PROJECT_NAME} RENAME ug25.pdf)
|
||||
install(FILES ../ug31.pdf DESTINATION share/${PROJECT_NAME} RENAME ug31.pdf)
|
||||
install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/)
|
||||
install(FILES DSView.desktop DESTINATION /usr/share/applications/)
|
||||
install(FILES DreamSourceLab.rules DESTINATION /lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
|
||||
install(FILES DSView.desktop DESTINATION /usr/share/applications RENAME dsview.desktop)
|
||||
|
||||
#===============================================================================
|
||||
#= Packaging (handled by CPack)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Version=0.96
|
||||
Exec=/usr/local/bin/DSView
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
Name=DSView
|
||||
Comment=GUI Program for DreamSourceLab USB-based Instruments
|
||||
Icon=/usr/local/share/DSView/logo.png
|
||||
Type=Application
|
||||
TryExec=DSView
|
||||
Exec=DSView
|
||||
Icon=dsview
|
||||
Terminal=false
|
||||
Categories=Development
|
||||
Categories=Development;Electronics;Qt;
|
||||
|
||||
16
INSTALL
16
INSTALL
@@ -48,12 +48,12 @@ Fedora (18, 19):
|
||||
python3-devel qt-devel boost-devel check libfftw3-devel
|
||||
|
||||
Arch:
|
||||
$ pacman -S base-devel git cmake glib2 libzip libusb check
|
||||
$ pacman -S base-devel git cmake glib2 libzip libusb check
|
||||
python boost qt5 fftw
|
||||
|
||||
|
||||
Step3: Building
|
||||
|
||||
|
||||
$ cd libsigrok4DSL
|
||||
$ ./autogen.sh
|
||||
$ ./configure
|
||||
@@ -72,11 +72,13 @@ Step3: Building
|
||||
$ cmake .
|
||||
|
||||
/*
|
||||
* If this step fails,
|
||||
* make sure that your pkg-config is properly configured
|
||||
* to find the libsigrok and libsigrokdecode libraries
|
||||
* (It's not by default in Fedora 23).
|
||||
* To do this add "export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
|
||||
* If this step fails,
|
||||
* make sure that your pkg-config is properly configured
|
||||
* to find the libsigrok and libsigrokdecode libraries
|
||||
* (It's not by default in Fedora 23).
|
||||
* To do this add "export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
|
||||
* or "export PKG_CONFIG_PATH=/usr/lib/pkgconfig"
|
||||
* or "export PKG_CONFIG_PATH=/usr/lib64/pkgconfig"
|
||||
* to your ~/.bashrc and reload it `. ~/.bashrc`.
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user