get everything building on OSX #195

This commit is contained in:
nick black 2021-07-12 17:53:24 -05:00 committed by nick black
parent 5015e39f16
commit 931fa8eb13
4 changed files with 13 additions and 1 deletions

View File

@ -510,6 +510,7 @@ target_include_directories(notcurses-info
include
"${CMAKE_REQUIRED_INCLUDES}"
"${PROJECT_BINARY_DIR}/include"
"${TERMINFO_INCLUDE_DIRS}"
)
target_link_libraries(notcurses-info
PRIVATE
@ -618,6 +619,7 @@ target_include_directories(notcurses-tester
"${CMAKE_REQUIRED_INCLUDES}"
"${PROJECT_BINARY_DIR}/include"
src/lib
"${TERMINFO_INCLUDE_DIRS}"
)
target_link_libraries(notcurses-tester
PRIVATE
@ -625,6 +627,10 @@ target_link_libraries(notcurses-tester
"${unistring}"
"${TERMINFO_LIBRARIES}"
)
target_link_directories(notcurses-tester
PRIVATE
"${TERMINFO_LIBRARY_DIRS}"
)
add_test(
NAME notcurses-tester
COMMAND notcurses-tester -p ${CMAKE_CURRENT_SOURCE_DIR}/data --abort-after=1

View File

@ -155,8 +155,12 @@ int input_dispatcher(struct notcurses* nc){
if(input_pipefds[0] >= 0){
return -1;
}
// freebsd doesn't have eventfd :/
// freebsd doesn't have eventfd :/ and apple doesn't even have pipe2() =[ =[
#ifdef __APPLE__
if(pipe(input_pipefds)){
#else
if(pipe2(input_pipefds, O_CLOEXEC | O_NONBLOCK)){
#endif
fprintf(stderr, "Error creating pipe (%s)\n", strerror(errno));
return -1;
}

View File

@ -1,6 +1,7 @@
#include <time.h>
#include <stdio.h>
#include <notcurses/notcurses.h>
#include "compat/compat.h"
// drag plane |t| across plane |n| at cell row |y|
static int

View File

@ -1,5 +1,6 @@
#include <stdlib.h>
#include <notcurses/notcurses.h>
#include "compat/compat.h"
#define GIG 1000000000ull
static const uint32_t LOWCOLOR = 0x004080;