File grantlee-5.2.0-fix-ctest-ld-library-path.patch of Package grantlee5

From: Matthias Fehring <buschmann23@opensuse.org>
Date: 2019-12-19 14:39:00 +0100
Subject: fix ctest not finding libraries
Upstream: no

As rpath is skipped, the libraries can not be found
by the tests.

---
 templates/tests/CMakeLists.txt    |    1 +
 textdocument/tests/CMakeLists.txt |    1 +
 2 files changed, 2 insertions(+)

--- a/textdocument/tests/CMakeLists.txt	2019-12-18 20:57:28.000000000 +0100
+++ b/textdocument/tests/CMakeLists.txt	2019-12-19 14:19:32.712757537 +0100
@@ -14,6 +14,7 @@
     add_test(${_testname} ${_testname}_exec )
     target_link_libraries(${_testname}_exec Grantlee::TextDocument textdocument_test_builtins)
     set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" )
+    set_property(TEST ${_testname} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/textdocument/lib")
   endforeach(_testname)
 endmacro(GRANTLEE_TEXTDOCUMENT_UNIT_TESTS)

--- a/templates/tests/CMakeLists.txt	2019-12-18 20:57:28.000000000 +0100
+++ b/templates/tests/CMakeLists.txt	2019-12-19 14:17:42.057605600 +0100
@@ -68,6 +68,7 @@
     endif()

     set_property(GLOBAL APPEND PROPERTY TEST_COVERAGE "${CMAKE_CURRENT_BINARY_DIR}/${_testname}_exec" )
+    set_property(TEST ${_testname} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/templates/lib:${CMAKE_BINARY_DIR}/grantlee")
   endforeach(_testname)
 endmacro()