summaryrefslogtreecommitdiff
path: root/gr-utils/python
diff options
context:
space:
mode:
Diffstat (limited to 'gr-utils/python')
-rw-r--r--gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake9
1 files changed, 3 insertions, 6 deletions
diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake
index 9500fa0a4a..eee601a791 100644
--- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake
+++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake
@@ -43,12 +43,9 @@ function(GR_ADD_TEST test_name)
#we must manually set them in the PATH to run tests.
#The following appends the path of a target dependency.
foreach(target ${GR_TEST_TARGET_DEPS})
- get_target_property(location ${target} LOCATION)
- if(location)
- get_filename_component(path ${location} PATH)
- string(REGEX REPLACE "\\$\\(.*\\)" "${CMAKE_BUILD_TYPE}" path "${path}")
- list(APPEND GR_TEST_LIBRARY_DIRS ${path})
- endif(location)
+ get_filename_component(path $<TARGET_FILE:$target> PATH)
+ string(REGEX REPLACE "\\$\\(.*\\)" "${CMAKE_BUILD_TYPE}" path "${path}")
+ list(APPEND GR_TEST_LIBRARY_DIRS ${path})
endforeach(target)
if(WIN32)