From 4946dc27595179803f0deab72bad0fc9e0cf9515 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:05:53 +0100 Subject: [PATCH] Fixed detection of x64 vs x86 dependencies (#8) 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. --- thirdparty/npcap/Modules/Findnpcap.cmake | 2 +- thirdparty/pcapplusplus/Modules/Findpcapplusplus.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thirdparty/npcap/Modules/Findnpcap.cmake b/thirdparty/npcap/Modules/Findnpcap.cmake index 2a1253c..6fce1da 100644 --- a/thirdparty/npcap/Modules/Findnpcap.cmake +++ b/thirdparty/npcap/Modules/Findnpcap.cmake @@ -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 diff --git a/thirdparty/pcapplusplus/Modules/Findpcapplusplus.cmake b/thirdparty/pcapplusplus/Modules/Findpcapplusplus.cmake index d373086..fd56d49 100644 --- a/thirdparty/pcapplusplus/Modules/Findpcapplusplus.cmake +++ b/thirdparty/pcapplusplus/Modules/Findpcapplusplus.cmake @@ -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"