Skip to content

Commit 696390b

Browse files
committed
fix: add NOMINMAX and WIN32_LEAN_AND_MEAN compile definitions on Windows
1 parent f082c89 commit 696390b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ function(vefc_apply_common_options target)
194194
target_compile_features(${target} PRIVATE cxx_std_20)
195195
target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
196196

197+
if(WIN32)
198+
target_compile_definitions(${target} PRIVATE NOMINMAX WIN32_LEAN_AND_MEAN)
199+
endif()
200+
197201
if(MSVC OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC"))
198202
target_compile_options(${target} PRIVATE /utf-8)
199203
endif()

0 commit comments

Comments
 (0)