Skip to content

Commit

Permalink
Fix build for Qt 6.7.0, Cuda 12.4.1, and VS 2022.
Browse files Browse the repository at this point in the history
  • Loading branch information
schulzch committed May 16, 2024
1 parent 3ac2244 commit ceadf6a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/data
/unmixer/__pycache__

CMakeSettings.json
CMakeLists.txt.user
*.log
*.bak
Expand Down
2 changes: 1 addition & 1 deletion libstipple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if(UNIX AND NOT APPLE)
PUBLIC Threads::Threads ${CMAKE_DL_LIBS} rt)
endif()

option(ENABLE_NVTOOLSEXT "Use NVIDIA Tools Extensions for profiling." ON)
option(ENABLE_NVTOOLSEXT "Use NVIDIA Tools Extensions for profiling." OFF)
if(ENABLE_NVTOOLSEXT)
# Before fiddling around with detection, note that:
# - NVTX v3 is a header-only library
Expand Down
2 changes: 2 additions & 0 deletions libstipple/src/algorithm/lindebuzogray.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "utils/diagnostics.cuh"
#include "utils/hash.cuh"
#include "utils/math.cuh"
#include <thrust/execution_policy.h>
#include <thrust/remove.h>
#include <cuda.h>

__device__ __forceinline__ float errorReduction(unsigned int hashIndex, float reductionChance) {
Expand Down
2 changes: 2 additions & 0 deletions libstipple/src/algorithm/voronoi.cu
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "utils/diagnostics.cuh"
#include <cuda.h>
#include <thrust/unique.h>
#include <thrust/sort.h>
#include <thrust/execution_policy.h>

__global__ void linearSearchKernel(
KernelCellMaps cellMaps,
Expand Down
4 changes: 1 addition & 3 deletions playground/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
find_package(Qt6 QUIET COMPONENTS Core Widgets Svg OpenGLWidgets OPTIONAL_COMPONENTS Multimedia)
if(NOT Qt6_FOUND)
message(WARNING "Qt6 not found, trying fallback...")
find_package(Qt5 COMPONENTS Core Widgets Svg REQUIRED)
message(STATUS "Using Qt5 fallback ${Qt5Widgets_VERSION_STRING}")
elseif(TARGET Qt6::Multimedia)
Expand Down Expand Up @@ -52,12 +53,9 @@ if(WIN32)
$<$<CONFIG:RELEASE>:--release>
$<$<CONFIG:RELWITHDEBINFO>:--release>
$<$<CONFIG:DEBUG>:--debug>
$<$<NOT:$<BOOL:${Qt6_FOUND}>>:--no-angle>
--no-opengl-sw
--no-compiler-runtime
--no-system-d3d-compiler
$<$<NOT:$<BOOL:${Qt6_FOUND}>>:--no-webkit2>
$<$<NOT:$<VERSION_LESS:${Qt5Core_VERSION},"5.13.0">>:--no-virtualkeyboard>
--no-quick-import
--no-translations
\"$<TARGET_FILE_DIR:${PROJECT_NAME}>/$<TARGET_FILE_NAME:${PROJECT_NAME}>\"
Expand Down
8 changes: 7 additions & 1 deletion playground/src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,13 @@ void MainWindow::setIntermediateResultDisplay(int minIterationDuration) {
for (int layerIndex = 0; layerIndex < m_layers.size(); layerIndex++) {
m_layers[layerIndex].stipples = layerStipples[layerIndex];
}
if (!lindeBuzoGrayResult.done || m_frameChanging) {
bool frameChanging =
#if defined(QT_MULTIMEDIA_LIB)
m_frameChanging;
#else
false;
#endif
if (!lindeBuzoGrayResult.done || frameChanging) {
m_toolbox->setRenderMode(RenderMode::RasterStipples);
} else {
m_toolbox->setRenderMode(RenderMode::RasterStipplesWithBackground);
Expand Down

0 comments on commit ceadf6a

Please sign in to comment.