[Bf-blender-cvs] [fa821a9] master: OSX/buildsystems: unify openmp handling by changing iomp5 id to @loader_path/../Resources/lib/libiomp5.dylib This makes install_name_tool usage obsolete here and also assures cmake builds can be codesigned. IMPORTANT: update lib (darwin-9.x.universal/openmp)

Jens Verwiebe noreply at git.blender.org
Sun Nov 16 17:06:11 CET 2014


Commit: fa821a969ea935b0251f9aa0c893ab174e03a580
Author: Jens Verwiebe
Date:   Sun Nov 16 17:03:44 2014 +0100
Branches: master
https://developer.blender.org/rBfa821a969ea935b0251f9aa0c893ab174e03a580

OSX/buildsystems: unify openmp handling by changing iomp5 id to @loader_path/../Resources/lib/libiomp5.dylib
This makes install_name_tool usage obsolete here and also assures cmake builds can be codesigned.
IMPORTANT: update lib (darwin-9.x.universal/openmp)

===================================================================

M	CMakeLists.txt
M	build_files/scons/tools/Blender.py
M	source/creator/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 316191a..acf1bb4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2049,7 +2049,7 @@ elseif(APPLE)
 				link_directories(${LIBDIR}/openmp/lib)
 				# This is a workaround for our helperbinaries ( datatoc, masgfmt, ... ),
 				# They are linked also to omp lib, so we need it in builddir for runtime exexcution, TODO: remove all unneeded dependencies from these
-				execute_process(COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES} ${LIBDIR}/openmp/lib/libiomp5.dylib ${CMAKE_BINARY_DIR}/bin/libiomp5.dylib) # for intermediate binaries, lib id @loader_path
+				execute_process(COMMAND ditto -arch ${CMAKE_OSX_ARCHITECTURES} ${LIBDIR}/openmp/lib/libiomp5.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libiomp5.dylib) # for intermediate binaries, lib id @loader_path
 			endif()
 		endif()
 	endif()
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index b5853b2..f5118da 100755
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -809,10 +809,6 @@ def AppIt(target=None, source=None, env=None):
             instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
             cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
             commands.getoutput(cmd)
-            cmd = 'install_name_tool -id @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
-            commands.getoutput(cmd)
-            cmd = 'install_name_tool -change @loader_path/libiomp5.dylib  @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(installdir, binary, binary) # change ref to libiomp5 ( blender )
-            commands.getoutput(cmd)
 
 # extract copy system python, be sure to update other build systems
 # when making changes to the files that are copied.
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index bb669b6..434f3c4 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -837,7 +837,7 @@ elseif(APPLE)
 	if(WITH_OPENMP AND CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
 		install(
 			FILES ${LIBDIR}/openmp/lib/libiomp5.dylib
-			DESTINATION blender.app/Contents/MacOS
+			DESTINATION blender.app/Contents/Resources/lib/
 		)
 	endif()




More information about the Bf-blender-cvs mailing list