Skip to content

Commit 91efe63

Browse files
committed
configure tweaks for MacOS/Windows
1 parent a4ae6b6 commit 91efe63

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

configure

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ else
4949
cd nng-$LIB_VER
5050
mkdir build
5151
cd build
52+
which cmake
53+
if [ $? -ne 0 ]; then
54+
export PATH=$PATH:/Applications/CMake.app/Contents/bin
55+
fi
5256
cmake -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -fPIC" -DNNG_TESTS=0 ..
5357
make
5458
cd ../..
@@ -82,6 +86,10 @@ if [ $? -ne 0 ]; then
8286
cd nng-$LIB_VER
8387
mkdir build
8488
cd build
89+
which cmake
90+
if [ $? -ne 0 ]; then
91+
export PATH=$PATH:/Applications/CMake.app/Contents/bin
92+
fi
8593
cmake -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -fPIC" -DNNG_TESTS=0 ..
8694
make
8795
cd ../..

src/Makevars.ucrt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
CRT=-ucrt
1+
CRT=_ucrt
22
include Makevars.win

src/Makevars.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RWINLIB = ../windows/nng-latest
1+
RWINLIB = ../windows/rwinlib-1.5.2
22

33
PKG_CFLAGS=-DNNG_STATIC_LIB -I${RWINLIB}/include $(C_VISIBILITY)
44
PKG_LIBS=-L${RWINLIB}/lib${R_ARCH}${CRT} -lnng -lws2_32

tools/winlibs.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# nanonext - Download precompiled libnng for Windows ---------------------------
22

3-
if (!file.exists("../windows/nng-latest/include/nng.h")) {
3+
if (!file.exists("../windows/rwinlib-1.5.2/include/nng.h")) {
44

55
if (getRversion() < "3.3.0") setInternet2()
6-
download.file("https://github.com/shikokuchuo/rwinlib/raw/main/nng-latest.zip", destfile = "nng-latest.zip", quiet = TRUE)
6+
download.file("https://github.com/shikokuchuo/rwinlib/archive/refs/tags/v1.5.2.zip", destfile = "nng-latest.zip", quiet = TRUE)
77
dir.create("../windows", showWarnings = FALSE)
88
unzip("nng-latest.zip", exdir = "../windows")
99
unlink("nng-latest.zip")

0 commit comments

Comments
 (0)