2015-10-13 08:25:49 +01:00
|
|
|
|
2016-08-20 03:40:01 +01:00
|
|
|
# PROJECT ( YAP_REAL C )
|
2015-10-13 08:25:49 +01:00
|
|
|
|
2017-02-20 15:28:46 +00:00
|
|
|
|
2018-07-11 19:26:02 +01:00
|
|
|
|
2018-07-15 13:43:29 +01:00
|
|
|
set(REAL_SOURCES real.c)
|
|
|
|
|
2018-07-11 19:26:02 +01:00
|
|
|
# LIBR_FOUND
|
|
|
|
# LIBR_HOME
|
2018-07-15 13:43:29 +01:00
|
|
|
# LIBLIBR_INCLUDE_DIRSS
|
2018-07-11 19:26:02 +01:00
|
|
|
# LIBR_DOC_DIR
|
|
|
|
# LIBR_LIBRARIES
|
2018-05-22 12:23:52 +01:00
|
|
|
|
2018-07-15 13:43:29 +01:00
|
|
|
if (LIBR_LIBRARIES AND LIBR_INCLUDE_DIRS)
|
2018-05-20 18:40:56 +01:00
|
|
|
set_package_properties(R PROPERTIES
|
|
|
|
DESCRIPTION "The R Project for Statistical Computing."
|
2018-05-22 12:23:52 +01:00
|
|
|
|
|
|
|
URL "https://www.r-project.org/")
|
2019-01-09 09:32:09 +00:00
|
|
|
add_library(real ${REAL_SOURCES})
|
2018-07-15 13:43:29 +01:00
|
|
|
target_link_libraries (real ${LIBR_LIBRARIES} libYap)
|
2015-10-13 08:25:49 +01:00
|
|
|
include_directories (
|
2018-07-15 13:43:29 +01:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
${LIBR_INCLUDE_DIRS}
|
2015-10-13 08:25:49 +01:00
|
|
|
)
|
|
|
|
|
2017-12-13 16:56:10 +00:00
|
|
|
list (APPEND CMAKE_REQUIRED_INCLUDES
|
2018-07-15 13:43:29 +01:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
${LIBR_INCLUDE_DIRS}
|
2015-10-13 08:25:49 +01:00
|
|
|
)
|
|
|
|
|
2017-05-02 07:42:21 +01:00
|
|
|
check_include_files( "stdio.h;R.h" HAVE_R_H )
|
2018-07-15 13:43:29 +01:00
|
|
|
check_include_files( "R.h,;Rembeddred.h" HAVE_R_EMBEDDED_H )
|
2015-10-13 08:25:49 +01:00
|
|
|
check_include_files( "Rembedded.h;Rinterface.h" HAVE_R_INTERFACE_H )
|
|
|
|
|
|
|
|
configure_file ("rconfig.h.cmake" "rconfig.h" )
|
|
|
|
|
|
|
|
install(TARGETS real
|
2018-11-16 14:02:56 +00:00
|
|
|
RUNTIME DESTINATION ${YAP_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${YAP_INSTALL_LIBDIR}
|
|
|
|
LIBRARY DESTINATION ${YAP_INSTALL_LIBDIR}
|
2015-10-13 08:25:49 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES real.pl
|
2018-11-16 14:02:56 +00:00
|
|
|
DESTINATION ${YAP_INSTALL_DATADIR}
|
2015-10-13 08:25:49 +01:00
|
|
|
)
|
|
|
|
|
2017-10-17 00:13:09 +01:00
|
|
|
endif()
|