diff options
Diffstat (limited to 'tests/projects')
4 files changed, 50 insertions, 0 deletions
diff --git a/tests/projects/objc/macapp_duplicate_rpath/src/Info.plist b/tests/projects/objc/macapp_duplicate_rpath/src/Info.plist new file mode 100644 index 000000000..e20952d73 --- /dev/null +++ b/tests/projects/objc/macapp_duplicate_rpath/src/Info.plist @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleExecutable</key> + <string>demo</string> + <key>CFBundleIdentifier</key> + <string>io.xmake.demo.duprpath</string> + <key>CFBundleName</key> + <string>demo</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleVersion</key> + <string>1</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> +</dict> +</plist> diff --git a/tests/projects/objc/macapp_duplicate_rpath/src/main.m b/tests/projects/objc/macapp_duplicate_rpath/src/main.m new file mode 100644 index 000000000..f481d2909 --- /dev/null +++ b/tests/projects/objc/macapp_duplicate_rpath/src/main.m @@ -0,0 +1,5 @@ +#import <AppKit/AppKit.h> + +int main(void) { + return 0; +} diff --git a/tests/projects/objc/macapp_duplicate_rpath/test.lua b/tests/projects/objc/macapp_duplicate_rpath/test.lua new file mode 100644 index 000000000..f2821df14 --- /dev/null +++ b/tests/projects/objc/macapp_duplicate_rpath/test.lua @@ -0,0 +1,18 @@ +function main(t) + if not is_host("macosx") then + return t:skip("wrong host platform") + end + + local homedir = path.absolute("home") + os.setenv("HOME", homedir) + os.mkdir(homedir) + os.mkdir(path.join(homedir, ".xmake")) + + local xmake = path.absolute(path.join(os.projectdir(), "build", "xmake")) + local xmake_program_dir = path.absolute(path.join(os.projectdir(), "xmake")) + os.setenv("XMAKE_PROGRAM_FILE", xmake) + os.setenv("XMAKE_PROGRAM_DIR", xmake_program_dir) + + os.execv(xmake, {"f", "-p", "macosx", "-a", os.arch(), "-c"}) + os.execv(xmake, {"-vD"}) +end diff --git a/tests/projects/objc/macapp_duplicate_rpath/xmake.lua b/tests/projects/objc/macapp_duplicate_rpath/xmake.lua new file mode 100644 index 000000000..a9428203f --- /dev/null +++ b/tests/projects/objc/macapp_duplicate_rpath/xmake.lua @@ -0,0 +1,9 @@ +add_rules("mode.release", "mode.debug") + +set_languages("c11", "objc") + +target("demo") + add_rules("xcode.application") + add_rpathdirs("@executable_path/../Frameworks") + add_files("src/main.m") + add_files("src/Info.plist") |
