Forcing finding FreeGLUT instead of the system GLUT on MacOS

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

Forcing finding FreeGLUT instead of the system GLUT on MacOS

ardi
Hi,

I built and installed FreeGLUT in a custom location in my home
directory (Note: it's a custom location, but I also have pkg-config
installed on my PATH, and I did set it up so that when I do
'pkg-config --list-all' it successfully detects FreeGLUT in the
location where I installed it).

Now I'm trying to build a project that has find_package(GLUT REQUIRED)
and, as I would expect, it detects the system GLUT that comes standard
with MacOS. But for this particular build, I want it to find FreeGLUT
instead of the system GLUT. How can I force finding FreeGLUT?

Thanks a lot in advance,

ardi
--

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:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Forcing finding FreeGLUT instead of the system GLUT on MacOS

Alan W. Irwin-2
On 2019-05-02 15:10+0200 ardi wrote:

> Hi,
>
> I built and installed FreeGLUT in a custom location in my home
> directory (Note: it's a custom location, but I also have pkg-config
> installed on my PATH, and I did set it up so that when I do
> 'pkg-config --list-all' it successfully detects FreeGLUT in the
> location where I installed it).
>
> Now I'm trying to build a project that has find_package(GLUT REQUIRED)
> and, as I would expect, it detects the system GLUT that comes standard
> with MacOS. But for this particular build, I want it to find FreeGLUT
> instead of the system GLUT. How can I force finding FreeGLUT?
>
> Thanks a lot in advance,

Hi ardi:

In your cmake installation take a look at

$PREFIX/share/cmake-3.14/Modules/FindGLUT.cmake

where you will find no mention of PkgConfig, i.e., CMake does not
use pkg-config to find GLUT.  Instead, it uses native CMake find
methods which are documented at e.g., <https://cmake.org/cmake/help/latest/command/find_path.html>.
And if you look into that documentation you can find a number of
environment variables that control which GLUT installation location is found
such as CMAKE_PREFIX_PATH.

Hope that helps.

Alan

__________________________
Alan W. Irwin

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

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:
https://cmake.org/mailman/listinfo/cmake