Esteban Lorenzano uploaded a new version of CMakeVMMaker to project VM Maker: http://source.squeak.org/VMMaker/CMakeVMMaker-EstebanLorenzano.211.mcz
==================== Summary ====================
Name: CMakeVMMaker-EstebanLorenzano.211 Author: EstebanLorenzano Time: 10 July 2013, 12:55:47.047 pm UUID: a8ca745d-b095-4e54-a231-d81692523ba0 Ancestors: CMakeVMMaker-EstebanLorenzano.210
- fixes for building iOS in 2.0
=============== Diff against CMakeVMMaker-EstebanLorenzano.210 ===============
Item was changed: ----- Method: StackIPhoneConfig>>buildScript (in category 'build script') ----- buildScript "answer the build script for building everything"
^ '#!!bash
if [ !! -e vmVersionInfo.h ]; then ../codegen-scripts/extract-commit-info.sh fi cmake -G Xcode . + xcodebuild -sdk {2} -configuration Release -target {1} - xcodebuild -sdk {sdk} -configuration Release -target {name}
+ ' format: {self executableName. self sdkTarget}! - ' nameFormat: {#name->self executableName. #sdk->self sdkTarget} asDictionary!
Item was changed: ----- Method: StackIPhoneConfig>>commonCompilerFlags (in category 'settings') ----- commonCompilerFlags "Common compiler flags" ^{ "'-miphoneos-version-min=4.3'. " + '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer/SDKs/{1}{2}.sdk' format: { self targetDevice. self sdkVersion}. - '-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/{target}.platform/Developer/SDKs/{target}{sdkVersion}.sdk' nameFormat: { 'target'-> self targetDevice. 'sdkVersion'->self sdkVersion} asDictionary. '-x objective-c'. '-std=gnu99'. '-falign-functions=16'. '-fno-gcse'. '-fno-cse-follow-jumps'. '-fvisibility=hidden'. '-funroll-loops'. '-finline-functions'. '-mno-thumb'. '-fwrapv'. '-DSTACKVM=1'. '-DCOGMTVM=0'. '-DUSE_GLOBAL_STRUCT=0'. '-DBASE_HEADER_SIZE=4'. '-DTARGET_OS_IS_IPHONE'. '-DHAVE_UUID_GENERATE'. "'-DUSE_INLINE_MEMORY_ACCESSORS'. " '-DHAVE_SYS_TIME_H'. '-DLSB_FIRST'. '-DHAVE_NANOSLEEP'. '-DISQUEAK_IMAGE=', self imageName. '-DISQUEAK_SOURCES=PharoV10'. '-DSTACKVM'}!
Item was changed: ----- Method: StackIPhoneConfig>>configureFT2Plugin: (in category 'plugin extra rules') ----- configureFT2Plugin: maker "extra rules for Freetype plugin. a custom rule to build freetype library" | lib devRoot sdkRoot |
+ devRoot := '/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer' + format: { self targetDevice}. + sdkRoot := '{1}/SDKs/{2}{3}.sdk' + format: { devRoot. self targetDevice. self sdkVersion}. - devRoot := '/Applications/Xcode.app/Contents/Developer/Platforms/{target}.platform/Developer' - nameFormat: { 'target'->self targetDevice} asDictionary. - sdkRoot := '{devRoot}/SDKs/{target}{sdkVersion}.sdk' - nameFormat: { - 'devRoot'->devRoot. - 'target'->self targetDevice. - 'sdkVersion'->self sdkVersion} asDictionary.
"add freetype library into loop" lib := self addThirdpartyLibrary: 'freetype2'. lib configurationFlags: ({ '--without-zlib'. '--without-bzip2'. '--host=arm-apple-darwin'. '--enable-static=yes'. '--enable-shared=no'. + 'CC={3}/usr/bin/gcc'. + 'CXX={3}/usr/bin/g++'. + 'CFLAGS=\"-arch {1} -std=c99 -Wno-trigraphs -O2 -fwrapv -Wreturn-type -Wunused-variable -fmessage-length=0 -miphoneos-version-min=4.0 -I{2}/usr/include/libxml2 -isysroot {2}\"'. + 'LDFLAGS=\"-arch {1} -isysroot {2}\"'} + collect: [ :each | each format: { self architecture. sdkRoot. devRoot} ]). - 'CC={devRoot}/usr/bin/gcc'. - 'CXX={devRoot}/usr/bin/g++'. - 'CFLAGS=\"-arch {architecture} -std=c99 -Wno-trigraphs -O2 -fwrapv -Wreturn-type -Wunused-variable -fmessage-length=0 -miphoneos-version-min=4.0 -I{sdkRoot}/usr/include/libxml2 -isysroot {sdkRoot}\"'. - 'LDFLAGS=\"-arch {architecture} -isysroot {sdkRoot}\"'} - collect: [ :each | each nameFormat: { - 'architecture'->self architecture. - 'sdkRoot'->sdkRoot. - 'devRoot'->devRoot} asDictionary ]).
"link plugin with freetype lib" maker addExternalLibrary: '${thirdpartyDir}/out/lib/', lib libraryFileName. maker includeDirectories: lib includeDir. !
Item was changed: ----- Method: StackIPhoneConfig>>setCommonProperties: (in category 'settings') ----- setCommonProperties: maker maker set: 'CMAKE_CROSSCOMPILING' to: 'TRUE'. maker set: 'CMAKE_SYSTEM_NAME' to: 'Darwin'. maker set: 'CMAKE_SYSTEM_PROCESSOR' to: 'arm'.
maker set: 'SDKVER' toString: self sdkVersion. + maker set: 'DEVROOT' toString: ('/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer' + format: { self targetDevice }). - maker set: 'DEVROOT' toString: ('/Applications/Xcode.app/Contents/Developer/Platforms/{target}.platform/Developer' - nameFormat: {'target'->self targetDevice} asDictionary). maker set: 'SDKROOT' toString: '${DEVROOT}/SDKs/', self targetDevice,'${SDKVER}.sdk'.
maker set: 'CMAKE_OSX_SYSROOT' to: 'iphoneos${SDKVER}'. maker set: 'CMAKE_FIND_ROOT_PATH' to: '"${SDKROOT}" "${DEVROOT}"'. maker set: 'CMAKE_FIND_ROOT_PATH_MODE_PROGRAM' to: 'ONLY'. maker set: 'CMAKE_FIND_ROOT_PATH_MODE_LIBRARY' to: 'ONLY'. maker set: 'CMAKE_FIND_ROOT_PATH_MODE_INCLUDE' to: 'ONLY'. maker set: 'CMAKE_EXE_LINKER_FLAGS' toString: '--sysroot ${SDKROOT} -L${SDKROOT}/usr/lib -L${SDKROOT}/usr/lib/system'. maker set: 'CMAKE_C_FLAGS' toString: '--sysroot ${SDKROOT} -L${SDKROOT}/usr/lib -L${SDKROOT}/usr/lib/system'. maker set: 'CMAKE_CXX_FLAGS' toString: '--sysroot ${SDKROOT} -L${SDKROOT}/usr/lib -L${SDKROOT}/usr/lib/system'.
maker addFrameworks: self frameworks.!
Item was changed: ----- Method: StackIPhoneConfig>>setExtraTargetProperties: (in category 'settings') ----- setExtraTargetProperties: maker "super setExtraTargetProperties: maker."
| precompiledHeaders plist | precompiledHeaders := (self executableName, '_Prefix.pch'). + (FileStream forceNewFileNamed: (maker buildDir / precompiledHeaders) fullName) - (maker buildDir forceNewFileNamed: precompiledHeaders) nextPutAll: self precompiledHeaders; close. maker addXCodeProperty: 'GCC_PREFIX_HEADER' value: '${buildDir}/', precompiledHeaders. self setCommonProperties: maker.
" generated and add Info.plist file " plist := self plistFile. + (FileStream forceNewFileNamed: (maker buildDir / 'Info.plist') fullName) - (maker buildDir forceNewFileNamed: 'Info.plist') nextPutAll: plist; close.
maker addProperty: 'MACOSX_BUNDLE_INFO_PLIST' value: '${buildDir}/Info.plist'. maker cmd: 'set_target_properties' params: self executableName, ' PROPERTIES COMPILE_FLAGS "-include "', (self buildDir / self prefixHeaderFileName) fullName, '""'.
maker set: 'CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY' toString: self codeSignIdentity. maker set: 'CMAKE_XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY' toString: self targetedDeviceFamilyAsString. maker set: 'CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET' to: self deploymentTargetVersion. maker set: 'CMAKE_XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR' toString: '$(BUILD_DIR)/$(CONFIGURATION)'. maker set: 'CMAKE_XCODE_ATTRIBUTE_CONFIGURATION_TEMP_DIR' toString: '$(BUILD_DIR)/$(CONFIGURATION)'.
+ maker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir fullName. - maker set: 'EXECUTABLE_OUTPUT_PATH' toString: self outputDir. maker puts: 'set_source_files_properties(${srcVMDir}/gcc3x-cointerp.c PROPERTIES COMPILE_FLAGS -O0)' !
Item was changed: ----- Method: StackIPhoneConfig>>setGlobalOptionsAfterDetermineSystem: (in category 'utils') ----- setGlobalOptionsAfterDetermineSystem: maker self setGlobalOptions: maker. maker set: 'CMAKE_OSX_SYSROOT' + to: ('/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer/SDKs/{1}{2}.sdk' + format: { self targetDevice. self sdkVersion })! - to: ('/Applications/Xcode.app/Contents/Developer/Platforms/{target}.platform/Developer/SDKs/{target}{sdkVersion}.sdk' - nameFormat: { 'target'->self targetDevice. 'sdkVersion'->self sdkVersion } asDictionary)!
Item was changed: ----- Method: StackSimulatorConfig>>standardIncludes (in category 'source files') ----- standardIncludes + ^super standardIncludes, {'/Applications/Xcode.app/Contents/Developer/Platforms/{1}.platform/Developer/SDKs/{1}{2}.sdk/usr/include/' + format: { self targetDevice. self sdkVersion} } - ^super standardIncludes, {'/Applications/Xcode.app/Contents/Developer/Platforms/{target}.platform/Developer/SDKs/{target}{sdkVersion}.sdk/usr/include/' - nameFormat: {'target'->self targetDevice. 'sdkVersion'->self sdkVersion} asDictionary} !
Item was removed: - ----- Method: String>>nameFormat: (in category '*cmakevmmaker-extensions') ----- - nameFormat: aDictionary - "format the receiver with aDictionary - - simplest example: - 'foo {name} bar' format: {'name'->value}. - " - | result stream | - result := String new writeStream. - stream := self readStream. - - [stream atEnd] - whileFalse: [| currentChar | - currentChar := stream next. - currentChar == ${ - ifTrue: [| expression | - expression := self getEnclosedExpressionFrom: stream. - result nextPutAll: (aDictionary at: expression ifAbsent: [ 'UNDEFINED' ]) asString ] - ifFalse: [ - currentChar == $\ - ifTrue: [ - stream atEnd - ifFalse: [result nextPut: stream next]] - ifFalse: [result nextPut: currentChar]]]. - - ^ result contents!
vm-dev@lists.squeakfoundation.org