Browse Source

Rename everything 'RASPI' to 'RPI'. [ci rebase]

Yao Wei Tjong 姚伟忠 11 years ago
parent
commit
20e21050e9

+ 1 - 1
Bin/CoreData/Shaders/GLSL/Uniforms.glsl

@@ -24,7 +24,7 @@ uniform mat4 cZone;
     uniform mat4 cLightMatrices[2];
     uniform mat4 cLightMatrices[2];
 #endif
 #endif
 #ifdef SKINNED
 #ifdef SKINNED
-    #ifdef RASPI
+    #ifdef RPI
         uniform vec4 cSkinMatrices[32*3];
         uniform vec4 cSkinMatrices[32*3];
     #else
     #else
         uniform vec4 cSkinMatrices[64*3];
         uniform vec4 cSkinMatrices[64*3];

+ 1 - 1
CMake/Modules/FindBCM_VC.cmake

@@ -27,7 +27,7 @@
 #  BCM_VC_LIBRARIES
 #  BCM_VC_LIBRARIES
 #
 #
 
 
-if (NOT RASPI)
+if (NOT RPI)
     return ()
     return ()
 endif ()
 endif ()
 if (BCM_VC_FOUND)
 if (BCM_VC_FOUND)

+ 8 - 8
CMake/Modules/Urho3D-CMake-common.cmake

@@ -59,11 +59,11 @@ if (NOT MSVC AND NOT DEFINED URHO3D_DEFAULT_64BIT)  # Only do this once in the i
         string (REGEX MATCH "#define +__arm__ +1" matched "${PREDEFINED_MACROS}")
         string (REGEX MATCH "#define +__arm__ +1" matched "${PREDEFINED_MACROS}")
         if (matched)
         if (matched)
             # Set the CMake variable here instead of in raspberrypi.toolchain.cmake because Raspberry Pi can be built natively too on the Raspberry-Pi device itself
             # Set the CMake variable here instead of in raspberrypi.toolchain.cmake because Raspberry Pi can be built natively too on the Raspberry-Pi device itself
-            set (RASPI TRUE CACHE INTERNAL "Setup build for Raspberry Pi platform")
+            set (RPI TRUE CACHE INTERNAL "Setup build for Raspberry Pi platform")
         endif ()
         endif ()
     endif ()
     endif ()
 endif ()
 endif ()
-if (ANDROID OR RASPI)
+if (ANDROID OR RPI)
     # This build option is not available on Android and Raspberry-Pi platforms as its value is preset by the toolchain being used in the build
     # This build option is not available on Android and Raspberry-Pi platforms as its value is preset by the toolchain being used in the build
     set (URHO3D_64BIT ${URHO3D_DEFAULT_64BIT})
     set (URHO3D_64BIT ${URHO3D_DEFAULT_64BIT})
 else ()
 else ()
@@ -204,7 +204,7 @@ if (URHO3D_OPENGL)
 endif ()
 endif ()
 
 
 # Add definitions for GLEW
 # Add definitions for GLEW
-if (NOT IOS AND NOT ANDROID AND NOT RASPI AND URHO3D_OPENGL)
+if (NOT IOS AND NOT ANDROID AND NOT RPI AND URHO3D_OPENGL)
     add_definitions (-DGLEW_STATIC -DGLEW_NO_GLU)
     add_definitions (-DGLEW_STATIC -DGLEW_NO_GLU)
 endif ()
 endif ()
 
 
@@ -264,7 +264,7 @@ if (WIN32 AND NOT URHO3D_OPENGL)
 endif ()
 endif ()
 
 
 # For Raspbery Pi, find Broadcom VideoCore IV firmware
 # For Raspbery Pi, find Broadcom VideoCore IV firmware
-if (RASPI)
+if (RPI)
     find_package (BCM_VC REQUIRED)
     find_package (BCM_VC REQUIRED)
     include_directories (${BCM_VC_INCLUDE_DIRS})
     include_directories (${BCM_VC_INCLUDE_DIRS})
 endif ()
 endif ()
@@ -320,8 +320,8 @@ else ()
         set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
         set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector")
         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
         set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
     else ()
     else ()
-        if (RASPI)
-            add_definitions (-DRASPI)
+        if (RPI)
+            add_definitions (-DRPI)
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Wno-psabi")
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Wno-psabi")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Wno-psabi")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Wno-psabi")
         else ()
         else ()
@@ -751,7 +751,7 @@ macro (define_dependency_libs TARGET)
         else ()
         else ()
             # Linux
             # Linux
             list (APPEND LINK_LIBS_ONLY dl pthread rt)
             list (APPEND LINK_LIBS_ONLY dl pthread rt)
