Switching to separate libsdrgui library for graphics

master
Paul Sutton 10 years ago
parent 578a697633
commit 4a0ffc67b0

@ -160,7 +160,6 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/common/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/srslte/include/) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/srslte/include/)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cuhd/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cuhd/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/mex/include) INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/mex/include)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/graphics/include)
######################################################################## ########################################################################
# Add the subdirectories # Add the subdirectories
@ -169,4 +168,3 @@ ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(cuhd) ADD_SUBDIRECTORY(cuhd)
ADD_SUBDIRECTORY(srslte) ADD_SUBDIRECTORY(srslte)
add_subdirectory(mex) add_subdirectory(mex)
ADD_SUBDIRECTORY(graphics)

@ -0,0 +1,40 @@
# - Try to find LIBSDRGUI
# Once done this will define
# LIBSDRGUI_FOUND - System has libsdrgui
# LIBSDRGUI_INCLUDE_DIRS - The libsdrgui include directories
# LIBSDRGUI_LIBRARIES - The libsdrgui library
find_package(PkgConfig)
pkg_check_modules(PC_LIBSDRGUI QUIET libsdrgui)
set(LIBSDRGUI_DEFINITIONS ${PC_LIBSDRGUI_CFLAGS_OTHER})
FIND_PATH(
LIBSDRGUI_INCLUDE_DIRS
NAMES libsdrgui/libsdrgui.h
HINTS ${PC_LIBSDRGUI_INCLUDEDIR}
${PC_LIBSDRGUI_INCLUDE_DIRS}
$ENV{LIBSDRGUI_DIR}/include
PATHS /usr/local/include
/usr/include
)
FIND_LIBRARY(
LIBSDRGUI_LIBRARIES
NAMES sdrgui
HINTS ${PC_LIBSDRGUI_LIBDIR}
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
$ENV{LIBSDRGUI_DIR}/lib
PATHS /usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
message(STATUS "LIBSDRGUI LIBRARIES " ${LIBSDRGUI_LIBRARIES})
message(STATUS "LIBSDRGUI INCLUDE DIRS " ${LIBSDRGUI_INCLUDE_DIRS})
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSDRGUI DEFAULT_MSG LIBSDRGUI_LIBRARIES LIBSDRGUI_INCLUDE_DIRS)
MARK_AS_ADVANCED(LIBSDRGUI_LIBRARIES LIBSDRGUI_INCLUDE_DIRS)

@ -38,6 +38,8 @@ ELSE(${DISABLE_VOLK})
FIND_PACKAGE(Volk) FIND_PACKAGE(Volk)
ENDIF(${DISABLE_VOLK}) ENDIF(${DISABLE_VOLK})
FIND_PACKAGE(LIBSDRGUI)
######################################################################## ########################################################################
# Recurse subdirectories and compile all source files into the same lib # Recurse subdirectories and compile all source files into the same lib
######################################################################## ########################################################################

@ -24,16 +24,15 @@
######################################################################## ########################################################################
LIST(FIND OPTIONAL_LIBS cuhd CUHD_FIND) LIST(FIND OPTIONAL_LIBS cuhd CUHD_FIND)
LIST(FIND OPTIONAL_LIBS graphics GRAPHICS_FIND)
IF(${CUHD_FIND} GREATER -1) IF(${CUHD_FIND} GREATER -1)
ADD_EXECUTABLE(pss_usrp pss_usrp.c) ADD_EXECUTABLE(pss_usrp pss_usrp.c)
TARGET_LINK_LIBRARIES(pss_usrp lte_phy cuhd) TARGET_LINK_LIBRARIES(pss_usrp lte_phy cuhd)
IF(${GRAPHICS_FIND} EQUAL -1) IF(LIBSDRGUI_FOUND)
SET_TARGET_PROPERTIES(pss_usrp PROPERTIES COMPILE_DEFINITIONS "DISABLE_GRAPHICS")
ELSE(${GRAPHICS_FIND} EQUAL -1)
target_link_libraries(pss_usrp graphics) target_link_libraries(pss_usrp graphics)
ENDIF(${GRAPHICS_FIND} EQUAL -1) ELSE(LIBSDRGUI_FOUND)
SET_TARGET_PROPERTIES(pss_usrp PROPERTIES COMPILE_DEFINITIONS "DISABLE_GRAPHICS")
ENDIF(LIBSDRGUI_FOUND)
ENDIF(${CUHD_FIND} GREATER -1) ENDIF(${CUHD_FIND} GREATER -1)

@ -335,7 +335,7 @@ extern cf_t *tmp2;
#ifndef DISABLE_GRAPHICS #ifndef DISABLE_GRAPHICS
#include "srslte/graphics/plot.h" #include "libsdrgui/libsdrgui.h"
plot_real_t pssout; plot_real_t pssout;
//plot_complex_t pce; //plot_complex_t pce;

Loading…
Cancel
Save