iOS: add new option to extension's ext.yml : link_libraries - array with additional binary libraries for linking
@@ -2294,6 +2294,10 @@ def add_linker_library(libraryname)
$ldflags << "#{tmpdir}/#{libraryname}\n" unless $ldflags.nil?
end
+def add_inker_library_absolute(fulllibraryfilepath)
+ $ldflags << fulllibraryfilepath + "\n"
+end
+
def set_linker_flags
if $config["platform"] == "iphone"
simulator = $sdk =~ /iphonesimulator/
@@ -2539,6 +2543,19 @@ def init_extensions(dest, mode = "")
end
end
+ # add additional libraries
+ link_libraries = []
+ if (!extconf["link_libraries"].nil?) && (extconf["link_libraries"].is_a? Array)
+ link_libraries += extconf["link_libraries"]
+ end
+ if (!extconf[$config["platform"]].nil?) && (!extconf[$config["platform"]]["link_libraries"].nil?) && (extconf[$config["platform"]]["link_libraries"].is_a? Array)
+ link_libraries += extconf[$config["platform"]]["link_libraries"]
+ end
+ link_libraries.each do |linklib|
+ fulllibpath = File.join(extpath, linklib)
+ add_inker_library_absolute(fulllibpath)
+ end
+
if entry && entry.length() > 0
if xml_api_paths.nil? #&& !(("rhoelementsext" == extname || "dominjector" == extname ) && ($config["platform"] == "wm"||$config["platform"] == "android"))
