|
|
On 4/8/24 22:02 Gonzalo Garramuño wrote:
On 8/4/24 14:00, 'Albrecht Schlosser' via fltk.coredev wrote:
On 4/7/24 19:30 Gonzalo Garramulo wrote:
When building CMake's libjpeg, libpng,
etc. libraries with the system
path ones, would it be possible to print out the path to them
instead
of just "System".
Yup, done in commit 265e5cd77b30581e7701927930d8fa887e0361df.
Please report any issues with this commit here.
I sent it to the cloud (GitHub Actions). On Windows, with MSVC
2019, it did not pick them up. I go:
-- Image Libraries JPEG = System: LIB_jpeg-NOTFOUND
-- PNG = System: LIB_png-NOTFOUND
-- ZLIB = System: LIB_zlib-NOTFOUND
This shouldn't happen at all. If the libs are not found, then FLTK
should fall back to using the bundled libs. Maybe there's something
wrong with the search or the report. I'll check this.
The libraries are in my CMAKE_PREFIX_PATH, but with their windows
names:
$ cd install/lib
$ ls *png*
libpng16_static.lib
libpng:
libpng16.cmake libpng16-release.cmake
$ ls *zlib*
zlib.lib
$ ls *jpeg*
jpeg-static.lib turbojpeg-static.lib
Albrecht, you may need to use find_library( LIB_zlib NAMES z zlib
etc.. ) to detect their MSVC 2019 static and shared names. Look
at the Find*.cmake package files that ship with cmake.
Gonzalo, thanks for this report. I see what you mean but I can't
pursue this right now. Please open a GitHub Issue and report there
what you found and how you setup your build, e.g. CMAKE_PREFIX_PATH
and more (all relevant parameters, CMake variables etc.).
Questions regarding the library filenames you posted above:
1. How would we find the '*16*' versions of libpng? On Unix/Linux
systems there's usually a symbolic link from a non-versioned name to
the versioned name which we can use. In your case we can't guess.
2. It looks like you have two jpeg libs, 'jpeg-static.lib' and
'turbojpeg-static.lib'. According to their names these would be two
different static libs of 'libjpeg'. How could any build system
decide which one of these you *want* to use?
3. What are these two files 'libpng16.cmake' and
'libpng16-release.cmake' good for? According to their names they
don't look like CMake CONFIG files which should be named
PNGConfig.cmake or similar, AFAICT.
If you know anything about the "usual" (Windows) names of all these
libs then please report whatever can help to find the right libs.
However, what you wrote above doesn't look like something that could
(or should) be included in the search. For instance, both the
"turbo" and the "-static" part of 'turbojpeg-static.lib' look pretty
"random" (well, I know libturbojpeg, yes, but I hope you get what I
mean). There must be a better way to specify the libraries if you
have special needs. That's my gut feeling so far but I don't know of
a solution.
Anyway, I'll take a look at CMake's Find* modules to see what they
are doing. If these Find modules work we could probably use them
rather than just using find_library(...). Looking around ...
Hmm, for instance FindJPEG.cmake does NOT look for any name
including 'turbo':
$ egrep -i -B0 -A3 'turbo|static' /usr/share/cmake-3.25/Modules/FindJPEG.cmake
set(jpeg_names ${JPEG_NAMES} jpeg jpeg-static libjpeg libjpeg-static)
foreach(name ${jpeg_names})
list(APPEND jpeg_names_debug "${name}d")
endforeach()
Maybe they add wildcards later, I didn't check that yet, but anyway,
please open an issue, as written before, and add as much info as you
can.
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/332de094-d056-4d4f-885c-63787ab8c2b6%40aljus.de.
[ Direct Link to Message ] | |
|
| |