Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for compiling with PDAL/untwine with MSVC/Windows #42904

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ target_link_libraries(qgis_app
libdxfrw
)

target_compile_definitions(qgis_app PRIVATE "-DQT_NO_FOREACH")
target_compile_definitions(qgis_app PRIVATE "-DQT_NO_FOREACH -DWIN32_LEAN_AND_MEAN")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already in line 425


if (WITH_BINDINGS)
target_link_libraries(qgis_app qgispython)
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ class QgsNetworkLoggerWidgetFactory;

#ifdef Q_OS_WIN
#include <windows.h>
// because of WIN32_LEAN_AND_MEAN we need to include this explicitly
#include <shellapi.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already in qgisapp.cpp:487

#endif

class QgsLegendFilterButton;
Expand Down
2 changes: 2 additions & 0 deletions src/providers/pdal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ set_target_properties(untwine PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_LIBEXEC_SUBDIR}
)

target_compile_definitions(untwine PRIVATE WIN32_LEAN_AND_MEAN)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already in line 5.

IOW c5ea4b2 should already cover this fully.


target_link_libraries (untwine
${PDAL_LIBRARIES}
Threads::Threads
Expand Down