Skip to content

Commit

Permalink
Fixed detection of x64 vs x86 dependencies (#8)
Browse files Browse the repository at this point in the history
before, the CMAKE_GENERATOR_PLATFORM was used, which may not be set at all, if the default setting is being used. Now the proper CMAKE_SIZEOF_VOID_P variable is used.
  • Loading branch information
FlorianReimold authored Jan 29, 2024
1 parent 9ec1681 commit 4946dc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion thirdparty/npcap/Modules/Findnpcap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ find_path(npcap_INCLUDE_DIR
)

# Lib dir
if(("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64") OR ("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)"))
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
# Find 64-bit libraries
find_path (npcap_LIB_DIR
NAMES wpcap.lib
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/pcapplusplus/Modules/Findpcapplusplus.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ find_path(pcapplusplus_INCLUDE_DIR
)

# Lib dir
if(("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64") OR ("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)"))
if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
# Find 64-bit libraries
find_path (pcapplusplus_LIB_DIR
NAMES "Release/Pcap++.lib"
Expand Down

0 comments on commit 4946dc2

Please sign in to comment.