Skip to content

Commit

Permalink
cmake: Set PROJECT_ARCH to the host architecture by default
Browse files Browse the repository at this point in the history
  • Loading branch information
magreenblatt committed Jan 12, 2023
1 parent b65d59f commit 2b906c3
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cmake/cef_variables.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ endif()

# Determine the project architecture.
if(NOT DEFINED PROJECT_ARCH)
if(OS_WINDOWS AND "${CMAKE_GENERATOR_PLATFORM}" STREQUAL "arm64")
if(("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64") OR
("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM64"))
set(PROJECT_ARCH "arm64")
elseif(CMAKE_SIZEOF_VOID_P MATCHES 8)
set(PROJECT_ARCH "x86_64")
else()
set(PROJECT_ARCH "x86")
endif()

if(OS_MAC)
# PROJECT_ARCH should be specified on Mac OS X.
message(WARNING "No PROJECT_ARCH value specified, using ${PROJECT_ARCH}")
endif()
endif()

if(${CMAKE_GENERATOR} STREQUAL "Ninja")
Expand Down

0 comments on commit 2b906c3

Please sign in to comment.