Re: [CMake] CMAKE_CURRENT_SOURCE_DIR for modules

2008-10-01 Thread James Bigler
I filed a bug about this (http://public.kitware.com/Bug/view.php?id=7757), and Bill told me about CMAKE_CURRENT_LIST_FILE. CMAKE_CURRENT_LIST_FILE Full path to the listfile currently being processed. As CMake processes the listfiles in your project this

Re: [CMake] CMAKE_CURRENT_SOURCE_DIR for modules

2008-09-30 Thread James Bigler
That's what I tried first, however CMAKE_CURRENT_SOURCE_DIR points to where you called FIND_PACKAGE from and not from where the FindMyPackage.cmake lives. James On Mon, Sep 29, 2008 at 5:03 PM, Michael Jackson [EMAIL PROTECTED] wrote: include(${CMAKE_CURRENT_SOURCE_DIR}/extrastuff.cmake) Just

Re: [CMake] CMAKE_CURRENT_SOURCE_DIR for modules

2008-09-30 Thread James Bigler
Sure, but how can I do this from within FindMyPackage.cmake? Doing find_file(FindMyPackage.cmake PATHS ${CMAKE_MODULE_PATH}) seems less robust than having a true mechanism to discover the path of a file no matter where it was included from. James On Tue, Sep 30, 2008 at 7:24 AM, Michael Jackson

Re: [CMake] CMAKE_CURRENT_SOURCE_DIR for modules

2008-09-30 Thread Bill Hoffman
James Bigler wrote: Sure, but how can I do this from within FindMyPackage.cmake? Leave off the .cmake. include(extrastuff) should work if CMAKE_MODULE_PATH is set correctly. -Bill ___ CMake mailing list CMake@cmake.org

Re: [CMake] CMAKE_CURRENT_SOURCE_DIR for modules

2008-09-29 Thread Michael Jackson
include(${CMAKE_CURRENT_SOURCE_DIR}/extrastuff.cmake) Just guessing but it seems like it should work.. Mike On Sep 29, 2008, at 6:30 PM, James Bigler wrote: Is it possible to include a file that is local to a module? I want to do this: FIND_PACKAGE(MyPackage) MyPackage.cmake: