Added missing if(R_FOUND).
@@ -767,6 +767,7 @@ if(TINYSPLINE_CXX_AVAILABLE AND TARGET_SUPPORTS_SHARED_LIBS)
# R
if(TINYSPLINE_WITH_R)
find_package(R COMPONENTS Rcpp)
+ if(R_FOUND)
include_directories(${R_INCLUDE_DIRS})
set_source_files_properties(tinyspliner.i PROPERTIES CPLUSPLUS ON)
set(CMAKE_SWIG_FLAGS -O ${TINYSPLINE_ADDITIONAL_SWIG_DEFINES})
@@ -786,6 +787,7 @@ if(TINYSPLINE_CXX_AVAILABLE AND TARGET_SUPPORTS_SHARED_LIBS)
COMPILE_FLAGS "${TINYSPLINE_BINDING_CXX_FLAGS}"
)
endif()
+ endif()
endif(SWIG_FOUND)
endif()
