diff --git a/cmake/defaults/rv_targets.cmake b/cmake/defaults/rv_targets.cmake index 610da163..72b165c1 100644 --- a/cmake/defaults/rv_targets.cmake +++ b/cmake/defaults/rv_targets.cmake @@ -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}") @@ -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 ) @@ -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 @@ -150,4 +168,4 @@ ELSEIF(WIN32) ELSE() MESSAGE(FATAL_ERROR "Unsupported platform") -ENDIF() \ No newline at end of file +ENDIF()