From c64bbfd6eb6c4485076265c8be3c28ff3c18fdab Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Mon, 5 Nov 2018 01:19:55 +0100 Subject: Makefile: Use project-local build directory Set 'DerivedData' path in `xcodebuild` to give us a local build directory. Doing this because when the 'Debug', or 'Release' directories in 'Build/Products/' don't exist, Make doesn't build our recipes. Make seems to prefer local files, and I don't imagine the wildcard in the path does us any favours. When I changed the DerivedData path, I ended up with this error: In file included from DomeKey/DomeKey/HeadphoneKey.m:9: DomeKey/DomeKey/HeadphoneKey.h:10:9: fatal error: 'DDHidLib/DDHidAppleMikey.h' file not found #import ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Couldn't figure out what the problem was, and what changed there when I changed the DerivedData directory. So I just fixed it in the only way I could think of: adding the DDHidLib 'lib' directory to `HEADER_SEARCH_PATHS` and updating the `#import` to point to the new location. We also create a release target in this commit, which gives us a release build of the program. --- DomeKey.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) (limited to 'DomeKey.xcodeproj') diff --git a/DomeKey.xcodeproj/project.pbxproj b/DomeKey.xcodeproj/project.pbxproj index 110ee5b..3a36d4a 100644 --- a/DomeKey.xcodeproj/project.pbxproj +++ b/DomeKey.xcodeproj/project.pbxproj @@ -407,6 +407,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/lib/DDHidLib/lib"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/lib/dome-key-map/target/debug", @@ -421,6 +422,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; + HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/lib/DDHidLib/lib"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/lib/dome-key-map/target/debug", -- cgit v1.2.3