2010/7/28 Clifford Yapp <cliffy...@gmail.com>:
> Ironically, I now see this issue (almost exactly) was discussed long ago:
>
> http://www.cmake.org/pipermail/cmake/2005-September/007204.html
>
> However, when I try:
>
> get_directory_property(PNG_LIB_NAME DIRECTORY src/other/libpng
> DEFINITION PNG_LIB_NAME)
> MESSAGE("getdirprop: ${PNG_LIB_NAME}")
>
> I get nothing - anybody have a worked example using this feature?

I must admit I did not read your previous mail entirely but
did you notice that:

get_directory_property
       Get a property of DIRECTORY scope.
 [...]
      The specified directory must have already been
       traversed by CMake.

That is if the parent is retrieving daugther directory property BEFORE
the daughter was traversed then you won't get anything.

As far as I understand "add_subdirectory" doc, the subdirectory are traversed
"in-depth" first since
"The CMakeLists.txt file in the specified source
       directory will be processed immediately by CMake before processing in
       the current input file continues beyond this command."

so if want to get_directory_property from a daughter dir then you
ensure that add_subdirectory to the target dir appear before
get_directory_property.

Is it the case in your example?

Do you have a small example which exhibit the "get_directory_property" issue?
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to