-            if (RASPI)
+            if (RPI)
                 list (APPEND ABSOLUTE_PATH_LIBS ${BCM_VC_LIBRARIES})
                 list (APPEND ABSOLUTE_PATH_LIBS ${BCM_VC_LIBRARIES})
             endif ()
             endif ()
         endif ()
         endif ()
@@ -791,7 +791,7 @@ macro (define_dependency_libs TARGET)
                 list (APPEND LINK_LIBS_ONLY opengl32)
                 list (APPEND LINK_LIBS_ONLY opengl32)
             elseif (ANDROID)
             elseif (ANDROID)
                 list (APPEND LINK_LIBS_ONLY GLESv1_CM GLESv2)
                 list (APPEND LINK_LIBS_ONLY GLESv1_CM GLESv2)
-            elseif (NOT APPLE AND NOT RASPI)
+            elseif (NOT APPLE AND NOT RPI)
                 list (APPEND LINK_LIBS_ONLY GL)
                 list (APPEND LINK_LIBS_ONLY GL)
             endif ()
             endif ()
         else ()
         else ()

+ 21 - 21
CMake/Toolchains/raspberrypi.toolchain.cmake

@@ -32,36 +32,36 @@ set (CMAKE_SYSTEM_NAME Linux)
 set (CMAKE_SYSTEM_VERSION 1)
 set (CMAKE_SYSTEM_VERSION 1)
 
 
 # specify the cross compiler
 # specify the cross compiler
-file (TO_CMAKE_PATH "$ENV{RASPI_TOOL}" RASPI_TOOL)
-if (NOT EXISTS ${RASPI_TOOL}/arm-linux-gnueabihf-gcc)
+file (TO_CMAKE_PATH "$ENV{RPI_TOOL}" RPI_TOOL)
+if (NOT EXISTS ${RPI_TOOL}/arm-linux-gnueabihf-gcc)
     message (FATAL_ERROR "Could not find Raspberry Pi cross compilation tool. "
     message (FATAL_ERROR "Could not find Raspberry Pi cross compilation tool. "
-        "Use RASPI_TOOL environment variable to specify the location of the toolchain.")
+        "Use RPI_TOOL environment variable to specify the location of the toolchain.")
 endif ()
 endif ()
-set (CMAKE_C_COMPILER   ${RASPI_TOOL}/arm-linux-gnueabihf-gcc     CACHE PATH "C compiler")
-set (CMAKE_CXX_COMPILER ${RASPI_TOOL}/arm-linux-gnueabihf-c++     CACHE PATH "C++ compiler")
-set (CMAKE_ASM_COMPILER ${RASPI_TOOL}/arm-linux-gnueabihf-gcc     CACHE PATH "assembler")
-set (CMAKE_STRIP        ${RASPI_TOOL}/arm-linux-gnueabihf-strip   CACHE PATH "strip")
-set (CMAKE_AR           ${RASPI_TOOL}/arm-linux-gnueabihf-ar      CACHE PATH "archive")
-set (CMAKE_LINKER       ${RASPI_TOOL}/arm-linux-gnueabihf-ld      CACHE PATH "linker")
-set (CMAKE_NM           ${RASPI_TOOL}/arm-linux-gnueabihf-nm      CACHE PATH "nm")
-set (CMAKE_OBJCOPY      ${RASPI_TOOL}/arm-linux-gnueabihf-objcopy CACHE PATH "objcopy")
-set (CMAKE_OBJDUMP      ${RASPI_TOOL}/arm-linux-gnueabihf-objdump CACHE PATH "objdump")
-set (CMAKE_RANLIB       ${RASPI_TOOL}/arm-linux-gnueabihf-ranlib  CACHE PATH "ranlib")
+set (CMAKE_C_COMPILER   ${RPI_TOOL}/arm-linux-gnueabihf-gcc     CACHE PATH "C compiler")
+set (CMAKE_CXX_COMPILER ${RPI_TOOL}/arm-linux-gnueabihf-c++     CACHE PATH "C++ compiler")
+set (CMAKE_ASM_COMPILER ${RPI_TOOL}/arm-linux-gnueabihf-gcc     CACHE PATH "assembler")
+set (CMAKE_STRIP        ${RPI_TOOL}/arm-linux-gnueabihf-strip   CACHE PATH "strip")
+set (CMAKE_AR           ${RPI_TOOL}/arm-linux-gnueabihf-ar      CACHE PATH "archive")
+set (CMAKE_LINKER       ${RPI_TOOL}/arm-linux-gnueabihf-ld      CACHE PATH "linker")
+set (CMAKE_NM           ${RPI_TOOL}/arm-linux-gnueabihf-nm      CACHE PATH "nm")
+set (CMAKE_OBJCOPY      ${RPI_TOOL}/arm-linux-gnueabihf-objcopy CACHE PATH "objcopy")
+set (CMAKE_OBJDUMP      ${RPI_TOOL}/arm-linux-gnueabihf-objdump CACHE PATH "objdump")
+set (CMAKE_RANLIB       ${RPI_TOOL}/arm-linux-gnueabihf-ranlib  CACHE PATH "ranlib")
 
 
 # specify the system root
 # specify the system root
 if (NOT BCM_VC_INCLUDE_DIRS)
 if (NOT BCM_VC_INCLUDE_DIRS)
     # Keep invalidating the cache until we found the BCM library and its include directory which hopefully also mean we have found the correct SYSROOT
     # Keep invalidating the cache until we found the BCM library and its include directory which hopefully also mean we have found the correct SYSROOT
