summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-04-10 13:27:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-04-10 13:33:55 +0200
commit7faafed3101f899dd1a3f12812d54448485ef735 (patch)
treea0fe8118c2429d7541ee1a1724940a42dee3c013 /cmake
parentd44e0801476ffeec4905a779f0bda29057251321 (diff)
cmake: make msvc arch detection more robust
Diffstat (limited to 'cmake')
-rw-r--r--cmake/msvc.cmake11
1 files changed, 7 insertions, 4 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake
index 807aef11..6a3ee586 100644
--- a/cmake/msvc.cmake
+++ b/cmake/msvc.cmake
@@ -2,12 +2,15 @@ SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_SYSTEM_VERSION 5.01)
if(NOT DEFINED floormat-64bit)
- if ("$ENV{LIBPATH}" MATCHES "lib\\\\x64;")
- set(floormat-64bit 1)
- elseif("$ENV{LIBPATH}" MATCHES "lib\\\\x86;")
- set(floormat-64bit 0)
+ if ("$ENV{LIBPATH}" MATCHES "\\\\lib\\\\x64\\;")
+ set(floormat-64bit 1 CACHE BOOL "" FORCE)
+ elseif("$ENV{LIBPATH}" MATCHES "\\\\lib\\\\x86\\;")
+ set(floormat-64bit 0 CACHE BOOL "" FORCE)
+ else()
+ message(FATAL_ERROR "can't determine arch")
endif()
endif()
+set(floormat-64bit "${floormat-64bit}" CACHE BOOL "" FORCE)
if(NOT DEFINED floormat-no-static-crt)
set(floormat-no-static-crt 0)