Package net.sf.antcontrib.cpptasks.types

Examples of net.sf.antcontrib.cpptasks.types.LibrarySet


            Vector preargs, Vector midargs, Vector endargs) {
        Vector libnames = new Vector();
        super.addLibrarySets(task, libsets, preargs, midargs, endargs);
        LibraryTypeEnum previousLibraryType = null;
        for (int i = 0; i < libsets.length; i++) {
            LibrarySet set = libsets[i];
            File libdir = set.getDir(null);
            String[] libs = set.getLibs();
            if (libdir != null) {
                    String relPath = libdir.getAbsolutePath();
                    File outputFile = task.getOutfile();
                    if (outputFile != null && outputFile.getParentFile() != null) {
                        relPath = CUtil.getRelativePath(
                            outputFile.getParentFile().getAbsolutePath(), libdir);
                    }
                    if (set.getType() != null &&
                                    "framework".equals(set.getType().getValue()) &&
                                                isDarwin()) {
                            endargs.addElement("-F" + relPath);
                    } else {
                            endargs.addElement("-L" + relPath);
                    }
            }
            //
            //  if there has been a change of library type
            //
            if (set.getType() != previousLibraryType) {
                    if (set.getType() != null && "static".equals(set.getType().getValue())) {
                            endargs.addElement(getStaticLibFlag());
                            previousLibraryType = set.getType();
                    } else {
                            if (set.getType() == null ||
                                            !"framework".equals(set.getType().getValue()) ||
                                                        !isDarwin()) {
                                    endargs.addElement(getDynamicLibFlag());
                                    previousLibraryType = set.getType();
                            }
                    }
            }
            StringBuffer buf = new StringBuffer("-l");
            if (set.getType() != null &&
                            "framework".equals(set.getType().getValue()) &&
                                        isDarwin()) {
                    buf.setLength(0);
                    buf.append("-framework ");
            }
            int initialLength = buf.length();
View Full Code Here

TOP

Related Classes of net.sf.antcontrib.cpptasks.types.LibrarySet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.