blob: ea43763821c087f78cc5b45e3f2b866482c36ee8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
diff --git a/Wrapping/R/CMakeLists.txt b/Wrapping/R/CMakeLists.txt
index 87753ad..4740cf2 100644
--- a/Wrapping/R/CMakeLists.txt
+++ b/Wrapping/R/CMakeLists.txt
@@ -91,6 +91,6 @@ add_custom_command( TARGET ${SWIG_MODULE_SimpleITK_TARGET_NAME}
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/R_libs
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/SimpleITK.R ${CMAKE_CURRENT_BINARY_DIR}/Packaging/SimpleITK/R/
# install for running tests and create binary package
- COMMAND ${R_COMMAND} CMD INSTALL --build ${CMAKE_CURRENT_BINARY_DIR}/Packaging/SimpleITK --library=${CMAKE_CURRENT_BINARY_DIR}/R_libs
+ COMMAND ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib" ${R_COMMAND} CMD INSTALL --build ${CMAKE_CURRENT_BINARY_DIR}/Packaging/SimpleITK --library=${CMAKE_CURRENT_BINARY_DIR}/R_libs
COMMENT "Installing R package for testing and building binary version for distribution"
)
diff --git a/Wrapping/R/SimpleITK.i b/Wrapping/R/SimpleITK.i
index b6688db..e034959 100644
--- a/Wrapping/R/SimpleITK.i
+++ b/Wrapping/R/SimpleITK.i
@@ -1,3 +1,9 @@
+%begin %{
+#define NO_C_HEADERS
+#include <cstdio>
+#include <cstddef>
+%}
+
%include SimpleITK_Common.i
%include "sitkRCommand.h"
|