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/")
|
|
|
|
add_lib(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
|
2017-12-05 15:14:57 +00:00
|
|
|
RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR}
|
|
|
|
ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR}
|
|
|
|
LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR}
|
2015-10-13 08:25:49 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES real.pl
|
|
|
|
DESTINATION ${libpl}
|
|
|
|
)
|
|
|
|
|
2017-10-17 00:13:09 +01:00
|
|
|
endif()
|