On Mon, Jun 20, 2016 at 8:47 PM, Lee Butler <[email protected]> wrote:

> I have a source tree which contains multiple directories each of which has
> a subdirectory called "xyz".  I want to create a target that creates a zip
> file with each of the xyz directories.  So if the source tree looks like
>   src
>   src/xyz
> src/application
> src/application/xyz
> src/plugins/one/xyz
>
> I want to end up with a zip file containing:
>    src/xyz/*
> src/application/xyz/*
> src/plugins/one/xyz/*
>
> On unix I could just generate the list of these directories with:
>   find src -type d -name test -print
> alas, I need a cross-platform way to do this.
>
> I tried:
>   file(GLOB_RECURSE XYZFILES "${CMAKE_SOURCE_DIR}/src/*xyz)
> and got nothing.
>
> At the moment, it looks like I cannot wildcard any portion of the
> directory path.  The following:
>   file(GLOB_RECURSE XYZFILES "${CMAKE_SOURCE_DIR}/src/*xyz*")
>

what about adding a backslash at end of expression ?
   file(GLOB_RECURSE XYZFILES "${CMAKE_SOURCE_DIR}/src/*xyz/")


seems to only produce files which have xyz in their name.
>
> Lee
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>



-- 
Regards,
   Rashad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to