-    unset (RASPI_SYSROOT CACHE)
+    unset (RPI_SYSROOT CACHE)
     unset (CMAKE_INSTALL_PREFIX CACHE)
     unset (CMAKE_INSTALL_PREFIX CACHE)
-    file (TO_CMAKE_PATH "$ENV{RASPI_ROOT}" RASPI_ROOT)
-    if (NOT EXISTS ${RASPI_ROOT})
+    file (TO_CMAKE_PATH "$ENV{RPI_ROOT}" RPI_ROOT)
+    if (NOT EXISTS ${RPI_ROOT})
         message (FATAL_ERROR "Could not find Raspberry Pi system root. "
         message (FATAL_ERROR "Could not find Raspberry Pi system root. "
-            "Use RASPI_ROOT environment variable to specify the location of system root.")
+            "Use RPI_ROOT environment variable to specify the location of system root.")
     endif ()
     endif ()
-    set (RASPI_SYSROOT ${RASPI_ROOT} CACHE PATH "Path to Raspberry Pi SYSROOT")
-    mark_as_advanced (RASPI_SYSROOT CMAKE_TOOLCHAIN_FILE)
-    set (CMAKE_FIND_ROOT_PATH ${RASPI_SYSROOT})
-    set (CMAKE_INSTALL_PREFIX "${RASPI_SYSROOT}/usr/local" CACHE PATH "Install path prefix, prepended onto install directories.")
+    set (RPI_SYSROOT ${RPI_ROOT} CACHE PATH "Path to Raspberry Pi SYSROOT")
+    mark_as_advanced (RPI_SYSROOT CMAKE_TOOLCHAIN_FILE)
+    set (CMAKE_FIND_ROOT_PATH ${RPI_SYSROOT})
+    set (CMAKE_INSTALL_PREFIX "${RPI_SYSROOT}/usr/local" CACHE PATH "Install path prefix, prepended onto install directories.")
 endif ()
 endif ()
 
 
 # only search programs, libraries, and headers in the target directories
 # only search programs, libraries, and headers in the target directories

+ 2 - 2
CMakeLists.txt

@@ -70,7 +70,7 @@ if (ANDROID)
     set (DEST_RUNTIME_DIR ${DEST_RUNTIME_DIR}/${ANDROID_NDK_ABI_NAME})
     set (DEST_RUNTIME_DIR ${DEST_RUNTIME_DIR}/${ANDROID_NDK_ABI_NAME})
     set (DEST_LIBRARY_DIR ${DEST_LIBRARY_DIR}/${ANDROID_NDK_ABI_NAME})
     set (DEST_LIBRARY_DIR ${DEST_LIBRARY_DIR}/${ANDROID_NDK_ABI_NAME})
 endif ()
 endif ()
