Skip to content

Commit

Permalink
Compile Error on Windows fixed
Browse files Browse the repository at this point in the history
See Build Fails on Windows because of std::min #130
  • Loading branch information
bilaljo authored Jul 13, 2024
1 parent aa4ac4c commit 6cdd9bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ project(JKQTPlotter
HOMEPAGE_URL https://github.com/jkriege2/JKQtPlotter
DESCRIPTION "an extensive Qt5 & Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies"
)

if (WIN32)
# Needed because windows.h otherwise defines a macro for min
# See https://stackoverflow.com/a/5004874/12585571
add_compile_definitions(NOMINMAX)
endif (WIN32)

# set search path for CMake files
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
Expand Down

0 comments on commit 6cdd9bd

Please sign in to comment.