Re: CMake 4
JVZ <[email protected]> Sat, 27 Dec 2025 11:38:40 -0600
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Organization | FOX-Toolkit |
| Message-ID | <20251227113840.008980cf@resurgam> |
On Sat, 27 Dec 2025 08:54:30 -0600 Sander Jansen <[email protected]> wrote: >I've updated my CMake project files for FOX to a minimum version of 4.0 as >the 3.xx releases are now considered legacy. Currently updated to 1.7.86. > >The new version is much better organized and also installs CMake config >files, which makes integration into other CMake projects a lot easier (just >import the FOX target). Out of tree builds are now properly supported. In >addition projects can also link directly to the build tree for testing >purposes without having to install FOX. > >This new version also enables PCH which basically halves the compile time >for FOX. > >I was able to cross compile FOX using MinGW quite easily and was even able >to run it under Wine without a hitch. I have not tested it under native >Windows yet, but I'm planning to see whether I can use CMake's FetchContent >to automatically fetch and compile basic dependencies like jpeg and zlib, >as Windows lacks package management like we do on Linux > >I did find an oddity in regards to the jpeg2000 support in FOX, as it >seemingly requires both HAVE_JP2_H and HAVE_J2K_H to be defined. The latter >appears to be used in the FXJP2{Icon/Image}, while the former is used in >the actual io. > >Another remaining issue is the few left over FXAPI decorators in the >glviewer app which breaks builds on Windows due to dlexport/ dlimport >mix-up. Those should be removed. > >The repo for CMake can be found here: >https://github.com/gogglesguy/fox/tree/cmake > >I'm in the progress of updating gogglesmm to use this as a submodule here: >https://github.com/gogglesmm/gogglesmm/tree/cmake4 > >Cheers, > >Sander This sounds good. Switching to cmake has been on the to-do list for a while and if your cmake configs look good it will become the official build system soon. For windows support w/o VC++, perhaps you can look into MSYS2? MSYS2 has [and you'll like this] the Arch package system; once you have a core MSYS2 installed, you can pacman -S <pkg> and pacman -Syu to update the whole enchilada. Besides, MSYS2 also has a alternative C-runtime libraries. Both GCC and clang are available, even ARM target support is in there.. For other projects, I've been using cmake for a bit, and VC++ CE 2019 which I'm using has cmake-generator to flesh out VC++ project files; this is a huge part of my motivation to switch to CMAKE as updating the stupid proect files "by hand" is going to be a thing of the past. -- JVZ -- +----------------------------------------------------------------------------+ | Copyright (C) 11:20 12/27/2025 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+