Added Mac build scripts

This commit is contained in:
ccremers 2007-01-08 13:41:39 +00:00
parent 7978eb6716
commit 41021072fa
3 changed files with 17 additions and 2 deletions

View File

@ -0,0 +1,11 @@
################################################################
# Name: BuildMacIntel-MacPPC.cmake
# Purpose: Build MacPPC binary on MacIntel
# Author: Cas Cremers
################################################################
message (STATUS "Building Apple Mac PPC version")
set (scythername "scyther-macppc")
add_executable (${scythername} ${Scyther_sources})
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fnested-functions -arch ppc")

View File

@ -7,5 +7,5 @@
message (STATUS "Building Apple Mac Intel version")
set (scythername "scyther-macintel")
add_executable (${scythername} ${Scyther_sources})
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fnested-functions")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fnested-functions -arch i386")

View File

@ -7,16 +7,20 @@
# Retrieve Source_OS, Destination_OS (from -DTARGET)
include (GetOS.cmake)
message (STATUS "Test ${Source_OS} ${Destination_OS}")
# From source_os and destination_os make a new name for the build script
if (Source_OS STREQUAL Destination_OS)
set (BuildScriptName "Build${Source_OS}.cmake")
else (Source_OS STREQUAL Destination_OS)
set (BuildScriptName "Build${Source_OS}-${Destination_OS}.cmake")
endif (Source_OS STREQUAL Destination_OS)
message (STATUS "Locating platform specific file ${BuildScriptName}")
# Locate the file. If it exists, start it
find_file (BuildScriptFile "${BuildScriptName}")
if (BuildScriptFile)
# Execute the build script
include (${BuildScriptFile})
include (${BuildScriptName})
else (BuildScriptFile)
# Could not find it!
message (STATUS "Could not find ${BuildScriptName}")