Skip to content

Commit

Permalink
fix msvc build again (take II)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 4, 2022
1 parent 125294a commit b5e6078
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 3 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Expand Up @@ -436,9 +436,6 @@ if(WITH_CORE)
endif()
find_package(PDAL REQUIRED) # PDAL provider
set(HAVE_PDAL_QGIS TRUE) # used in qgisconfig.h. note -- we can't use HAVE_PDAL here as the grass public headers redefine this!
if(MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
endif()

#############################################################
Expand Down
3 changes: 3 additions & 0 deletions src/app/CMakeLists.txt
Expand Up @@ -468,6 +468,9 @@ endif()

if (WITH_PDAL)
include_directories(SYSTEM ${PDAL_INCLUDE_DIR})
if(MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
endif()

if(ENABLE_MODELTEST)
Expand Down
3 changes: 3 additions & 0 deletions src/core/CMakeLists.txt
Expand Up @@ -1971,6 +1971,9 @@ if (WITH_PDAL)
include_directories(SYSTEM
${PDAL_INCLUDE_DIR}
)
if(MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
endif()

if (HAVE_OPENCL)
Expand Down
7 changes: 7 additions & 0 deletions src/gui/CMakeLists.txt
Expand Up @@ -1515,6 +1515,13 @@ if (BUILD_WITH_QT6)
)
endif()

if (WITH_PDAL)
include_directories(SYSTEM ${PDAL_INCLUDE_DIR})
if(MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
endif()

target_include_directories(qgis_gui PUBLIC
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/annotations
Expand Down
4 changes: 4 additions & 0 deletions src/providers/pdal/CMakeLists.txt
@@ -1,6 +1,10 @@
########################################################
# Files

if(MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif(MSVC)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

Expand Down

0 comments on commit b5e6078

Please sign in to comment.