Mac M1 build fix proposal avoiding mixing up with homwbrew for Rosetta
as well.
This commit is contained in:
parent
b77bd9816d
commit
2899cf8977
@ -42,11 +42,21 @@ CMAKE_DEPENDENT_OPTION(USE_WIIUSE "Support for wiimote input devices" ON
|
|||||||
"NOT SERVER_ONLY;NOT CYGWIN" OFF)
|
"NOT SERVER_ONLY;NOT CYGWIN" OFF)
|
||||||
|
|
||||||
if(APPLE AND NOT IOS)
|
if(APPLE AND NOT IOS)
|
||||||
list(APPEND CMAKE_PREFIX_PATH /usr/local/opt)
|
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
|
||||||
include_directories(/usr/local/opt/openssl@1.1/include/)
|
set(ARCHFLAGS "arm64")
|
||||||
include_directories(/usr/local/opt/openssl@1.1/include/openssl/)
|
list(APPEND CMAKE_PREFIX_PATH /opt/homebrew/opt)
|
||||||
include_directories(/usr/local/opt/freetype/include/freetype2/)
|
include_directories(/opt/homebrew/opt/openssl@1.1/include/)
|
||||||
include_directories(/usr/local/opt/harfbuzz/include/harfbuzz/)
|
include_directories(/opt/homebrew/opt/openssl@1.1/include/openssl/)
|
||||||
|
include_directories(/opt/homebrew/opt/freetype/include/freetype2/)
|
||||||
|
include_directories(/opt/homebrew/opt/harfbuzz/include/harfbuzz/)
|
||||||
|
else()
|
||||||
|
set(ARCHFLAGS "${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
list(APPEND CMAKE_PREFIX_PATH /usr/local/opt)
|
||||||
|
include_directories(/usr/local/opt/openssl@1.1/include/)
|
||||||
|
include_directories(/usr/local/opt/openssl@1.1/include/openssl/)
|
||||||
|
include_directories(/usr/local/opt/freetype/include/freetype2/)
|
||||||
|
include_directories(/usr/local/opt/harfbuzz/include/harfbuzz/)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (IOS)
|
if (IOS)
|
||||||
@ -317,8 +327,8 @@ endif()
|
|||||||
include_directories(${STK_SOURCE_DIR})
|
include_directories(${STK_SOURCE_DIR})
|
||||||
|
|
||||||
if(APPLE AND NOT IOS)
|
if(APPLE AND NOT IOS)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch ${ARCHFLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch ${ARCHFLAGS} -F/Library/Frameworks")
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") # Enable multi-processor compilation (faster)
|
||||||
endif()
|
endif()
|
||||||
|
@ -116,7 +116,7 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
|
|||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
if(CMAKE_ASM_COMPILER_WORKS)
|
if(CMAKE_ASM_COMPILER_WORKS)
|
||||||
set(ANGELSCRIPT_SOURCE ${ANGELSCRIPT_SOURCE} ../../source/as_callfunc_arm.cpp ../../source/as_callfunc_arm_gcc.S)
|
set(ANGELSCRIPT_SOURCE ${ANGELSCRIPT_SOURCE} ../../source/as_callfunc_arm.cpp ../../source/as_callfunc_arm_gcc.S)
|
||||||
if (NOT IOS)
|
if (NOT APPLE)
|
||||||
set_property(SOURCE ../../source/as_callfunc_arm_gcc.S APPEND PROPERTY COMPILE_FLAGS " -Wa,-mimplicit-it=always")
|
set_property(SOURCE ../../source/as_callfunc_arm_gcc.S APPEND PROPERTY COMPILE_FLAGS " -Wa,-mimplicit-it=always")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/)
|
||||||
|
|
||||||
if(APPLE AND NOT IOS)
|
if(APPLE AND NOT IOS)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch ${ARCHFLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch ${ARCHFLAGS} -F/Library/Frameworks")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# libbulletmath
|
# libbulletmath
|
||||||
|
@ -25,8 +25,8 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(APPLE AND NOT IOS)
|
if(APPLE AND NOT IOS)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch ${ARCHFLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch ${ARCHFLAGS} -F/Library/Frameworks")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(HAS_FCNTL)
|
if(HAS_FCNTL)
|
||||||
|
@ -29,8 +29,8 @@ endif()
|
|||||||
|
|
||||||
if(APPLE AND NOT IOS)
|
if(APPLE AND NOT IOS)
|
||||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/MacOSX" "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht")
|
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht/MacOSX" "${CMAKE_CURRENT_SOURCE_DIR}/source/Irrlicht")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch ${ARCHFLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch ${ARCHFLAGS} -F/Library/Frameworks")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DNDEBUG=1 -DIRRLICHT_EXPORTS=1 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES)
|
add_definitions(-DNDEBUG=1 -DIRRLICHT_EXPORTS=1 -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES)
|
||||||
|
Loading…
Reference in New Issue
Block a user