diff --git a/platform-android/CMakeLists.txt b/platform-android/CMakeLists.txt index abdd7dcd..0e00af43 100644 --- a/platform-android/CMakeLists.txt +++ b/platform-android/CMakeLists.txt @@ -13,7 +13,7 @@ add_library( mpw SHARED add_library( sodium SHARED IMPORTED ) set_target_properties( sodium PROPERTIES IMPORTED_LOCATION "${PROJECT_SOURCE_DIR}/../lib/libsodium/build-android~/out/lib/${ANDROID_ABI}/libsodium.so" ) -target_include_directories( mpw PRIVATE "${PROJECT_SOURCE_DIR}/../lib/libsodium/src/libsodium/include" ) +target_include_directories( mpw PRIVATE "${PROJECT_SOURCE_DIR}/../lib/libsodium/build-android~/out/include" ) target_compile_definitions( mpw PRIVATE -DMPW_SODIUM=1 ) target_link_libraries( mpw PRIVATE sodium ) diff --git a/platform-darwin/MasterPassword-JNI.xcodeproj/project.pbxproj b/platform-darwin/MasterPassword-JNI.xcodeproj/project.pbxproj index cc2eb806..c9e1bbbc 100644 --- a/platform-darwin/MasterPassword-JNI.xcodeproj/project.pbxproj +++ b/platform-darwin/MasterPassword-JNI.xcodeproj/project.pbxproj @@ -62,7 +62,7 @@ DA1554ED20B3928E00EA92C5 /* mpw-util.h */, ); name = core; - path = ../platform-independent/c/core/src; + path = "../platform-independent/c/core/src"; sourceTree = ""; }; /* End PBXGroup section */ @@ -129,8 +129,9 @@ isa = XCBuildConfiguration; buildSettings = { HEADER_SEARCH_PATHS = ( - "/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/include/**", - ../lib/libsodium/src/libsodium/include, + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", ); JAVA_HOME = /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home; OTHER_CFLAGS = ( @@ -144,8 +145,9 @@ isa = XCBuildConfiguration; buildSettings = { HEADER_SEARCH_PATHS = ( - "/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/include/**", - ../lib/libsodium/src/libsodium/include, + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", ); JAVA_HOME = /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home; OTHER_CFLAGS = ( diff --git a/platform-darwin/MasterPassword-iOS.xcodeproj/project.pbxproj b/platform-darwin/MasterPassword-iOS.xcodeproj/project.pbxproj index c4930045..28a1f72b 100644 --- a/platform-darwin/MasterPassword-iOS.xcodeproj/project.pbxproj +++ b/platform-darwin/MasterPassword-iOS.xcodeproj/project.pbxproj @@ -1783,7 +1783,7 @@ 93D39CF7DB942C69D1C5D6BE /* mpw-util.h */, ); name = core; - path = ../platform-independent/c/core/src; + path = "../platform-independent/c/core/src"; sourceTree = ""; }; DA0CC4F41EAB99BA009A8ED9 /* Resources */ = { @@ -4311,8 +4311,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(PROJECT_DIR)/External/libsodium/libsodium-ios/include\"", - "\"$(PROJECT_DIR)/External/libjson-c/libjson-c-ios/include\"", "$(inherited)", ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -4348,13 +4346,19 @@ GCC_C_LANGUAGE_STANDARD = c11; GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch"; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + HEADER_SEARCH_PATHS = ( + "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", + ); INFOPLIST_FILE = "Source/iOS/MasterPassword-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib", - "$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib\"", ); OTHER_CFLAGS = ( "-DMPW_SODIUM=1", @@ -4526,8 +4530,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(PROJECT_DIR)/External/libsodium/libsodium-ios/include\"", - "\"$(PROJECT_DIR)/External/libjson-c/libjson-c-ios/include\"", "$(inherited)", ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -4637,8 +4639,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(PROJECT_DIR)/External/libsodium/libsodium-ios/include\"", - "\"$(PROJECT_DIR)/External/libjson-c/libjson-c-ios/include\"", "$(inherited)", ); IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -4673,13 +4673,19 @@ GCC_C_LANGUAGE_STANDARD = c11; GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch"; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + HEADER_SEARCH_PATHS = ( + "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", + ); INFOPLIST_FILE = "Source/iOS/MasterPassword-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib", - "$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib\"", ); OTHER_CFLAGS = ( "-DMPW_SODIUM=1", @@ -4712,13 +4718,19 @@ GCC_C_LANGUAGE_STANDARD = c11; GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch"; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + HEADER_SEARCH_PATHS = ( + "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", + ); INFOPLIST_FILE = "Source/iOS/MasterPassword-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib", - "$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/lib\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/lib\"", ); OTHER_CFLAGS = ( "-DMPW_SODIUM=1", diff --git a/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj b/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj index 2e452896..0d03f4a5 100644 --- a/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj +++ b/platform-darwin/MasterPassword-macOS.xcodeproj/project.pbxproj @@ -1820,7 +1820,7 @@ DA6773C61A4746AF004F356A /* mpw-util.h */, ); name = core; - path = ../platform-independent/c/core/src; + path = "../platform-independent/c/core/src"; sourceTree = ""; }; DA89D4E51A51E53100AC64D7 /* Pearl-Cocoa */ = { @@ -2994,8 +2994,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(PROJECT_DIR)/External/libsodium/libsodium-osx/include\"", - "\"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/include\"", "$(inherited)", ); LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)"; @@ -3028,6 +3026,12 @@ ); GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch"; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + HEADER_SEARCH_PATHS = ( + "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", + ); INFOPLIST_FILE = "Source/Mac/MasterPassword-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = ( @@ -3350,8 +3354,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(PROJECT_DIR)/External/libsodium/libsodium-osx/include\"", - "\"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/include\"", "$(inherited)", ); LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)"; @@ -3457,8 +3459,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; HEADER_SEARCH_PATHS = ( "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", - "\"$(PROJECT_DIR)/External/libsodium/libsodium-osx/include\"", - "\"$(PROJECT_DIR)/External/libjson-c/libjson-c-osx/include\"", "$(inherited)", ); LD_DYLIB_INSTALL_NAME = "@rpath/$(EXECUTABLE_PATH)"; @@ -3491,6 +3491,12 @@ ); GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch"; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + HEADER_SEARCH_PATHS = ( + "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", + ); INFOPLIST_FILE = "Source/Mac/MasterPassword-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = ( @@ -3523,6 +3529,12 @@ ); GCC_PREFIX_HEADER = "Source/MasterPassword-Prefix.pch"; GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; + HEADER_SEARCH_PATHS = ( + "\"$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/$(PLATFORM_NAME)/include\"", + "$(inherited)", + "\"$(PROJECT_DIR)/../lib/libsodium/build-ios~/out/include\"", + "\"$(PROJECT_DIR)/../lib/libjson-c/build-ios~/out/include\"", + ); INFOPLIST_FILE = "Source/Mac/MasterPassword-Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = ( diff --git a/platform-independent/c/core/build.gradle b/platform-independent/c/core/build.gradle index 0b166216..1b4a617d 100644 --- a/platform-independent/c/core/build.gradle +++ b/platform-independent/c/core/build.gradle @@ -65,7 +65,7 @@ library { archive.dependsOn project.tasks.maybeCreate( "build_libsodium-${system}", Exec.class ).configure { commandLine 'bash', "$rootDir/../lib/bin/build_libsodium-${system}" - privateHeaders.from "$rootDir/../lib/libsodium/src/libsodium/include" + privateHeaders.from "$rootDir/../lib/libsodium/build-${system}~/out/include" } clean.dependsOn project.tasks.maybeCreate( "clean_libsodium-${system}", Exec.class ).configure { commandLine 'bash', "$rootDir/../lib/bin/build_libsodium-${system}", 'clean'