Commit bd83efeb authored by Ilya Prokhorov's avatar Ilya Prokhorov

osxcross changes

parent c0bf6608
......@@ -14,6 +14,16 @@ SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
set(CMAKE_RANLIB i686-w64-mingw32-ranlib)
endif()
if (OSXCROSS)
SET(CMAKE_SYSTEM_NAME Darwin)
SET(CMAKE_C_COMPILER o64-clang)
SET(CMAKE_CXX_COMPILER o64-clang++)
SET(CMAKE_C_COMPILER_AR x86_64-apple-darwin19-ar)
SET(CMAKE_CXX_COMPILER_AR x86_64-apple-darwin19-ar)
SET(CMAKE_LINKER x86_64-apple-darwin19-ld)
SET(ENV{OSXCROSS_MP_INC} 1)
endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src include /usr/local/include/FlameSteelFramework)
file(GLOB_RECURSE SOURCE_FILES
......@@ -24,6 +34,8 @@ if (EMSCRIPTEN)
add_library(FlameSteelBattleHorn STATIC ${SOURCE_FILES})
elseif (MINGW32)
add_library(FlameSteelBattleHorn.dll SHARED ${SOURCE_FILES})
elseif (OSXCROSS)
add_library(FlameSteelBattleHorn STATIC ${SOURCE_FILES})
else()
add_library(FlameSteelBattleHorn SHARED ${SOURCE_FILES})
endif()
......
source ~/Apps/osxcross.sh
mkdir osxCrossBuild
cd osxCrossBuild
ar x ../libFlameSteelBattleHorn.a
rm ../libFlameSteelBattleHorn.a
x86_64-apple-darwin19-ar rcs ../libFlameSteelBattleHorn.a *.o
cd ..
rm -rf osxCrossBuild
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment