On Wed, Nov 24, 2010 at 6:57 AM, Rolf Eike Beer <e...@sf-mail.de> wrote: >> In KDE we have a macro MACRO_WRITE_BASIC_CMAKE_VERSION_FILE() which helps >> with >> creating a basic version-info file which should be installed along with >> the >> Config-file. >> It consists of MacroWriteBasicCMakeVersionFile.cmake and >> BasicFindPackageVersion.cmake.in which you can find in >> http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/ . > > I wonder why you use > > get_filename_component(_currentListFileDir ${CMAKE_CURRENT_LIST_FILE} PATH) > > in there instead of CMAKE_CURRENT_LIST_DIR. > > Eike > _______________________________________________ > 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 >
Probably because CMAKE_CURRENT_LIST_DIR was just invented and is only in CMake 2.8.3... get_filename_component works with several versions of CMake, and does not require 2.8.3 or later. _______________________________________________ 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