[rkward-cvs] SF.net SVN: rkward:[4044] trunk/rkward/rkward/rbackend/FindR.cmake
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue Nov 22 19:24:12 UTC 2011
Revision: 4044
http://rkward.svn.sourceforge.net/rkward/?rev=4044&view=rev
Author: tfry
Date: 2011-11-22 19:24:12 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
EXPERIMENTAL: Better support for arch-specific paths on Windows and Mac
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/FindR.cmake
Modified: trunk/rkward/rkward/rbackend/FindR.cmake
===================================================================
--- trunk/rkward/rkward/rbackend/FindR.cmake 2011-11-22 15:54:13 UTC (rev 4043)
+++ trunk/rkward/rkward/rbackend/FindR.cmake 2011-11-22 19:24:12 UTC (rev 4044)
@@ -12,6 +12,12 @@
MESSAGE(STATUS "Using R at ${R_EXECUTABLE}")
ENDIF(R_EXECUTABLE-NOTFOUND)
+# find out about R architecture (needed for some paths)
+EXECUTE_PROCESS(
+ COMMAND ${R_EXECUTABLE} "--slave" "--no-save" "-e" "cat(R.version$arch)"
+ OUTPUT_VARIABLE R_ARCH)
+MESSAGE (STATUS "R architecture is ${R_ARCH}")
+
# find R_HOME
MESSAGE(STATUS "Looking for R_HOME")
@@ -46,7 +52,7 @@
ENDIF(NOT R_INCLUDEDIR)
IF(NOT R_INCLUDEDIR)
- SET(R_INCLUDEDIR ${R_HOME}/include)
+ SET(R_INCLUDEDIR ${R_HOME}/include ${R_HOME}/include/${R_ARCH})
MESSAGE(STATUS "Not findable via R. Guessing")
ENDIF(NOT R_INCLUDEDIR)
MESSAGE(STATUS "Include files should be at ${R_INCLUDEDIR}. Checking for R.h")
@@ -68,7 +74,7 @@
MESSAGE(STATUS "Checking for existence of R shared library")
FIND_LIBRARY(LIBR_SO
R
- PATHS ${R_HOME}/lib ${R_SHAREDLIBDIR} ${R_HOME}/bin ${R_HOME}/bin/i386
+ PATHS ${R_HOME}/lib ${R_SHAREDLIBDIR} ${R_HOME}/bin ${R_HOME}/bin/${R_ARCH}
NO_DEFAULT_PATH)
IF(NOT LIBR_SO)
MESSAGE(FATAL_ERROR "Not found. Make sure the location of R was detected correctly, above, and R was compiled with the --enable-R-shlib option")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list