Path to Octave plugins is taken from conf. program

This commit is contained in:
Roland Kaufmann 2013-03-26 23:39:55 +01:00
parent e7613fe9ee
commit f6dd430b87

View File

@ -104,4 +104,23 @@ else()
)
endif()
if (PRIVATE_INSTALL)
install(FILES ${OCTAVE_BINARY_OCT_FILES} DESTINATION ${RESINSIGHT_FINAL_NAME})
else (PRIVATE_INSTALL)
# probe for site location of .oct files
if (NOT OCTAVE_SITE_OCT_DIR)
find_program (OCTAVE_CONFIG_COMMAND
octave-config
DOC "Path to Octave component and library information retrieval"
)
exec_program (${OCTAVE_CONFIG_COMMAND}
ARGS --oct-site-dir
OUTPUT_VARIABLE OCTAVE_SITE_OCT_DIR
)
set (OCTAVE_SITE_OCT_DIR "${OCTAVE_SITE_OCT_DIR}" CACHE LOCATION "Octave plugin directory")
endif (NOT OCTAVE_SITE_OCT_DIR)
install (FILES ${OCTAVE_BINARY_OCT_FILES}
DESTINATION ${OCTAVE_SITE_OCT_DIR}
)
endif (PRIVATE_INSTALL)