1- # Copyright (C) 2009 - 2013 Dirk Eddelbuettel and Romain Francois
1+ # Copyright (C) 2009 - 2017 Dirk Eddelbuettel and Romain Francois
22#
33# This file is part of Rcpp.
44#
1515# You should have received a copy of the GNU General Public License
1616# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
1717
18- Rcpp.plugin.maker <- function (
19- include.before = " " ,
20- include.after = " " ,
21- LinkingTo = unique( c( package , " Rcpp" ) ),
22- Depends = unique( c( package , " Rcpp" ) ),
23- libs = " " ,
24- Makevars = NULL ,
25- Makevars.win = NULL ,
26- package = " Rcpp"
27- ){
28- function ( ... ){
29- includes <- sprintf( " %s
18+ Rcpp.plugin.maker <- function (include.before = " " ,
19+ include.after = " " ,
20+ LinkingTo = unique(c(package , " Rcpp" )),
21+ Depends = unique(c(package , " Rcpp" )),
22+ Imports = unique(c(package , " Rcpp" )),
23+ libs = " " ,
24+ Makevars = NULL ,
25+ Makevars.win = NULL ,
26+ package = " Rcpp" ) {
27+ function (... ) {
28+ includes <- sprintf(" %s
3029#include <Rcpp.h>
3130%s
3231
@@ -38,22 +37,20 @@ includes <- sprintf( "%s
3837#define END_RCPP
3938#endif
4039
41- using namespace Rcpp;
42- " , include.before , include.after )
40+ using namespace Rcpp;" , include.before , include.after )
4341
44- out <- list (
45- env = list ( PKG_LIBS = libs ),
46- includes = includes ,
47- LinkingTo = LinkingTo ,
48- body = function ( x ){
49- sprintf( " BEGIN_RCPP\n %s\n END_RCPP" , x )
50- },
51- Depends = Depends
52- )
53- if ( ! is.null(Makevars ) ) out $ Makevars <- Makevars
54- if ( ! is.null(Makevars.win ) ) out $ Makevars.win <- Makevars.win
42+ out <- list (env = list ( PKG_LIBS = libs ),
43+ includes = includes ,
44+ LinkingTo = LinkingTo ,
45+ body = function ( x ) {
46+ sprintf( " BEGIN_RCPP\n %s\n END_RCPP" , x )
47+ },
48+ Depends = Depends ,
49+ Imports = Imports )
50+ if (! is.null(Makevars )) out $ Makevars <- Makevars
51+ if (! is.null(Makevars.win )) out $ Makevars.win <- Makevars.win
5552 out
56- }
53+ }
5754}
5855
5956inlineCxxPlugin <- Rcpp.plugin.maker()
0 commit comments