I think the correct way to do it is through the configure script. See for example the Cairo package that uses pkg-config. Configure scripts are slightly hard to work through in my experience, but are worth it if you need customization of the installation environment.
Travers On Mon, Apr 8, 2019 at 10:46 AM Sameh M. Abdulah <sameh.abdu...@kaust.edu.sa> wrote: > > I am using this command to set an environment variable ` > Sys.setenv(PKG_CONFIG_PATH=paste(Sys.getenv('PKG_CONFIG_PATH'),paste(.libPaths(),'my_package/lib/pkgconfig',sep='/',collapse=':'),sep=':'));’ > before install my package. It works fine if I run it before installing my > package. > > How can I do this inside my package so that CRAN can execute it by default. > > --Sameh > > [[alternative HTML version deleted]] > > ______________________________________________ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel