summaryrefslogtreecommitdiffstats
path: root/Modules/FindOctave.cmake
diff options
context:
space:
mode:
authorPeter Stroia-Williams <peterdwilliams@gmail.com>2019-02-07 13:21:57 (GMT)
committerPeter Stroia-Williams <Peter.Stroia-Williams@PGS.com>2019-02-08 20:34:30 (GMT)
commit6725975bd8c47c7817a286ada9eadb9b0fbf324c (patch)
tree6698f158ce79052c1644645d3c46bf20766c5355 /Modules/FindOctave.cmake
parent1e2e12889b3550713cfcb86a9367c3046a6f56e9 (diff)
downloadCMake-6725975bd8c47c7817a286ada9eadb9b0fbf324c.zip
CMake-6725975bd8c47c7817a286ada9eadb9b0fbf324c.tar.gz
CMake-6725975bd8c47c7817a286ada9eadb9b0fbf324c.tar.bz2
FindOctave: Add target for octinterp
This change adds the Octave::Octinterp target to make the octinterp library available without users having to resort to using the Octave_INTERP_LIBRARY variable.
Diffstat (limited to 'Modules/FindOctave.cmake')
-rw-r--r--Modules/FindOctave.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/Modules/FindOctave.cmake b/Modules/FindOctave.cmake
index 8ae6a47..8110ff1 100644
--- a/Modules/FindOctave.cmake
+++ b/Modules/FindOctave.cmake
@@ -15,7 +15,10 @@ This module defines the following :prop_tgt:`IMPORTED` targets:
``Octave::Interpreter``
Octave interpreter (the main program)
``Octave::Octave``
- include directories and libraries
+ include directories and the octave library
+``Octave::Octinterp``
+ include directories and the octinterp library including the dependency on
+ Octave::Octave
If no ``COMPONENTS`` are specified, ``Interpreter`` is assumed.
@@ -144,6 +147,15 @@ if(Octave_Development_FOUND)
)
endif()
+ if(NOT TARGET Octave::Octinterp)
+ add_library(Octave::Octinterp UNKNOWN IMPORTED)
+ set_target_properties(Octave::Octinterp PROPERTIES
+ IMPORTED_LOCATION ${Octave_INTERP_LIBRARY}
+ INTERFACE_INCLUDE_DIRECTORIES ${Octave_INCLUDE_DIR})
+ target_link_libraries(Octave::Octinterp INTERFACE
+ Octave::Octave)
+ endif()
+
endif()