Skip to content

Commit

Permalink
Fix issue where runtime.build_os and runtime.build_architecture retur…
Browse files Browse the repository at this point in the history
…n nothing

Signed-off-by: Cédrik Fuoco <[email protected]>
  • Loading branch information
cedrik-fuoco-adsk committed Nov 13, 2024
1 parent db17195 commit adba83e
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions cmake/defaults/rv_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@ SET(CMAKE_SKIP_RPATH
)

IF(APPLE)
# Only native builds are supported (x86_64 on Intel MacOS and ARM64 on Apple chipset).
# Rosetta can be used to build x86_64 on Apple chipset.
# Only native builds are supported (x86_64 on Intel MacOS and ARM64 on Apple chipset). Rosetta can be used to build x86_64 on Apple chipset.
IF("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
SET(RV_TARGET_APPLE_X86_64
ON
CACHE INTERNAL "Compile for x86_64 on Apple MacOS" FORCE
)
SET(__target_arch__ -DRV_ARCH_X86_64)
SET(__target_arch__
-DRV_ARCH_X86_64
)
ELSEIF("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "arm64")
SET(RV_TARGET_APPLE_ARM64
ON
CACHE INTERNAL "Compile for arm64 on Apple MacOS" FORCE
)
SET(__target_arch__ -DRV_ARCH_ARM64)
SET(__target_arch__
-DRV_ARCH_ARM64
)
ENDIF()

MESSAGE(STATUS "Building for ${CMAKE_HOST_SYSTEM_PROCESSOR}")
Expand All @@ -44,6 +47,11 @@ IF(APPLE)
CACHE STRING "Platform identifier used in Tweak Makefiles"
)

SET(ARCH
"${CMAKE_HOST_SYSTEM_PROCESSOR}"
CACHE STRING "CPU Architecture identifier"
)

SET(CMAKE_MACOSX_RPATH
ON
)
Expand Down Expand Up @@ -107,6 +115,16 @@ ELSEIF(UNIX)
-DPLATFORM_OPENGL=1
)

SET(PLATFORM
"LINUX"
CACHE STRING "Platform identifier"
)

SET(ARCH
"IA32_64"
CACHE STRING "CPU Architecture identifier"
)

EXECUTE_PROCESS(
COMMAND cat /etc/redhat-release
OUTPUT_VARIABLE RHEL_VERBOSE
Expand Down Expand Up @@ -150,4 +168,4 @@ ELSEIF(WIN32)
ELSE()
MESSAGE(FATAL_ERROR "Unsupported platform")

ENDIF()
ENDIF()

0 comments on commit adba83e

Please sign in to comment.