Skip to content

Commit

Permalink
ensure windows sdk version is set when asio is included in packaged env.
Browse files Browse the repository at this point in the history
  • Loading branch information
cklosters committed Aug 31, 2022
1 parent e968034 commit fe7e6b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/napasio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE NAP_SHARED_LIBRARY PUBLIC ASI

# additional definitions
if(WIN32)
target_compile_definitions(${PROJECT_NAME} PUBLIC WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0501)
target_compile_definitions(${PROJECT_NAME} PUBLIC WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0A00)
endif()

target_link_libraries(${PROJECT_NAME} ${DEPENDENT_NAP_MODULES} napcore)
Expand Down
3 changes: 2 additions & 1 deletion modules/napasio/dist/cmake/module_extra.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ add_define_to_interface_target(mod_napasio ASIO_STANDALONE)

if(WIN32)
# Define _WIN32_WINNT for ASIO
add_define_to_interface_target(mod_napasio WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0501)
add_define_to_interface_target(mod_napasio WIN32_LEAN_AND_MEAN)
add_define_to_interface_target(mod_napasio _WIN32_WINNT=0x0A00)
endif()

# Install asio license into packaged project
Expand Down

0 comments on commit fe7e6b0

Please sign in to comment.