Skip to content

Commit

Permalink
add nominmax on windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
delmottea committed Dec 8, 2022
1 parent 2edcf15 commit 32211a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Example_CPP/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
project(screen_capture_example_cpp)

if(WIN32)
add_definitions(-DNOMINMAX)
endif()

if(NOT ${BUILD_SHARED_LIBS})
if(WIN32)
set(${PROJECT_NAME}_PLATFORM_LIBS Dwmapi)
add_definitions(-DNOMINMAX)
elseif(APPLE)
find_package(Threads REQUIRED)
find_library(corefoundation_lib CoreFoundation REQUIRED)
Expand Down
5 changes: 4 additions & 1 deletion Example_OpenGL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
project(screen_capture_example_opengl_cpp)

if(WIN32)
add_definitions(-DNOMINMAX)
endif()

if(NOT ${BUILD_SHARED_LIBS})
if(WIN32)
set(${PROJECT_NAME}_PLATFORM_LIBS Dwmapi)
add_definitions(-DNOMINMAX)
elseif(APPLE)
find_package(Threads REQUIRED)
find_library(corefoundation_lib CoreFoundation REQUIRED)
Expand Down

0 comments on commit 32211a2

Please sign in to comment.