Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

adjust header locations #776

Closed
wants to merge 1 commit into from

2 participants

@diederich

[Build] adjust and simplify header handling
public headers from Three20's static libraries now
go to $(TARGET_BUILD_DIR)/include/$(PRODUCT_NAME).
We choose this folder, as Xcode automatically adds "$(TARGET_BUILD_DIR)/include"
to HEADER_SEARCH_PATH of a target.
Thus includes in your apps of the form "#import "Three20UI/Three20UI.h" just work™.

Unfortunately this does not happen for Archive builds, so we need to do it manually in that case:
"$(OBJROOT)/UninstalledProducts/include" (see src/common/Configuration/Paths.xcconfig)

The old way of moving the headers out of Release-xxx/Debug-xxx folders is bad:
first it doesn't allow Xcode to clean the headers during a "clean project" and second,
we might have different(ly processed) headers for Debug and Release builds.

This is probably a breaking change for existing apps and their "Archive" phase. Still I'm sending this pull request to think about it and to get some feedback....

@diederich diederich [Build] adjust and simplify header handling
public headers from Three20's static libraries now
go to $(TARGET_BUILD_DIR)/include/$(PRODUCT_NAME).
We choose this folder, as Xcode automatically adds "$(TARGET_BUILD_DIR)/include"
to HEADER_SEARCH_PATH of a target.
Thus includes in your apps of the form "#import "Three20UI/Three20UI.h" just work™.

Unfortunately this does not happen for Archive builds, so we need to do it manually in that case:
"$(OBJROOT)/UninstalledProducts/include" (see src/common/Configuration/Paths.xcconfig)

The old way of moving the headers out of Release-xxx/Debug-xxx folders is bad:
first it doesn't allow Xcode to clean the headers during a "clean project" and second,
we might have different(ly processed) headers for Debug and Release builds.
a384a59
@jamesgpearce

Facebook has not maintained or supported Three20 for some time, and we are closing its old and outstanding pull requests.

Many, many thanks for your support of the project. If you have any further questions, please don't hesitate to let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 7, 2012
  1. @diederich

    [Build] adjust and simplify header handling

    diederich authored
    public headers from Three20's static libraries now
    go to $(TARGET_BUILD_DIR)/include/$(PRODUCT_NAME).
    We choose this folder, as Xcode automatically adds "$(TARGET_BUILD_DIR)/include"
    to HEADER_SEARCH_PATH of a target.
    Thus includes in your apps of the form "#import "Three20UI/Three20UI.h" just work™.
    
    Unfortunately this does not happen for Archive builds, so we need to do it manually in that case:
    "$(OBJROOT)/UninstalledProducts/include" (see src/common/Configuration/Paths.xcconfig)
    
    The old way of moving the headers out of Release-xxx/Debug-xxx folders is bad:
    first it doesn't allow Xcode to clean the headers during a "clean project" and second,
    we might have different(ly processed) headers for Debug and Release builds.
