diff --git a/MantidPlot/make_package.rb.in b/MantidPlot/make_package.rb.in index c19e0b216c217df5f7e9661f607c0f7a7ac21d7c..257b05efa752aca660dad65710f5a6f2a8312d29 100755 --- a/MantidPlot/make_package.rb.in +++ b/MantidPlot/make_package.rb.in @@ -108,6 +108,10 @@ if(poco_version[0] > 1 || (poco_version[0] == 1 && poco_version[1] >= 6)) end if("@OPENMP_FOUND@" == "TRUE") + if not File.file?("/usr/lib/libomp.dylib") + # assume we're using system llvm + library_filenames << "libc++.dylib" + end library_filenames << "libomp.dylib" end @@ -119,6 +123,14 @@ library_filenames.each do |filename| copyFile(openssl_dir+filename) elsif filename.include? "libcrypto.dylib" copyFile(openssl_dir+filename) + elsif filename.include? "libomp.dylib" or filename.include? "libc++.dylib" + if File.file?(lib_dir+"libomp.dylib") + # using system llvm + copyFile(lib_dir+filename) + elsif + # using homebrew llvm + copyFile("/usr/local/opt/llvm/lib/"+filename) + end else copyFile(lib_dir+filename) end