-set (SYSROOT ${ANDROID_TOOLCHAIN_ROOT} ${RASPI_SYSROOT} ${MINGW_SYSROOT})       # SYSROOT is empty for native build
+set (SYSROOT ${ANDROID_TOOLCHAIN_ROOT} ${RPI_SYSROOT} ${MINGW_SYSROOT})       # SYSROOT is empty for native build
 string (REPLACE "${SYSROOT}" "" DEST_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})    # Our CMAKE_INSTALL_PREFIX is rooted, use DEST_INSTALL_PREFIX for the non-rooted version
 string (REPLACE "${SYSROOT}" "" DEST_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})    # Our CMAKE_INSTALL_PREFIX is rooted, use DEST_INSTALL_PREFIX for the non-rooted version
 set (DEST_PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig)
 set (DEST_PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig)
 set (DEST_PERMISSIONS FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
 set (DEST_PERMISSIONS FILE_PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
@@ -111,7 +111,7 @@ elseif (APPLE)
 elseif (WIN32)
 elseif (WIN32)
     set (CPACK_GENERATOR ZIP)
     set (CPACK_GENERATOR ZIP)
 elseif (CPACK_SYSTEM_NAME STREQUAL Linux)
 elseif (CPACK_SYSTEM_NAME STREQUAL Linux)
-    if (RASPI)
+    if (RPI)
         set (CPACK_SYSTEM_NAME Raspberry-Pi)
         set (CPACK_SYSTEM_NAME Raspberry-Pi)
     endif ()
     endif ()
     list (APPEND CPACK_GENERATOR RPM DEB)
     list (APPEND CPACK_GENERATOR RPM DEB)

+ 6 - 6
Docs/GettingStarted.dox

@@ -38,7 +38,7 @@ A number of build options can be defined explicitly when invoking the above cmak
 |Build Option         |V|Description          |
 |Build Option         |V|Description          |
 |---------------------|-|---------------------|
 |---------------------|-|---------------------|
 |ANDROID              |0|Configure project using Android cross-compiler toolchain (cmake_generic.bat and cmake_generic.sh only)|
 |ANDROID              |0|Configure project using Android cross-compiler toolchain (cmake_generic.bat and cmake_generic.sh only)|
-|RASPI                |0|Configure project using Raspberry Pi cross-compiler toolchain (cmake_generic.sh only)|
+|RPI                  |0|Configure project using Raspberry Pi cross-compiler toolchain (cmake_generic.sh only)|
 |WIN32                |0|Configure project using MinGW cross-compiler toolchain (cmake_generic.sh only)|
 |WIN32                |0|Configure project using MinGW cross-compiler toolchain (cmake_generic.sh only)|
 |IOS                  |0|Configure project for targeting iOS platform (cmake_generic.sh and cmake-gui only); use cmake_ios.sh as shortcut|
 |IOS                  |0|Configure project for targeting iOS platform (cmake_generic.sh and cmake-gui only); use cmake_ios.sh as shortcut|
 |URHO3D_64BIT         |*|Enable 64bit build, on MSVC default to 0, on other compilers the default is set based on the installed toolchain on host system|
 |URHO3D_64BIT         |*|Enable 64bit build, on MSVC default to 0, on other compilers the default is set based on the installed toolchain on host system|
@@ -140,11 +140,11 @@ To run from Xcode on iPhone/iPad Simulator, edit the Product Scheme to set "Run"
 
 
 For native build on Raspberry Pi itself, use the similar process for \ref Building_Native "Linux native build" described above.
 For native build on Raspberry Pi itself, use the similar process for \ref Building_Native "Linux native build" described above.
 
 
-For cross-compiling build on an Linux host system, firstly set the RASPI_TOOL environment variable to point to your Raspberry Pi Cross-Compiling tool where all the arm-linux-gnueabihf-* executables are located. You can setup the tool using <a href="http://crosstool-ng.org/">crosstool-NG</a> or just download one from https://github.com/raspberrypi/tools. Secondly, set the RASPI_ROOT environment variable to point to your Raspbian or Pidora system root. You must install the Urho3D prerequisites software development packages for Raspberry Pi (see \ref Building_Prerequisites) in the system root before attempting to do the Urho3D cross-compiling build. You are recommended to download the Raspbian system root with Urho3D prerequisite software installed from https://github.com/urho3d/rpi-sysroot. You can just download from the "strip" branch to cut down the download time and size.
+For cross-compiling build on an Linux host system, firstly set the RPI_TOOL environment variable to point to your Raspberry Pi Cross-Compiling tool where all the arm-linux-gnueabihf-* executables are located. You can setup the tool using <a href="http://crosstool-ng.org/">crosstool-NG</a> or just download one from https://github.com/raspberrypi/tools. Secondly, set the RPI_ROOT environment variable to point to your Raspbian or Pidora system root. You must install the Urho3D prerequisites software development packages for Raspberry Pi (see \ref Building_Prerequisites) in the system root before attempting to do the Urho3D cross-compiling build. You are recommended to download the Raspbian system root with Urho3D prerequisite software installed from https://github.com/urho3d/rpi-sysroot. You can just download from the "strip" branch to cut down the download time and size.
 
 
 Execute cmake_raspi.sh then go to the build tree to execute make command. After the build is complete, the ARM executables can be found in the build tree's "Bin" subdirectory.
 Execute cmake_raspi.sh then go to the build tree to execute make command. After the build is complete, the ARM executables can be found in the build tree's "Bin" subdirectory.
 
 
-You can also build, deploy, run/debug (as C/C++ Remote %Application) using Eclipse IDE. To do that, execute cmake_eclipse.sh with "-DRASPI=1" build option set. Import the CMake generated Eclipse project in the build tree into Eclipse's workspace. Build the project as usual. Optionally, use the "URHO3D_SCP_TO_TARGET" build option to automatically deploy the ARM executables to target Raspberry Pi device as part of build process; or configure Eclipse to perform a "download to target path" in the Run/Debug configuration for C/C++ Remote %Application. Either way, you have to configure the Run/Debug configuration to let it know how to reach your target Raspberry Pi device.
+You can also build, deploy, run/debug (as C/C++ Remote %Application) using Eclipse IDE. To do that, execute cmake_eclipse.sh with "-DRPI=1" build option set. Import the CMake generated Eclipse project in the build tree into Eclipse's workspace. Build the project as usual. Optionally, use the "URHO3D_SCP_TO_TARGET" build option to automatically deploy the ARM executables to target Raspberry Pi device as part of build process; or configure Eclipse to perform a "download to target path" in the Run/Debug configuration for C/C++ Remote %Application. Either way, you have to configure the Run/Debug configuration to let it know how to reach your target Raspberry Pi device.
 
 
 \section Building_MinGW MinGW cross-compile build process
 \section Building_MinGW MinGW cross-compile build process
 
 
@@ -424,9 +424,9 @@ c++ -c Urho3DPlayer.cpp `pkg-config --cflags Urho3D`
 c++ -o Urho3DPlayer Urho3DPlayer.o `pkg-config --libs Urho3D`
 c++ -o Urho3DPlayer Urho3DPlayer.o `pkg-config --libs Urho3D`
 
 
 # To cross-compile and link for Raspberry Pi platform
 # To cross-compile and link for Raspberry Pi platform
-export CC=${RASPI_TOOL}/arm-linux-gnueabihf-c++
-export PKG_CONFIG_SYSROOT_DIR=${RASPI_ROOT}
-export PKG_CONFIG_PATH=${RASPI_ROOT}/usr/local/lib/pkgconfig
+export CC=${RPI_TOOL}/arm-linux-gnueabihf-c++
+export PKG_CONFIG_SYSROOT_DIR=${RPI_ROOT}
+export PKG_CONFIG_PATH=${RPI_ROOT}/usr/local/lib/pkgconfig
 $CC -o Urho3DPlayer Urho3DPlayer.cpp `pkg-config --cflags --libs Urho3D`
 $CC -o Urho3DPlayer Urho3DPlayer.cpp `pkg-config --cflags --libs Urho3D`
 
 
 # To cross-compile and link for Windows platform using MinGW cross-compiler (in Debug configuration)
 # To cross-compile and link for Windows platform using MinGW cross-compiler (in Debug configuration)

+ 1 - 1
Source/CMakeLists.txt

@@ -83,7 +83,7 @@ if (URHO3D_URHO2D)
     add_subdirectory (ThirdParty/Box2D)
     add_subdirectory (ThirdParty/Box2D)
 endif ()
 endif ()
 
 
-if (NOT IOS AND NOT ANDROID AND NOT RASPI)
+if (NOT IOS AND NOT ANDROID AND NOT RPI)
     if (URHO3D_OPENGL)
     if (URHO3D_OPENGL)
         add_subdirectory (ThirdParty/GLEW)
         add_subdirectory (ThirdParty/GLEW)
     else ()
     else ()

+ 1 - 1
Source/Engine/CMakeLists.txt

@@ -274,7 +274,7 @@ if (ANDROID_NDK_GDB)
     add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_NAME}> ${NDK_GDB_SOLIB_PATH}
     add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_NAME}> ${NDK_GDB_SOLIB_PATH}
         COMMENT "Copying Urho3D library with debug symbols to ${NDK_GDB_SOLIB_PATH} directory")
         COMMENT "Copying Urho3D library with debug symbols to ${NDK_GDB_SOLIB_PATH} directory")
 endif ()
 endif ()
