This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/real/CMakeLists.txt

61 lines
1.1 KiB
CMake
Raw Normal View History

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
# LIBR_FOUND
# LIBR_HOME
# LIBR_INCLUDE_DIRS
# LIBR_DOC_DIR
# LIBR_LIBRARIES
#
macro_optional_find_package (LibR ON)
2015-10-13 08:25:49 +01:00
2017-03-20 15:53:17 +00:00
macro_log_feature (LIBR_FOUND "R"
"Use R Environment"
"http://www.r.org" FALSE)
2015-10-13 08:25:49 +01:00
if (LIBR_FOUND)
2015-10-13 08:25:49 +01:00
set (REAL_SOURCES
real.c
)
2017-05-02 07:42:21 +01:00
set (REAL_PL
real.pl
)
add_to_group( pl_library REAL_PL )
2015-10-13 08:25:49 +01:00
include_directories (
${CMAKE_CURRENT_BINARY_DIR}
${LIBR_INCLUDE_DIRS}
2015-10-13 08:25:49 +01:00
)
set (CMAKE_REQUIRED_INCLUDES
${CMAKE_CURRENT_BINARY_DIR}
${LIBR_INCLUDE_DIRS}
2015-10-13 08:25:49 +01:00
)
add_library (real SHARED ${REAL_SOURCES})
2017-05-02 07:42:21 +01:00
target_link_libraries (real ${LIBR_LIBRARIES} libYap)
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 )
check_include_files( "R.h;Rembedded.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
RUNTIME DESTINATION ${dlls}
2016-01-20 22:36:52 +00:00
ARCHIVE DESTINATION ${dlls}
LIBRARY DESTINATION ${dlls}
2015-10-13 08:25:49 +01:00
)
install(FILES real.pl
DESTINATION ${libpl}
)
endif (LIBR_FOUND)