Build with WAF outside of source tree.

Update headers and search paths with new build logic.
This commit is contained in:
Romain Muller
2011-05-18 14:06:55 +02:00
parent 2a2761d354
commit 6d8982ab4b
7 changed files with 32 additions and 21 deletions
+9 -7
View File
@@ -503,7 +503,7 @@
F5B721C30E05CF7E00AF29DC /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
F5C007730E731B48007B84B2 /* PBGitRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitRef.h; sourceTree = "<group>"; };
F5C007740E731B48007B84B2 /* PBGitRef.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PBGitRef.m; sourceTree = "<group>"; };
F5C580E40EDA250900995434 /* libgit2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgit2.a; path = libgit2/libgit2.a; sourceTree = "<group>"; };
F5C580E40EDA250900995434 /* libgit2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgit2.a; sourceTree = BUILT_PRODUCTS_DIR; };
F5C6F68B0E65FF9300478D97 /* PBGitLane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitLane.h; sourceTree = "<group>"; };
F5C6F68C0E65FF9300478D97 /* PBGitLane.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PBGitLane.mm; sourceTree = "<group>"; };
F5D2DC850EA401A80034AD24 /* PBGitConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PBGitConfig.h; sourceTree = "<group>"; };
@@ -1616,13 +1616,14 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = GitX_Prefix.pch;
HEADER_SEARCH_PATHS = libgit2/src;
HEADER_SEARCH_PATHS = libgit2/include;
INFOPLIST_FILE = Info.plist;
INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
INFOPLIST_PREFIX_HEADER = $PROJECT_TEMP_DIR/revision;
INFOPLIST_PREPROCESS = YES;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = libgit2;
LIBRARY_SEARCH_PATHS = "";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = GitX;
SDKROOT = "";
WRAPPER_EXTENSION = app;
@@ -1643,13 +1644,13 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = GitX_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = "";
HEADER_SEARCH_PATHS = libgit2/src;
HEADER_SEARCH_PATHS = libgit2/include;
INFOPLIST_FILE = Info.plist;
INFOPLIST_OTHER_PREPROCESSOR_FLAGS = "-traditional";
INFOPLIST_PREFIX_HEADER = $PROJECT_TEMP_DIR/revision;
INFOPLIST_PREPROCESS = YES;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = libgit2;
LIBRARY_SEARCH_PATHS = "";
PRODUCT_NAME = GitX;
SDKROOT = "";
WRAPPER_EXTENSION = app;
@@ -1771,7 +1772,8 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
INSTALL_PATH = /usr/local/bin;
LIBRARY_SEARCH_PATHS = libgit2;
LIBRARY_SEARCH_PATHS = "";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"-framework",
Foundation,
@@ -1795,7 +1797,7 @@
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h";
INSTALL_PATH = /usr/local/bin;
LIBRARY_SEARCH_PATHS = libgit2;
LIBRARY_SEARCH_PATHS = "";
OTHER_LDFLAGS = (
"-framework",
Foundation,
+1 -1
View File
@@ -11,7 +11,7 @@
#import "PBGitLane.h"
#import "PBGitGraphLine.h"
#import <list>
#import "git/oid.h"
#import <git2/oid.h>
using namespace std;
+1 -1
View File
@@ -6,7 +6,7 @@
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#include "git/oid.h"
#include <git2/oid.h>
class PBGitLane {
static int s_colorIndex;
+1 -1
View File
@@ -7,7 +7,7 @@
//
#import <Cocoa/Cocoa.h>
#include "git/oid.h"
#include <git2/oid.h>
@interface PBGitSHA : NSObject <NSCopying> {
+1 -1
View File
@@ -7,7 +7,7 @@
//
#import "PBGitSHA.h"
#import <git2/errors.h>
@interface PBGitSHA ()
+18 -9
View File
@@ -9,20 +9,29 @@
# based on: http://log.yeahrightkeller.com/post/270155578/run-script-while-cleaning-in-xcode
buildAction () {
echo "Building libgit2..."
echo "Building libgit2..."
if [[ -d .git ]]
then
if [ "$(which git)" == "" ]; then
echo "git not found"
exit -1
fi
if [ "$(which git)" == "" ]; then
echo "git not found"
exit -1
fi
git submodule init
git submodule sync
git submodule update
cd libgit2
rm -f libgit2.a
make CFLAGS="-arch i386 -arch ppc"
ranlib libgit2.a
./waf --out=$TARGET_TEMP_DIR --prefix=$TARGET_BUILD_DIR configure
if [ $? != 0 ]; then
echo "error: failed to waf configure"
exit -1
fi
./waf build-static
if [ $? != 0 ]; then
echo "error: failed to waf build-static"
exit -1
fi
ranlib $TARGET_TEMP_DIR/static/libgit2.a
cp $TARGET_TEMP_DIR/static/libgit2.a $TARGET_BUILD_DIR
else
echo "error: Not a git repository."
echo "error: clone GitX first so that the libgit2 submodule can be updated"
@@ -33,7 +42,7 @@ buildAction () {
cleanAction () {
echo "Cleaning libgit2..."
cd libgit2
make clean
./waf clean
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+1 -1
Submodule libgit2 updated: 40774549e1...d1685ac7e9