On 27.12.2017 21:39 Robin Rowe wrote:
>
>> Which fltk variant are you using, BTW?
>
> 1.3.4.
As Ian mentioned, FLTK's CMake support is not really complete in 1.3.4,
although I believe most of it works, so it _can_ work for you.
I'd suggest at least to try FLTK 1.4.0 (svn/git) to see if it works
better. See below.
> FYI, here's my FLTK.cmake, a work in progress...
I'm short in spare time now, so I'll take a look at it later.
>> FWIW, the cmake support is most nearly complete in fltk-1.4; it is
>> less complete (though probably "working") in fltk-1.3, for example.
>
> I've been using cmake to build fltk-1.3 for a long time. Reported a bug
> fix for building in VS2017.
Which one, and has it been fixed? (Note: I'm the one that currently does
most of the CMake work for FLTK, although most parts have been developed
by someone else).
>> The VS git shell doesn't seem to get all the correct paths set up, at
>> least for me.
>
> Yes, a known deficiency.
The CMake guys say you should "know" which libs are "always" available
in the VS IDE environment an rely on these w/o searching. The warnings
you showed in your first post can be ignored - at least in 1.4, I don't
know if I fixed it in 1.3 as well. The best thing you can do is to
trigger a CMake reconfigure from within the CMake IDE, for instance by
touching (rewriting w/o modifying) the main CMakeLists.txt and rebuild
target ZERO_CHECK. This should find all the three headers mentioned in
these warnings:
-- HAVE_GL_GL_H = 'HAVE_GL_GL_H-NOTFOUND'
-- HAVE_GL_GLU_H = 'HAVE_GL_GLU_H-NOTFOUND'
-- HAVE_LOCALE_H = 'HAVE_LOCALE_H-NOTFOUND'
>> On my machine, that's in... (VS IDE)->Tools->Visual Studio Command
>> Prompt.
>
> That doesn't exist in my VS IDE, that is, VS2017 Community Edition.
I don't have VS2017 Community Editition, but my VS2015 Community
Editition has it. In win10 you can easily find it by typing "dev" in the
windows search (windows key + "dev"). Maybe you didn't install the
complete VS environment?
> Does anyone know how to point my cmake file to tell FLTK where to find
> the OpenGL, Zlib, libpng and libjpeg libraries that I wish to use?
I'll try to give you better advice later, but for now I can only suggest
that you search for png, jpeg, and zlib (case insensitive) either via
command line - using MinGW I can see:
$ grep -i 'PNG\|ZLIB\|JPEG' CMakeCache.txt
HAVE_LIBPNG_PNG_H:FILEPATH=HAVE_LIBPNG_PNG_H-NOTFOUND
HAVE_PNG_H:FILEPATH=HAVE_PNG_H-NOTFOUND
LIB_jpeg:FILEPATH=LIB_jpeg-NOTFOUND
LIB_png:FILEPATH=LIB_png-NOTFOUND
LIB_zlib:FILEPATH=LIB_zlib-NOTFOUND
//use system libjpeg
OPTION_USE_SYSTEM_LIBJPEG:BOOL=OFF
//use system libpng
OPTION_USE_SYSTEM_LIBPNG:BOOL=OFF
//use system zlib
OPTION_USE_SYSTEM_ZLIB:BOOL=OFF
fltk_images_LIB_DEPENDS:STATIC=general;fltk;general;fltk_jpeg;general;fltk_z;general;fltk_png;
fltk_jpeg_LIB_DEPENDS:STATIC=
fltk_png_LIB_DEPENDS:STATIC=general;fltk_z;
//ADVANCED property for variable: HAVE_LIBPNG_PNG_H
HAVE_LIBPNG_PNG_H-ADVANCED:INTERNAL=1
//ADVANCED property for variable: HAVE_PNG_H
HAVE_PNG_H-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LIB_jpeg
LIB_jpeg-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LIB_png
LIB_png-ADVANCED:INTERNAL=1
//ADVANCED property for variable: LIB_zlib
LIB_zlib-ADVANCED:INTERNAL=1
If you use the CMake GUI, don't forget to mark the "Advanced" option.
Then you can set the particular variables either via GUI or via command
line. You _may_ need to set the 'OPTION_USE_SYSTEM_LIB*:BOOL' variables
ON to make it work, but I'm not sure.
ISTR that I did this with self-built libs for Linux (maybe also for
Windows), but I can't find it right now. I'll try later.
I'm sorry I can't help further right now. In the future we should
probably add options to point directly at external (non-system)
libraries to use in the build, but that's not available now.
If you find a solution meanwhile, please post it here.