From 95e9d723237db0275392f1ba6076e349e087a48b Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Tue, 21 Feb 2012 20:27:25 +0000 Subject: [PATCH] Adds install_name to libCollada link options for OS X. This was SVN commit r11112. --- build/premake/premake4.lua | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/build/premake/premake4.lua b/build/premake/premake4.lua index 9c40de0a9e..476db1e63d 100644 --- a/build/premake/premake4.lua +++ b/build/premake/premake4.lua @@ -817,12 +817,6 @@ function setup_atlas_project(project_name, target_type, rel_source_dirs, rel_inc if not extra_params["pch_dir"] then extra_params["pch_dir"] = source_root end - - -- install_name settings aren't really supported yet by premake, but there are plans for the future. - -- we currently use this hack to work around some bugs with wrong install_names. - if target_type == "SharedLib" and os.is("macosx") then - linkoptions { "-install_name @executable_path/lib"..project_name..".dylib" } - end project_add_contents(source_root, rel_source_dirs, rel_include_dirs, extra_params) project_add_extern_libs(extern_libs, target_type) @@ -838,6 +832,13 @@ function setup_atlas_project(project_name, target_type, rel_source_dirs, rel_inc elseif os.is("linux") or os.is("bsd") then buildoptions { "-rdynamic", "-fPIC" } linkoptions { "-fPIC", "-rdynamic" } + + elseif os.is("macosx") then + -- install_name settings aren't really supported yet by premake, but there are plans for the future. + -- we currently use this hack to work around some bugs with wrong install_names. + if target_type == "SharedLib" then + linkoptions { "-install_name @executable_path/lib"..project_name..".dylib" } + end end end @@ -1019,6 +1020,12 @@ function setup_collada_project(project_name, target_type, rel_source_dirs, rel_i elseif os.is("macosx") then -- define MACOS-something? + -- install_name settings aren't really supported yet by premake, but there are plans for the future. + -- we currently use this hack to work around some bugs with wrong install_names. + if target_type == "SharedLib" then + linkoptions { "-install_name @executable_path/lib"..project_name..".dylib" } + end + buildoptions { "-fno-strict-aliasing" } -- On OSX, fcollada uses a few utility functions from coreservices