added ENABLE_GUI option

This commit is contained in:
Ismael Gomez 2017-05-31 22:18:07 +02:00
parent b7551111cb
commit 3327024c16
3 changed files with 9 additions and 8 deletions

View File

@ -53,6 +53,7 @@ configure_file(
option(STATIC_MKL "Statically link MKL libraries" OFF)
option(DISABLE_BLADERF "Disable BladeRF" OFF)
option(RPATH "Enable RPATH" OFF)
option(ENABLE_GUI "Enable GUI" ON)
set(GCC_ARCH native CACHE STRING "GCC compile for specific architecture.")
@ -143,12 +144,12 @@ endif(VOLK_FOUND)
if(ENABLE_GUI)
find_package(SRSGUI)
if(SRSGUI_FOUND)
add_definitions(-DENABLE_GUI)
include_directories(${SRSGUI_INCLUDE_DIRS})
link_directories(${SRSGUI_LIBRARY_DIRS})
endif(SRSGUI_FOUND)
find_package(SRSGUI)
if(SRSGUI_FOUND)
add_definitions(-DENABLE_GUI)
include_directories(${SRSGUI_INCLUDE_DIRS})
link_directories(${SRSGUI_LIBRARY_DIRS})
endif(SRSGUI_FOUND)
endif(ENABLE_GUI)

View File

@ -23,5 +23,5 @@ add_library(srsue_phy ${SOURCES})
target_link_libraries(srsue_phy ${SRSLTE_PHY_LIBRARY})
if(ENABLE_GUI AND SRSGUI_FOUND)
target_link_libraries(srsue_phy ${SRSGUI_LIBRARIES})
target_link_libraries(srsue_phy ${SRSGUI_LIBRARIES})
endif(ENABLE_GUI AND SRSGUI_FOUND)

View File

@ -287,7 +287,7 @@ void phch_worker::work_imp()
/* Tell the plotting thread to draw the plots */
#ifdef ENABLE_GUI
if (get_id() == plot_worker_id) {
if ((int) get_id() == plot_worker_id) {
sem_post(&plot_sem);
}
#endif