-if (URHO3D_LIB_TYPE STREQUAL SHARED AND (ANDROID OR RASPI OR IOS))
+if (URHO3D_LIB_TYPE STREQUAL SHARED AND (ANDROID OR RPI OR IOS))
     # Strip the output shared library for embedded devices
     # Strip the output shared library for embedded devices
     add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${TARGET_NAME}>
     add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${TARGET_NAME}>
         COMMENT "Stripping Urho3D shared library")
         COMMENT "Stripping Urho3D shared library")

+ 1 - 1
Source/Engine/Core/CMakeLists.txt

@@ -24,6 +24,6 @@
 define_source_files (PARENT_SCOPE)
 define_source_files (PARENT_SCOPE)
 
 
 # Define dependency libs
 # Define dependency libs
-if (NOT IOS AND NOT ANDROID AND NOT RASPI)
+if (NOT IOS AND NOT ANDROID AND NOT RPI)
     set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/LibCpuId/src PARENT_SCOPE)
     set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/LibCpuId/src PARENT_SCOPE)
 endif ()
 endif ()

+ 7 - 7
Source/Engine/Core/ProcessUtils.cpp

@@ -34,7 +34,7 @@
 
 
 #if defined(IOS)
 #if defined(IOS)
 #include <mach/mach_host.h>
 #include <mach/mach_host.h>
