Commit 82de207e authored by Stefan Gerlach's avatar Stefan Gerlach
Browse files

Fix detecting R

parent 52522795
Pipeline #62930 passed with stage
in 25 minutes and 8 seconds
......@@ -11,7 +11,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
project(cantor VERSION ${RELEASE_SERVICE_VERSION})
set(KF5_MIN_VERSION "5.71.0")
set(KF5_MIN_VERSION "5.70.0")
find_package(ECM 5.15.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${cantor_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
......
......@@ -8,7 +8,7 @@
# R_LIBRARIES - Link these to use R
# find the R binary
FIND_PROGRAM(R_EXECUTABLE R)
FIND_PROGRAM(R_EXECUTABLE NAMES R R.bat)
SET(ABORT_CONFIG FALSE)
IF(R_EXECUTABLE)
......@@ -43,13 +43,20 @@ IF(R_EXECUTABLE)
FIND_PATH(R_INCLUDE_DIR R.h)
# check for existence of libR.so
# check for existence of libR.so/R.dll
IF(WIN32)
# remove R.bat header from R_HOME
STRING(REGEX REPLACE ".*\n" "" R_HOME "${R_HOME}")
# search for correct exe in R_HOME (R.bat is not working)
unset(R_EXECUTABLE CACHE)
FIND_PROGRAM(R_EXECUTABLE R HINTS ${R_HOME}/bin ${R_HOME}/bin/x64)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
ENDIF()
FIND_LIBRARY(R_R_LIBRARY
R
HINTS ${R_HOME}/lib ${R_SHARED_LIB_DIR} ${R_HOME}/bin )
FIND_LIBRARY(R_R_LIBRARY R
HINTS ${R_HOME}/lib ${R_SHARED_LIB_DIR} ${R_HOME}/bin ${R_HOME}/bin/x64)
IF(NOT R_R_LIBRARY)
MESSAGE(STATUS "libR not found. Make sure the location of R was detected correctly, above, and R was compiled with the --enable-shlib option")
MESSAGE(STATUS "libR/R.dll not found. Make sure the location of R was detected correctly, above, and R was compiled with the --enable-shlib option")
ELSE(NOT R_R_LIBRARY)
GET_FILENAME_COMPONENT(R_SHARED_LIB_DIR ${R_R_LIBRARY}
PATH)
......
......@@ -29,16 +29,16 @@ if(Analitza5_FOUND)
endif(Analitza5_FOUND)
if(NOT WIN32)
set_package_properties(R PROPERTIES DESCRIPTION "A free software environment for statistical computing and graphics."
URL "https://www.r-project.org/"
TYPE OPTIONAL
PURPOSE "Backend to use R with Cantor.")
find_package(R)
if(R_FOUND)
add_subdirectory(R)
endif(R_FOUND)
endif(NOT WIN32)
set_package_properties(R PROPERTIES DESCRIPTION "A free software environment for statistical computing and graphics."
URL "https://www.r-project.org/"
TYPE OPTIONAL
PURPOSE "Backend to use R with Cantor.")
find_package(R)
if(R_FOUND)
add_subdirectory(R)
endif(R_FOUND)
endif()
set_package_properties(Qalculate PROPERTIES DESCRIPTION "A multi-purpose desktop calculator with support for customizable functions, units and arbitrary precision."
URL "https://qalculate.github.io/"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment