mirror of
https://gitee.com/houstudio/Cdroid.git
synced 2024-12-12 12:05:08 +08:00
38 lines
1.7 KiB
CMake
Executable File
38 lines
1.7 KiB
CMake
Executable File
|
|
SET(CMAKE_SYSTEM_NAME Linux)
|
|
if(1)
|
|
SET(TOOLCHAIN_DIR /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/)
|
|
set(CMAKE_CROSSCOMPILING true)
|
|
|
|
#set(CMAKE_C_FLAGS "-mfpu=neon -mfloat-abi=hard -Wno-error=pragmas")
|
|
#set(CMAKE_CXX_FLAGS "-mfpu=neon -mfloat-abi=hard -Wno-error=pragmas")
|
|
set(CMAKE_C_FLAGS "-mfpu=neon -mfloat-abi=softfp -Wno-error=pragmas")
|
|
set(CMAKE_CXX_FLAGS "-mfpu=neon -mfloat-abi=softfp -Wno-error=pragmas")
|
|
SET(CMAKE_SYSTEM_PROCESSOR arm)
|
|
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/arm-hisiv500-linux-g++)
|
|
SET(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/arm-hisiv500-linux-gcc)
|
|
SET(CMAKE_ASM_COMPILER ${TOOLCHAIN_DIR}/bin/arm-hisiv500-linux-gcc)
|
|
#SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_DIR})
|
|
elseif(0)
|
|
SET(TOOLCHAIN_DIR /opt/gcc-linaro-14.0.0-2023.06-x86_64_arm-linux-gnueabihf/)
|
|
set(CMAKE_CROSSCOMPILING true)
|
|
|
|
set(CMAKE_C_FLAGS "-std=gnu99 -mfpu=neon -mfloat-abi=hard")
|
|
set(CMAKE_CXX_FLAGS "-std=c++14 -mfpu=neon -mfloat-abi=hard")
|
|
SET(CMAKE_SYSTEM_PROCESSOR arm)
|
|
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/arm-linux-gnueabihf-g++)
|
|
SET(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/arm-linux-gnueabihf-gcc)
|
|
SET(CMAKE_ASM_COMPILER ${TOOLCHAIN_DIR}/bin/arm-linux-gnueabihf-gcc)
|
|
#SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_DIR})
|
|
else()
|
|
SET(TOOLCHAIN_DIR /opt/hisi-linux/x86-arm/arm-himix200-linux)
|
|
set(CMAKE_CROSSCOMPILING true)
|
|
set(CMAKE_C_FLAGS "-std=gnu99 -mfpu=neon -mfloat-abi=hard")
|
|
set(CMAKE_CXX_FLAGS "-std=c++14 -mfpu=neon -mfloat-abi=hard")
|
|
SET(CMAKE_SYSTEM_PROCESSOR arm)
|
|
SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/arm-himix200-linux-g++)
|
|
SET(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/arm-himix200-linux-gcc)
|
|
SET(CMAKE_ASM_COMPILER ${TOOLCHAIN_DIR}/bin/arm-himix200-linux-gcc)
|
|
#SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_DIR})
|
|
endif()
|