mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
get everything building on OSX #195
This commit is contained in:
parent
5015e39f16
commit
931fa8eb13
@ -510,6 +510,7 @@ target_include_directories(notcurses-info
|
|||||||
include
|
include
|
||||||
"${CMAKE_REQUIRED_INCLUDES}"
|
"${CMAKE_REQUIRED_INCLUDES}"
|
||||||
"${PROJECT_BINARY_DIR}/include"
|
"${PROJECT_BINARY_DIR}/include"
|
||||||
|
"${TERMINFO_INCLUDE_DIRS}"
|
||||||
)
|
)
|
||||||
target_link_libraries(notcurses-info
|
target_link_libraries(notcurses-info
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@ -618,6 +619,7 @@ target_include_directories(notcurses-tester
|
|||||||
"${CMAKE_REQUIRED_INCLUDES}"
|
"${CMAKE_REQUIRED_INCLUDES}"
|
||||||
"${PROJECT_BINARY_DIR}/include"
|
"${PROJECT_BINARY_DIR}/include"
|
||||||
src/lib
|
src/lib
|
||||||
|
"${TERMINFO_INCLUDE_DIRS}"
|
||||||
)
|
)
|
||||||
target_link_libraries(notcurses-tester
|
target_link_libraries(notcurses-tester
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@ -625,6 +627,10 @@ target_link_libraries(notcurses-tester
|
|||||||
"${unistring}"
|
"${unistring}"
|
||||||
"${TERMINFO_LIBRARIES}"
|
"${TERMINFO_LIBRARIES}"
|
||||||
)
|
)
|
||||||
|
target_link_directories(notcurses-tester
|
||||||
|
PRIVATE
|
||||||
|
"${TERMINFO_LIBRARY_DIRS}"
|
||||||
|
)
|
||||||
add_test(
|
add_test(
|
||||||
NAME notcurses-tester
|
NAME notcurses-tester
|
||||||
COMMAND notcurses-tester -p ${CMAKE_CURRENT_SOURCE_DIR}/data --abort-after=1
|
COMMAND notcurses-tester -p ${CMAKE_CURRENT_SOURCE_DIR}/data --abort-after=1
|
||||||
|
@ -155,8 +155,12 @@ int input_dispatcher(struct notcurses* nc){
|
|||||||
if(input_pipefds[0] >= 0){
|
if(input_pipefds[0] >= 0){
|
||||||
return -1;
|
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)){
|
if(pipe2(input_pipefds, O_CLOEXEC | O_NONBLOCK)){
|
||||||
|
#endif
|
||||||
fprintf(stderr, "Error creating pipe (%s)\n", strerror(errno));
|
fprintf(stderr, "Error creating pipe (%s)\n", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <notcurses/notcurses.h>
|
#include <notcurses/notcurses.h>
|
||||||
|
#include "compat/compat.h"
|
||||||
|
|
||||||
// drag plane |t| across plane |n| at cell row |y|
|
// drag plane |t| across plane |n| at cell row |y|
|
||||||
static int
|
static int
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <notcurses/notcurses.h>
|
#include <notcurses/notcurses.h>
|
||||||
|
#include "compat/compat.h"
|
||||||
|
|
||||||
#define GIG 1000000000ull
|
#define GIG 1000000000ull
|
||||||
static const uint32_t LOWCOLOR = 0x004080;
|
static const uint32_t LOWCOLOR = 0x004080;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user