2014-12-24 23:15:55 +00:00
|
|
|
# Tell cmake we are cross compiling and targeting darwin
|
|
|
|
set(CMAKE_SYSTEM_NAME Darwin)
|
|
|
|
set(CMAKE_SYSTEM_PROCESSOR i686)
|
|
|
|
|
|
|
|
# Leave it generic since it could be clang, gnu, etc.
|
2015-01-04 05:56:47 +00:00
|
|
|
if("$ENV{CC}" STREQUAL "" OR "$ENV{CXX}" STREQUAL "")
|
|
|
|
set(CMAKE_C_COMPILER cc -m32)
|
|
|
|
set(CMAKE_CXX_COMPILER c++ -m32)
|
|
|
|
endif()
|
2014-12-24 23:15:55 +00:00
|
|
|
|
|
|
|
# If given a CMAKE_FIND_ROOT_PATH then
|
|
|
|
# FIND_PROGRAM ignores CMAKE_FIND_ROOT_PATH (probably can't run)
|
|
|
|
# FIND_{LIBRARY,INCLUDE,PACKAGE} only uses the files in CMAKE_FIND_ROOT_PATH.
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|