-#elif !defined(ANDROID) && !defined(RASPI)
+#elif !defined(ANDROID) && !defined(RPI)
 #include <libcpuid.h>
 #include <libcpuid.h>
 #endif
 #endif
 
 
@@ -47,7 +47,7 @@
 
 
 #if defined(_MSC_VER)
 #if defined(_MSC_VER)
 #include <float.h>
 #include <float.h>
-#elif !defined(ANDROID) && !defined(IOS) && !defined(RASPI)
+#elif !defined(ANDROID) && !defined(IOS) && !defined(RPI)
 // From http://stereopsis.com/FPU.html
 // From http://stereopsis.com/FPU.html
 
 
 #define FPU_CW_PREC_MASK        0x0300
 #define FPU_CW_PREC_MASK        0x0300
@@ -91,7 +91,7 @@ static void GetCPUData(host_basic_info_data_t* data)
     infoCount = HOST_BASIC_INFO_COUNT;
     infoCount = HOST_BASIC_INFO_COUNT;
     host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)data, &infoCount);
     host_info(mach_host_self(), HOST_BASIC_INFO, (host_info_t)data, &infoCount);
 }
 }
-#elif !defined(ANDROID) && !defined(RASPI)
+#elif !defined(ANDROID) && !defined(RPI)
 static void GetCPUData(struct cpu_id_t* data)
 static void GetCPUData(struct cpu_id_t* data)
 {
 {
     if (cpu_identify(0, data) < 0)
     if (cpu_identify(0, data) < 0)
@@ -104,7 +104,7 @@ static void GetCPUData(struct cpu_id_t* data)
 
 
 void InitFPU()
 void InitFPU()
 {
 {
-    #if !defined(URHO3D_LUAJIT) && !defined(ANDROID) && !defined(IOS) && !defined(RASPI) && !defined(__x86_64__) && !defined(_M_AMD64)
+    #if !defined(URHO3D_LUAJIT) && !defined(ANDROID) && !defined(IOS) && !defined(RPI) && !defined(__x86_64__) && !defined(_M_AMD64)
     // Make sure FPU is in round-to-nearest, single precision mode
     // Make sure FPU is in round-to-nearest, single precision mode
     // This ensures Direct3D and OpenGL behave similarly, and all threads behave similarly
     // This ensures Direct3D and OpenGL behave similarly, and all threads behave similarly
     #ifdef _MSC_VER
     #ifdef _MSC_VER
@@ -347,7 +347,7 @@ String GetPlatform()
     return "Windows";
     return "Windows";
     #elif defined(__APPLE__)
     #elif defined(__APPLE__)
     return "Mac OS X";
     return "Mac OS X";
-    #elif defined(RASPI)
+    #elif defined(RPI)
     return "Raspberry Pi";
     return "Raspberry Pi";
     #elif defined(__linux__)
     #elif defined(__linux__)
     return "Linux";
     return "Linux";
@@ -393,7 +393,7 @@ unsigned GetNumPhysicalCPUs()
     #endif
     #endif
     #elif defined(ANDROID)
     #elif defined(ANDROID)
     return GetAndroidCPUCount();
     return GetAndroidCPUCount();
-    #elif !defined(ANDROID) && !defined(RASPI)
+    #elif !defined(ANDROID) && !defined(RPI)
     struct cpu_id_t data;
     struct cpu_id_t data;
     GetCPUData(&data);
     GetCPUData(&data);
     return data.num_cores;
     return data.num_cores;
@@ -415,7 +415,7 @@ unsigned GetNumLogicalCPUs()
     #endif
     #endif
     #elif defined(ANDROID)
     #elif defined(ANDROID)
     return GetAndroidCPUCount();
     return GetAndroidCPUCount();
-    #elif !defined(ANDROID) && !defined(RASPI)
+    #elif !defined(ANDROID) && !defined(RPI)
     struct cpu_id_t data;
     struct cpu_id_t data;
     GetCPUData(&data);
     GetCPUData(&data);
     return data.num_logical_cpus;
     return data.num_logical_cpus;

+ 1 - 1
Source/Engine/Engine/Engine.cpp

@@ -84,7 +84,7 @@ Engine::Engine(Context* context) :
     timeStep_(0.0f),
     timeStep_(0.0f),
     timeStepSmoothing_(2),
     timeStepSmoothing_(2),
     minFps_(10),
     minFps_(10),
-    #if defined(ANDROID) || defined(IOS) || defined(RASPI)
+    #if defined(ANDROID) || defined(IOS) || defined(RPI)
     maxFps_(60),
     maxFps_(60),
     maxInactiveFps_(10),
     maxInactiveFps_(10),
     pauseMinimized_(true),
     pauseMinimized_(true),

+ 1 - 1
Source/Engine/Graphics/CMakeLists.txt

@@ -29,7 +29,7 @@ endif ()
 define_source_files (GLOB_CPP_PATTERNS *.cpp ${GRAPHICS_SYS_DIR}/*.cpp GLOB_H_PATTERNS *.h ${GRAPHICS_SYS_DIR}/*.h PARENT_SCOPE)
 define_source_files (GLOB_CPP_PATTERNS *.cpp ${GRAPHICS_SYS_DIR}/*.cpp GLOB_H_PATTERNS *.h ${GRAPHICS_SYS_DIR}/*.h PARENT_SCOPE)
 
 
 # Define dependency libs
 # Define dependency libs
-if (URHO3D_OPENGL AND NOT IOS AND NOT ANDROID AND NOT RASPI)
+if (URHO3D_OPENGL AND NOT IOS AND NOT ANDROID AND NOT RPI)
     set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/GLEW PARENT_SCOPE)
     set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/GLEW PARENT_SCOPE)
 endif ()
 endif ()
 if (NOT URHO3D_OPENGL)
 if (NOT URHO3D_OPENGL)

+ 1 - 1
Source/Engine/Graphics/Light.h

@@ -44,7 +44,7 @@ enum LightType
 static const float SHADOW_MIN_QUANTIZE = 0.1f;
 static const float SHADOW_MIN_QUANTIZE = 0.1f;
 static const float SHADOW_MIN_VIEW = 1.0f;
 static const float SHADOW_MIN_VIEW = 1.0f;
 static const int MAX_LIGHT_SPLITS = 6;
 static const int MAX_LIGHT_SPLITS = 6;
-#if !defined(ANDROID) && !defined(IOS) && !defined(RASPI)
+#if !defined(ANDROID) && !defined(IOS) && !defined(RPI)
 static const int MAX_CASCADE_SPLITS = 4;
 static const int MAX_CASCADE_SPLITS = 4;
 #else
 #else
 static const int MAX_CASCADE_SPLITS = 1;
 static const int MAX_CASCADE_SPLITS = 1;

+ 1 - 1
Source/Engine/Graphics/OpenGL/OGLGraphics.cpp

@@ -355,7 +355,7 @@ bool Graphics::SetMode(int width, int height, bool fullscreen, bool borderless,
     }
     }
     
     
     // Check fullscreen mode validity (desktop only). Use a closest match if not found
     // Check fullscreen mode validity (desktop only). Use a closest match if not found
-    #if !defined(ANDROID) && !defined(IOS) && !defined(RASPI)
+    #if !defined(ANDROID) && !defined(IOS) && !defined(RPI)
     if (fullscreen)
     if (fullscreen)
     {
     {
         PODVector<IntVector2> resolutions = GetResolutions();
         PODVector<IntVector2> resolutions = GetResolutions();

+ 1 - 1
Source/Engine/Graphics/OpenGL/OGLGraphicsImpl.h

@@ -26,7 +26,7 @@
 #include "HashMap.h"
 #include "HashMap.h"
 #include "Timer.h"
 #include "Timer.h"
 
 
-#if defined(ANDROID) || defined (RASPI)
+#if defined(ANDROID) || defined (RPI)
 #include <GLES2/gl2.h>
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 #include <GLES2/gl2ext.h>
 #elif defined(IOS)
 #elif defined(IOS)

+ 2 - 2
Source/Engine/Graphics/OpenGL/OGLShaderVariation.cpp

@@ -145,9 +145,9 @@ bool ShaderVariation::Create()
         #endif
         #endif
     }
     }
     
     
-    #ifdef RASPI
+    #ifdef RPI
     if (type_ == VS)
     if (type_ == VS)
-        shaderCode += "#define RASPI\n";
+        shaderCode += "#define RPI\n";
     #endif
     #endif
 
 
     // When version define found, do not insert it a second time
     // When version define found, do not insert it a second time

+ 1 - 1
Source/Engine/Input/CMakeLists.txt

@@ -24,6 +24,6 @@
 define_source_files (PARENT_SCOPE)
 define_source_files (PARENT_SCOPE)
 
 
 # Define dependency libs
 # Define dependency libs
-if (URHO3D_OPENGL AND NOT IOS AND NOT ANDROID AND NOT RASPI)
+if (URHO3D_OPENGL AND NOT IOS AND NOT ANDROID AND NOT RPI)
     set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/GLEW PARENT_SCOPE)
     set (ENGINE_INCLUDE_DIRS_ONLY ${ENGINE_INCLUDE_DIRS_ONLY} ../ThirdParty/GLEW PARENT_SCOPE)
 endif ()
 endif ()

+ 1 - 1
Source/Engine/Input/Input.cpp

@@ -286,7 +286,7 @@ void Input::SetMouseVisible(bool enable, bool suppressEvent)
         enable = false;
         enable = false;
 
 
     // SDL Raspberry Pi "video driver" does not have proper OS mouse support yet, so no-op for now
     // SDL Raspberry Pi "video driver" does not have proper OS mouse support yet, so no-op for now
-    #ifndef RASPI
+    #ifndef RPI
     if (enable != mouseVisible_)
     if (enable != mouseVisible_)
     {
     {
         mouseVisible_ = enable;
         mouseVisible_ = enable;

+ 1 - 1
Source/ThirdParty/AngelScript/CMakeLists.txt

@@ -9,7 +9,7 @@ file (GLOB H_FILES
     include/*.h source/*.h
     include/*.h source/*.h
 )
 )
 
 
-if (IOS OR ANDROID OR RASPI)
+if (IOS OR ANDROID OR RPI)
     enable_language (ASM)
     enable_language (ASM)
     if (IOS)
     if (IOS)
         set (ASM_FILES source/as_callfunc_arm_xcode.S)
         set (ASM_FILES source/as_callfunc_arm_xcode.S)

+ 1 - 1
Source/ThirdParty/Assimp/include/assimp/Compiler/pushpack1.h

@@ -29,7 +29,7 @@
 #	pragma pack(push,1)
 #	pragma pack(push,1)
 #	define PACK_STRUCT
 #	define PACK_STRUCT
 #elif defined( __GNUC__ )
 #elif defined( __GNUC__ )
-#	if defined(__clang__) || defined(RASPI)
+#	if defined(__clang__) || defined(RPI)
 #		define PACK_STRUCT	__attribute__((__packed__))
 #		define PACK_STRUCT	__attribute__((__packed__))
 #	else
 #	else
 #		define PACK_STRUCT	__attribute__((gcc_struct, __packed__))
 #		define PACK_STRUCT	__attribute__((gcc_struct, __packed__))

+ 1 - 1
Source/ThirdParty/LuaJIT/CMakeLists.txt

@@ -156,7 +156,7 @@ if (CMAKE_CROSSCOMPILING OR IOS)
         set (BUILDVM_X buildvm-ios)
         set (BUILDVM_X buildvm-ios)
     elseif (ANDROID)
     elseif (ANDROID)
         set (BUILDVM_X buildvm-android-${ANDROID_NDK_ABI_NAME})
         set (BUILDVM_X buildvm-android-${ANDROID_NDK_ABI_NAME})
-    elseif (RASPI)
+    elseif (RPI)
         set (BUILDVM_X buildvm-raspi)
         set (BUILDVM_X buildvm-raspi)
     elseif (MINGW)
     elseif (MINGW)
         set (BUILDVM_X buildvm-mingw)
         set (BUILDVM_X buildvm-mingw)

+ 1 - 1
Source/ThirdParty/SDL/CMakeLists.txt

@@ -49,7 +49,7 @@ elseif (ANDROID)
     )
     )
 else ()
 else ()
     # On Linux, make sure development libraries exist, and use their include file directories  
     # On Linux, make sure development libraries exist, and use their include file directories  
-    if (RASPI)
+    if (RPI)
         file (GLOB VIDEO_DRIVER_C_FILES src/video/raspberry/*.c src/core/linux/*.c)
         file (GLOB VIDEO_DRIVER_C_FILES src/video/raspberry/*.c src/core/linux/*.c)
     else ()
     else ()
         find_package (OpenGL REQUIRED)
         find_package (OpenGL REQUIRED)

+ 1 - 1
Source/ThirdParty/SDL/include/SDL_config_linux.h

@@ -275,7 +275,7 @@
 #define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
 #define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
 
 
 // Urho3D: Use OpenGL ES 2 implementation from Broadcom VideoCore for Raspberry Pi
 // Urho3D: Use OpenGL ES 2 implementation from Broadcom VideoCore for Raspberry Pi
-#ifdef RASPI
+#ifdef RPI
 #undef SDL_VIDEO_DRIVER_X11			/* No X */
 #undef SDL_VIDEO_DRIVER_X11			/* No X */
 #define SDL_VIDEO_DRIVER_RPI 1
 #define SDL_VIDEO_DRIVER_RPI 1
 
 

+ 1 - 1
cmake_raspi.sh → cmake_rpi.sh

@@ -21,6 +21,6 @@
 # THE SOFTWARE.
 # THE SOFTWARE.
 #
 #
 
 
-$(dirname $0)/cmake_generic.sh $@ -DRASPI=1
+$(dirname $0)/cmake_generic.sh $@ -DRPI=1
 
 
 # vi: set ts=4 sw=4 expandtab:
 # vi: set ts=4 sw=4 expandtab: