Skip to content

Commit 8f644a8

Browse files
committed
refactor(cli/main): improve handling of 'libomp'
1 parent 37c7f29 commit 8f644a8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/cli/main.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3094,9 +3094,7 @@ int main (int argc, char* argv[]) {
30943094
flags += " -I" + prefixFile();
30953095
flags += " -I" + prefixFile("include");
30963096
flags += " -L" + prefixFile("lib/" + platform.arch + "-desktop");
3097-
if (flagCodeSign) {
3098-
flags += " -Wl,-rpath,@executable_path";
3099-
}
3097+
flags += " -Wl,-rpath,@executable_path";
31003098
flags += " -fPIC";
31013099
flags += " -lsocket-runtime";
31023100
flags += " -lomp";
@@ -3252,11 +3250,13 @@ int main (int argc, char* argv[]) {
32523250
writeFile(paths.pathResourcesRelativeToUserBuild / "Credits.html", credits);
32533251

32543252
fs::create_directories(paths.pathPackage / pathBase / "MacOS");
3255-
fs::copy(
3256-
trim(prefixFile("lib/" + platform.arch + "-desktop/libomp.dylib")),
3257-
paths.pathPackage / pathBase / "MacOS" / "libomp.dylib",
3258-
fs::copy_options::overwrite_existing
3259-
);
3253+
if (flagCodeSign) {
3254+
fs::copy(
3255+
trim(prefixFile("lib/" + platform.arch + "-desktop/libomp.dylib")),
3256+
paths.pathPackage / pathBase / "MacOS" / "libomp.dylib",
3257+
fs::copy_options::overwrite_existing
3258+
);
3259+
}
32603260
}
32613261

32623262
if (platform.mac && isForDesktop) {

0 commit comments

Comments
 (0)