maplibre / maplibre-native-qt

MapLibre Native Qt Bindings and Qt Location Plugin
https://maplibre.org/maplibre-native-qt/docs/
43 stars 16 forks source link

Windows: Only Release files are built #171

Closed petricf closed 1 month ago

petricf commented 1 month ago

Describe the bug According the guide at https://github.com/maplibre/maplibre-native-qt/blob/main/docs/Building.md (as i understand it) the command

cmake ../maplibre-native-qt -G "Ninja Multi-Config" \ -DCMAKE_CONFIGURATION_TYPES="Release;Debug" \ -DCMAKE_INSTALL_PREFIX="../install" \ -DCMAKE_TOOLCHAIN_FILE="...../qt.toolchain.cmake"

should build the release AND the debug files. But the release files are built only.

A test install shows this fact also.

To Reproduce Steps to reproduce the behavior:

  1. get sources via git (with errors on too long file names)
  2. change to build dir
  3. execute command above
  4. execute ninja
  5. <build-dir>/src/core/Debug is empty.

Expected behavior Debug files should be built also

Screenshots Output of cmake step:

-- Version 3.0.0 -- The CXX compiler identification is MSVC 19.41.34120.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Found Threads: TRUE -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Using Qt6 (6.7.3) -- The C compiler identification is MSVC 19.41.34120.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Configuring GL-Native with OpenGL renderer backend -- Configuring MapLibre Native with Qt platform -- Using internal sqlite -- Looking for strerror_r -- Looking for strerror_r - not found Target platform does not support HTTP tests or dependencies not found. -- Building location module -- Building widgets module -- Configuring done (28.9s) -- Generating done (2.3s) -- Build files have been written to: C:/Projects/maplibre-build

Platform information (please complete the following information):

Additional context Remark: If i skip the CMAKE_CONFIGURATION_TYPES option the debug files are created but not the release ones.

Output of ninja run:

[19/435] Building CXX object src\core\MapLibreCore\CMakeFi....dir\Release\src\mbgl\annotation\annotation_source.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [21/435] Building CXX object src\core\MapLibreCore\CMakeFi...re.dir\Release\src\mbgl\annotation\annotation_tile.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [23/435] Building CXX object src\core\MapLibreCore\CMakeFi...r\Release\src\mbgl\annotation\line_annotation_impl.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [24/435] Building CXX object src\core\MapLibreCore\CMakeFi...r\Release\src\mbgl\annotation\fill_annotation_impl.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [30/435] Building CXX object src\core\MapLibreCore\CMakeFi...dir\Release\src\mbgl\annotation\annotation_manager.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [33/435] Building CXX object src\core\MapLibreCore\CMakeFi...Release\src\mbgl\annotation\symbol_annotation_impl.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [35/435] Building CXX object src\core\MapLibreCore\CMakeFi...\Release\src\mbgl\annotation\shape_annotation_impl.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [54/435] Building CXX object src\core\MapLibreCore\CMakeFiles\mbgl-core.dir\Release\src\mbgl\map\map.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [55/435] Building CXX object src\core\MapLibreCore\CMakeFiles\mbgl-core.dir\Release\src\mbgl\map\map_impl.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [56/435] Building CXX object src\core\MapLibreCore\CMakeFiles\mbgl-core.dir\Release\src\mbgl\map\map_projection.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [109/435] Building CXX object src\core\MapLibreCore\CMakeFiles\mbgl-core.dir\Release\src\mbgl\renderer\renderer.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: > The contents of are available only with C++23 or later. [110/435] Building CXX object src\core\MapLibreCore\CMakeF....dir\Release\src\mbgl\renderer\render_orchestrator.cpp.obj C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\include\stdfloat(12): warning STL4038: The contents of are available only with C++23 or later. [421/435] Automatic QML type registration for target declarative_locationplugin_maplibre Warning: declarative_filter_parameter.hpp:: FilterParameter is used but cannot be found. Warning: declarative_image_parameter.hpp:: ImageParameter is used but cannot be found. Warning: declarative_layer_parameter.hpp:: LayerParameter is used but cannot be found. Warning: declarative_source_parameter.hpp:: SourceParameter is used but cannot be found. [435/435] Linking CXX shared module src\location\plugins\MapLibre\declarative_locationplugin_maplibre.dll

petricf commented 1 month ago

Build step:

ninja -f build-Debug.ninja ninja -f build-Release.ninja

Install:

ninja -f build-Debug.ninja install ninja -f build-Release.ninja install

Is this correct ?

If so it should be documented in Building.md.

ntadej commented 1 month ago

I think something changes in recent CMake releases. Will update the docs. Workflows are still recommended build procedure though, will also clarify in the docs.

ntadej commented 1 month ago

The trick should be to set CMAKE_DEFAULT_CONFIGS=all. Will put it in docs.