diff options
author | wsoltys <wiso@no.way> | 2013-08-11 17:32:59 +0200 |
---|---|---|
committer | spiff <spiff@xbmc.org> | 2013-08-20 20:20:22 +0200 |
commit | ca8d38faa00fea05549de64d72bb56ee7a728ade (patch) | |
tree | f7bc47f2645557241019aecbeba1b4da30a2d042 /project/cmake | |
parent | 7d6be1e3cc56a467524e64f659f520194be050fe (diff) |
[WIN32] added xbmc_find_path to find paths recursively
Diffstat (limited to 'project/cmake')
-rw-r--r-- | project/cmake/xbmc-addon-helpers.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/project/cmake/xbmc-addon-helpers.cmake b/project/cmake/xbmc-addon-helpers.cmake index d25fe1eb6b..87a60fa152 100644 --- a/project/cmake/xbmc-addon-helpers.cmake +++ b/project/cmake/xbmc-addon-helpers.cmake @@ -82,3 +82,12 @@ macro (build_addon target prefix libs) INSTALL(DIRECTORY ${target} DESTINATION share/xbmc/addons) ENDIF(PACKAGE_ZIP OR PACKAGE_TGZ) endmacro() + +# finds a path to a given file (recursive) +function (xbmc_find_path var_name filename search_path strip_file) + file(GLOB_RECURSE PATH_TO_FILE ${search_path} ${filename}) + if(strip_file) + string(REPLACE ${filename} "" PATH_TO_FILE ${PATH_TO_FILE}) + endif(strip_file) + set (${var_name} ${PATH_TO_FILE} PARENT_SCOPE) +endfunction() |