Commit 41dba205 authored by Ilya Prokhorov's avatar Ilya Prokhorov

osxcross changes

parent 81291af9
......@@ -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()
if (EMSCRIPTEN)
set(CMAKE_CXX_FLAGS "-s USE_SDL=2 -s USE_SDL_TTF=2 -s USE_SDL_IMAGE=2 -s USE_LIBPNG=1 -s ASSERTIONS=1 -s SDL2_IMAGE_FORMATS='[\"png\"]' -s DISABLE_EXCEPTION_CATCHING=0 -O3 --no-heap-copy")
endif()
......@@ -28,6 +38,8 @@ if (EMSCRIPTEN)
add_library(FlameSteelCommonTraits STATIC ${SOURCE_FILES})
elseif (MINGW32)
add_library(FlameSteelCommonTraits.dll SHARED ${SOURCE_FILES})
elseif (OSXCROSS)
add_library(FlameSteelCommonTraits STATIC ${SOURCE_FILES})
else()
add_library(FlameSteelCommonTraits SHARED ${SOURCE_FILES})
endif()
......
source ~/Apps/osxcross.sh
mkdir osxCrossBuild
cd osxCrossBuild
ar x ../libFlameSteelCommonTraits.a
rm ../libFlameSteelCommonTraits.a
x86_64-apple-darwin19-ar rcs ../libFlameSteelCommonTraits.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