nappgui_src icon indicating copy to clipboard operation
nappgui_src copied to clipboard

Update build system to CMake 4

Open carlos-h-h opened this issue 6 months ago • 4 comments

CMake was installed with scoop. I don't know if it's relevant, but since the guide said to "Add CMake to the system PATH for all users", I'll mention that ...\scoop\shims (location of cmake.exe) is both in my user's and the system path.

PS ~\dev\ext\nappgui_src> cmake -S . -B build
CMake Deprecation Warning at CMakeLists.txt:9 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- ---------------------------------------------
-- NAppGUI Cross-Platform SDK
-- 2015-2025 Francisco Garcia Collado
-- MIT License
-- ---------------------------------------------
-- * VERSION: 1.5.2.6256
-- * GENERATOR: Visual Studio 17 2022
-- * BUILD_SHARED: False
-- * COMPILER: MSVC
-- * COMPILER_VERSION: 19.41.34120.0
-- * BUILD_TYPE: Multiconfig [Debug;Release;MinSizeRel;RelWithDebInfo]
-- * BUILD_ARCH: x64
-- * HOST_ARCH: x64
-- * PACKAGE_ID: v143_x64
-- ---------------------------------------------
-- - Generating NAppGUI Tools...
- Error generating NAppGUI Tools
CMake Result: 1
CMake Output: -- Configuring incomplete, errors occurred!

CMake Error: CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.



CMake Error at prj/NAppGenerateTools.cmake:50 (message):
  Abort
Call Stack (most recent call first):
  CMakeLists.txt:55 (nap_generate_tools)


-- Configuring incomplete, errors occurred!
PS ~\dev\ext\nappgui_src> cmake --version
cmake version 4.0.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

carlos-h-h avatar May 27 '25 13:05 carlos-h-h

Hi @carlos-h-h! Thanks for use NAppGUI. Please use a cmake version < 4.0 (3.29.3 is working in my Windows CI nodes). Still I have not tested NAppGUI build system for CMake > 4

If problem persist, please go to /build/tools/build and open NAppGUITools.sln with VS. Try to compile and share the build logs.

frang75 avatar May 27 '25 19:05 frang75

Worked perfect with cmake 3.31.7. Thanks 👍

(Maybe add the needed cmake version to the documentation, the default is 4.0.2 now.)

carlos-h-h avatar May 28 '25 04:05 carlos-h-h

I'm experiencing similar issue on MSYS2. But MSYS2 is a rolling release system, it's unable for me to roll back to previous CMake version.

beteunam-saram avatar Jun 04 '25 11:06 beteunam-saram

Fixed on this commit: https://github.com/frang75/nappgui_src/commit/156ae3fdc93d40e9e0f141f22e724107947f3124

frang75 avatar Jun 04 '25 20:06 frang75