Re: [AD] make cmake guess the CMAKE_INSTALL_PREFIX

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tuesday 23 September 2008, Peter Wang wrote:
> On 2008-09-23, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On Tuesday 23 September 2008, Peter Wang wrote:
> > > On 2008-09-23, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > > > Should we make cmake guess the CMAKE_INSTALL_PREFIX to go along with
> > > > guessing MINGDIR? I think it'd be really handy to set
> > > > CMAKE_INSTALL_PREFIX to MINGDIR instead of letting cmake pick
> > > > something like "C:\Program Files\ALLEGRO".
> > >
> > > It should be doing that already.
> > >
> > >     # ... detect MINGDIR here
> > >
> > >     # Install to MINGDIR
> > >     if(INSTALL_PREFIX STREQUAL "")
> > >         set(CMAKE_INSTALL_PREFIX ${MINGDIR})
> > >     else(INSTALL_PREFIX STREQUAL "")
> > >         set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX})
> > >     endif(INSTALL_PREFIX STREQUAL "")
> > >
> > > Peter
> >
> > Yeah, saw that, but for some reason it doesn't seem to be working. Which
> > is odd since it sets INSTALL_PREFIX to "" closer to the top of the file.
> > maybe cmake-gui sets some things it shouldn't?
>
> Tip for debugging: cut out the relevant sections of code into a test
> file, then run cmake -P testfile.  Use MESSAGE("${VAR}") to print.
>
> > And I think we should be setting a bunch of the non windows WANT_ options
> > to "off" or "no" or whatever if its building on win32.
>
> Ideally, I'd like us to move away from assuming that some libraries are
> only available on certain platforms.  There's no particular reason you
> shouldn't be able to build the X11 port on Windows (more likely, OS X),
> and the Direct3D driver on Unix (with Wine).  Of course, it would be a
> lot of work and we'll probably never get there.
>
> Configuration is much slower on Windows than on Linux so avoiding
> unnecessary checks could be worthwhile.  But WANT_X11, WANT_ALSA and
> WANT_OSS are the only options that I see that don't apply to Windows.
> We *could* avoid a few of the check_include_files, check_function_exists
> calls, but that seems to go against the whole point of checking for
> things at configuration time.

To be honest, I'm more concerned with the posix/bsd/libc functions that are 
detected that are pretty much guaranteed not to exist under mingw or msvc, 
ever. But add it all up and it could half the run time of cmake on initial run 
on mingw.

> Peter
>


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/