hark! a vagrant! get windows library linking

This commit is contained in:
nick black 2021-07-22 23:03:15 -04:00
parent e5d77037dc
commit 1e2f3252bd
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 4 additions and 4 deletions

View File

@ -83,11 +83,11 @@ set_package_properties(Threads PROPERTIES TYPE REQUIRED)
find_package(ZLIB)
set_package_properties(ZLIB PROPERTIES TYPE REQUIRED)
# platform-specific logics
if(NOT MSYS AND NOT APPLE)
if(MSYS OR WIN32)
set(LIBRT_LIBRARIES wsock32 ws2_32)
elseif(NOT APPLE)
find_library(LIBM m REQUIRED)
find_library(LIBRT rt REQUIRED)
elseif(MSYS)
find_library(LIBRT ws2_32 REQUIRED)
endif()
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
include_directories(/usr/local/include)

View File

@ -8,7 +8,7 @@ interp(struct notcurses* nc, int cellpixy, int cellpixx){
size_t rands = cellpixy * cellpixx * 3;
unsigned char* randrgb = malloc(rands);
for(size_t r = 0 ; r < rands ; ++r){
randrgb[r] = random() % 256;
randrgb[r] = rand() % 256;
}
struct ncvisual* ncv = ncvisual_from_rgb_packed(randrgb, cellpixy, cellpixx * 3, cellpixx, 0xff);
if(ncv == NULL){