REMOVE_DUPLICATES(_symengine_include_dirs)
#
-# The SYMENGINE_LIBRARIES variable configured by SymEngine only lists the
-# libraries, but does not set their paths. So we configure this outselves.
+# Get the full path for the SYMENGINE_LIBRARIES. Some of these libraries are
+# CMake targets, so we can query them directly for this information.
#
FOREACH(SYMENGINE_LIBRARY_NAME ${SYMENGINE_LIBRARIES})
- DEAL_II_FIND_LIBRARY(SYMENGINE_LIBRARY
- NAMES ${SYMENGINE_LIBRARY_NAME}
- HINTS ${SYMENGINE_DIR}
- PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
- )
+ IF (TARGET ${SYMENGINE_LIBRARY_NAME})
+ GET_PROPERTY(SYMENGINE_LIBRARY TARGET ${SYMENGINE_LIBRARY_NAME} PROPERTY LOCATION)
+ ELSE ()
+ SET(SYMENGINE_LIBRARY ${SYMENGINE_LIBRARY_NAME})
+ ENDIF()
SET(_symengine_libraries ${_symengine_libraries} ${SYMENGINE_LIBRARY})
ENDFOREACH()