Fix CMAKE set

Fix CMAKE set Curses to Ncurses, need wide true
This commit is contained in:
lwvmobile 2022-02-21 13:11:07 -05:00 committed by GitHub
parent a239cd94fe
commit c917c61b85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 31 deletions

View File

@ -2,6 +2,9 @@ project(dsd)
cmake_minimum_required(VERSION 2.8.11)
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
#Set curses to ncurses, and wide true for ascii
set(CURSES_NEED_NCURSES TRUE)
set(CURSES_NEED_WIDE TRUE)
include(git_revision)
git_describe(GIT_TAG)
@ -11,42 +14,12 @@ find_package(MBE REQUIRED)
find_package(ITPP REQUIRED)
#find_package(LibPortAudio) #disabled for testing
find_package(RTLSDR)
#more messing around
#find_package(Curses)
find_package(Curses REQUIRED) #making this required until I can fix all instances of it being called to ifdef lines
find_package(Curses REQUIRED)
find_package(PULSEAUDIO)
set(CURSES_NEED_WIDE TRUE) #not quite sure where to put this
#include_directories(SYSTEM ${LIBSNDFILE_INCLUDE_DIR} ${MBE_INCLUDE_DIR} ${ITPP_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIRS} ${CURSES_INCLUDE_DIR})
#set(LIBS ${MBE_LIBRARY} ${LIBSNDFILE_LIBRARY} ${ITPP_LIBRARY} ${PULSEAUDIO_SIMPLE_LIBRARY} ${CURSES_LIBRARY})
#remove CURSES from 'required' set up top AFTER switching all commands to ifdef in dsd_main, dsd_framesync, and dsd_ncurses.c
#also, figure out how to make it build for wide character support in Linux Mint etc, like this -- $(ncursesw5-config --cflags --libs)
include_directories(SYSTEM ${LIBSNDFILE_INCLUDE_DIR} ${MBE_INCLUDE_DIR} ${ITPP_INCLUDE_DIR} ${PULSEAUDIO_INCLUDE_DIRS} ${CURSES_INCLUDE_DIR})
set(LIBS ${MBE_LIBRARY} ${LIBSNDFILE_LIBRARY} ${ITPP_LIBRARY} ${PULSEAUDIO_SIMPLE_LIBRARY} ${CURSES_LIBRARY})
#if(Curses_FOUND)
# set(CURSES_NEED_WIDE TRUE)
# include_directories(SYSTEM ${CURSES_INCLUDE_PATH})
# list(APPEND LIBS ${CURSES_LIBRARY})
# add_definitions(-DUSE_CURSES)
#endif(Curses_FOUND)
#going to disable PortAudio, works just fine with padsp in Linux,
#hoping disabling this doesn't break OSX or cygwin, etc builds
#if(PORTAUDIO_FOUND)
# include_directories(SYSTEM ${PORTAUDIO_INCLUDE_DIRS})
# list(APPEND LIBS ${PORTAUDIO_LIBRARIES})
# add_definitions(-DUSE_PORTAUDIO)
#endif(PORTAUDIO_FOUND)
#if(PULSEAUDIO_FOUND) ##I don't think this will be necessary
# include_directories(SYSTEM ${PULSEAUDIO_INCLUDE_DIRS})
# list(APPEND LIBS ${PULSEAUDIO_LIBRARIES})
# add_definitions(-DUSE_PULSEAUDIO)
#endif(PULSEAUDIO_FOUND)
if(RTLSDR_FOUND)
find_package(Threads)
include_directories(SYSTEM ${RTLSDR_INCLUDE_DIRS})