cmake: refactor the architecture detection

This commit is contained in:
David Hrdlička
2021-08-29 03:37:07 +02:00
parent b9e07113ca
commit 44ccefb28a
6 changed files with 45 additions and 157 deletions

View File

@@ -62,7 +62,7 @@ find_package(PNG REQUIRED)
include_directories(${PNG_INCLUDE_DIRS})
target_link_libraries(86Box PNG::PNG)
if(CMAKE_TARGET_ARCHITECTURES STREQUAL "i386")
if(ARCH STREQUAL "i386")
if(MSVC)
set_target_properties(86Box PROPERTIES LINK_FLAGS "/LARGEADDRESSAWARE")
elseif(MINGW)