This page is out of date. Refresh to see the latest.
View
6 src/common/Configurations/Library.xcconfig
@@ -14,9 +14,9 @@
// limitations under the License.
//
-HEADERS_FOLDER_PATH = /../three20/
-PRIVATE_HEADERS_FOLDER_PATH = $(HEADERS_FOLDER_PATH)$(BASE_PRODUCT_NAME)/private
-PUBLIC_HEADERS_FOLDER_PATH = $(HEADERS_FOLDER_PATH)$(BASE_PRODUCT_NAME)
+PUBLIC_HEADERS_FOLDER_PATH = include/$(BASE_PRODUCT_NAME)
+PRIVATE_HEADERS_FOLDER_PATH = $(PUBLIC_HEADERS_FOLDER_PATH)/private
+
GCC_PRECOMPILE_PREFIX_HEADER = YES
GCC_PREFIX_HEADER = $(SRCROOT)/Headers/$(BASE_PRODUCT_NAME)_Prefix.pch
View
21 src/common/Configurations/Paths.xcconfig
@@ -17,25 +17,10 @@
REPO_ROOT_PATH = $(SRCROOT)/../..
ROOT_SOURCE_PATH = $(REPO_ROOT_PATH)/src
-OBJROOT = $(REPO_ROOT_PATH)/Build
-SYMROOT = $(OBJROOT)/Products
-
// Search Paths
LIBRARY_SEARCH_PATHS = $(STDLIB_LIBRARY)
-// Header search paths: why we have three
-//
-// CONFIGURATION_BUILD_DIR is for when the headers are copied to Three20's Build folder.
-// Applies to:
-// - Xcode 3.2.#
-// - Xcode 4 with the Build Location preference set to "Place build products in locations
-// specified by targets"
-//
-// BUILT_PRODUCTS_DIR is for Xcode 4 support only. We need two copies of a BUILT_PRODUCTS_DIR path
-// because on Archive builds, there is one extra folder placed between the
-// product and the public header path.
-// Applies to:
-// - Xcode 4 only
-
-HEADER_SEARCH_PATHS = $(STDLIB_HEADERS) "$(BUILT_PRODUCTS_DIR)/../three20" "$(BUILT_PRODUCTS_DIR)/../../three20" "$(CONFIGURATION_BUILD_DIR)/../../three20"
+//add $(UninstalledProducts)/include to make archive-builds work
+// (which don't have it added by default)
+HEADER_SEARCH_PATHS = $(STDLIB_HEADERS) "$(OBJROOT)/UninstalledProducts/include"
View
3  src/extThree20CSSStyle/Configurations/Library.xcconfig
@@ -20,6 +20,3 @@
BASE_PRODUCT_NAME = extThree20CSSStyle
PRODUCT_NAME = $(BASE_PRODUCT_NAME)
BUILD_LIBRARY_VERSION = 1.0
-
-PRIVATE_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)/private
-PUBLIC_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)
View
5 src/extThree20JSON/Configurations/Library+SBJSON.xcconfig
@@ -21,9 +21,4 @@ BASE_PRODUCT_NAME = extThree20JSON
PRODUCT_NAME = $(BASE_PRODUCT_NAME)+SBJSON
BUILD_LIBRARY_VERSION = 1.0
-// We override these paths in order to copy the headers to the same directory,
-// regardless of target.
-PRIVATE_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)/private
-PUBLIC_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)
-
GCC_PREFIX_HEADER = $(SRCROOT)/Headers/$(BASE_PRODUCT_NAME)+SBJSON_Prefix.pch
View
5 src/extThree20JSON/Configurations/Library+YAJL.xcconfig
@@ -21,9 +21,4 @@ BASE_PRODUCT_NAME = extThree20JSON
PRODUCT_NAME = $(BASE_PRODUCT_NAME)+YAJL
BUILD_LIBRARY_VERSION = 1.0
-// We override these paths in order to copy the headers to the same directory,
-// regardless of target.
-PRIVATE_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)/private
-PUBLIC_HEADERS_FOLDER_PATH = /../three20/$(BASE_PRODUCT_NAME)
-
GCC_PREFIX_HEADER = $(SRCROOT)/Headers/$(BASE_PRODUCT_NAME)+YAJL_Prefix.pch
View
5 src/scripts/Protect.command
@@ -23,9 +23,10 @@ IFS=$'\n'
# In Xcode 4 Archive builds, there is one extra folder placed between the configuration build
# dir and the public headers path titled "ArchiveIntermediates".
if [[ "$DEPLOYMENT_LOCATION" == "YES" && "$XCODE_VERSION_MAJOR" -ge "0400" ]]; then
- cd ${CONFIGURATION_BUILD_DIR}/..${PUBLIC_HEADERS_FOLDER_PATH}
+ echo ${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}
+ cd ${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}
else
- cd ${CONFIGURATION_BUILD_DIR}${PUBLIC_HEADERS_FOLDER_PATH}
+ cd ${CONFIGURATION_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}
fi
chmod a-w *.h 2>> /dev/null
Something went wrong with that request. Please try again.