Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()