Mac debugging: provide a local FindX11.cmake?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Mac debugging: provide a local FindX11.cmake?

Randolph M. Fritz
I'm having problems find_package(X11) on Mac, and I'd like to provide a
local FindX11.cmake so I can try alternatives without altering my cmake
install.  Is there any easy way to do that?

--
Randolph M. Fritz • [hidden email]
Environmental Energy Technologies Division • Lawrence Berkeley Labs


--

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 | Threaded
Open this post in threaded view
|

Re: Mac debugging: provide a local FindX11.cmake?

Andreas Pakulat-2
Hi,

Am Donnerstag, 16. August 2012 schrieb Randolph M. Fritz :
I'm having problems find_package(X11) on Mac, and I'd like to provide a local FindX11.cmake so I can try alternatives without altering my cmake install.  Is there any easy way to do that?

You can simply set CMAKE_MODULE_PATH to a directory to get cmake to search that first for find-modules. The usual idiom is to have a cmake dir in the project and set the variable to that.

Andreas

--

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 | Threaded
Open this post in threaded view
|

Re: Mac debugging: provide a local FindX11.cmake?

Randolph M. Fritz
On 2012-08-16 19:23:34 +0000, Andreas Pakulat said:

> You can simply set CMAKE_MODULE_PATH to a directory to get cmake to
> search that first for find-modules. The usual idiom is to have a cmake
> dir in the project and set the variable to that.

Thanks, that helps a lot!

--
Randolph M. Fritz • [hidden email]
Environmental Energy Technologies Division • Lawrence Berkeley Labs


--

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 | Threaded
Open this post in threaded view
|

Re: Mac debugging: provide a local FindX11.cmake?

Randolph M. Fritz
In reply to this post by Andreas Pakulat-2
On 2012-08-16 19:23:34 +0000, Andreas Pakulat said:

> You can simply set CMAKE_MODULE_PATH to a directory to get cmake to
> search that first for find-modules. The usual idiom is to have a cmake
> dir in the project and set the variable to that.

So far, my attempts to set this are a dismal failure.

I added:
  set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeFiles")
to the top of CMakeLists.txt and, as far as I can tell, it's not doing
anything.  I can't see CMAKE_MODULE_PATH in the cache.  What am I
missing here?

--
Randolph M. Fritz • [hidden email]
Environmental Energy Technologies Division • Lawrence Berkeley Labs


--

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 | Threaded
Open this post in threaded view
|

Re: Mac debugging: provide a local FindX11.cmake?

Michael Jackson
set (CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeFiles")

Note: I would select another name besides "CMakeFiles". CMake actually uses this name for its own files in your build directory. I bet there are more than a few "Clean up CMake" scripts floating around the net that just look for that name and do deletions. Just Saying try something like Modules or CMModules. Just a kind warning...

--
Mike Jackson <www.bluequartz.net>

On Aug 16, 2012, at 4:27 PM, Randolph M. Fritz wrote:

> On 2012-08-16 19:23:34 +0000, Andreas Pakulat said:
>
>> You can simply set CMAKE_MODULE_PATH to a directory to get cmake to search that first for find-modules. The usual idiom is to have a cmake dir in the project and set the variable to that.
>
> So far, my attempts to set this are a dismal failure.
>
> I added:
> set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeFiles")
> to the top of CMakeLists.txt and, as far as I can tell, it's not doing anything.  I can't see CMAKE_MODULE_PATH in the cache.  What am I missing here?
>
> --
> Randolph M. Fritz • [hidden email]
> Environmental Energy Technologies Division • Lawrence Berkeley Labs
>
>
> --
>
> 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

--

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