mkdir test && pushd test
make -G "NMake Makefiles" -D
CMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /Ob2
/D NDEBUG" -DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /D NDEBUG" ..
nmake all
:
: Colorful percentage output crawl similar to what we see with
unix 'make'
:
```
cmake -S fltk -B fltk/build -A x64 -D OPTION_USE_SYSTEM_LIBJPEG=Off -D OPTION_USE_SYSTEM_ZLIB=Off -D OPTION_USE_SYSTEM_LIBPNG=Off -D CMAKE_BUILD_TYPE=Release
cmake --build fltk/build --config Release
```
This seems to work for building FLTK with VS purely from the command line,
without the VS IDE GUI ever being involved at all:
mkdir test && pushd test
cmake -G "NMake Makefiles" -D CMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /Ob2 /D NDEBUG" -DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /D NDEBUG" ..
nmake all
:
: Colorful percentage output crawl similar to what we see with unix 'make'
:
This seemed to work for me building FLTK on Windows 10 using the
"x64 Native Tools Command Line" with VS 2019. Since Win10 DOS windows
now support colored text (just like the old DOS days with ANSI).
If this, or something like it, is a valid and supportable way to build FLTK
going forward, can this recipe be mentioned in the README.CMAKE.txt?
I use the following command sequence with VisualC 2021. The `CMAKE_BUILD_TYPE` doesn't really do anything according to the CMake documentation for building with IDEs (VC, Xcode).
Instead, a Debug and a Release subdirectory are generated, and the `--config Release` option must be used. ...
```
cmake -S fltk -B fltk/build -A x64 -D OPTION_USE_SYSTEM_LIBJPEG=Off -D OPTION_USE_SYSTEM_ZLIB=Off -D OPTION_USE_SYSTEM_LIBPNG=Off -D CMAKE_BUILD_TYPE=Release
cmake --build fltk/build --config Release
```