diff --git a/Example_CPP/CMakeLists.txt b/Example_CPP/CMakeLists.txt index cf0b253..5d97b4e 100644 --- a/Example_CPP/CMakeLists.txt +++ b/Example_CPP/CMakeLists.txt @@ -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) diff --git a/Example_OpenGL/CMakeLists.txt b/Example_OpenGL/CMakeLists.txt index 6617f00..1f7aa48 100644 --- a/Example_OpenGL/CMakeLists.txt +++ b/Example_OpenGL/CMakeLists.txt @@ -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)