X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fsharedlibrary.h;h=564b2102004d714da37d3042dd682cf37e488b95;hb=d1f9551e05c9d341149eb490e05b1465d3d6b711;hp=f86fa814978804f73d7fef03a3d241de6f3734b8;hpb=242c55b17e6608b29a77ca17a5b677e202a3ca90;p=builder.git diff --git a/source/sharedlibrary.h b/source/sharedlibrary.h index f86fa81..564b210 100644 --- a/source/sharedlibrary.h +++ b/source/sharedlibrary.h @@ -1,28 +1,39 @@ -/* $Id$ - -This file is part of builder -Copyright © 2006-2007, 2009 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef SHAREDLIB_H_ #define SHAREDLIB_H_ -#include "executable.h" +#include "binary.h" + +class ImportLibrary; /** -Represents a shared library. Mainly exists to give extra information to the -user. +Represents a shared library. It has two special properties: libname and +soname. Libname is the name used by the linker. Soname is the canonical +filename of the library, including version number. If the owning package has +no version, soname will be empty. + +A SharedLibrary can also store a pointer to the associated ImportLibrary, for +platforms that need one. */ -class SharedLibrary: public Executable +class SharedLibrary: public Binary { private: std::string libname; + std::string soname; + ImportLibrary *import_lib = 0; public: - SharedLibrary(Builder &, const Component &, const std::list &); - virtual const char *get_type() const { return "SharedLibrary"; } + SharedLibrary(Builder &, const Msp::FS::Path &); + SharedLibrary(Builder &, const Component &, const std::vector &); +private: + static std::string generate_filename(const Component &); + +public: + const char *get_type() const override { return "SharedLibrary"; } const std::string &get_libname() const { return libname; } + const std::string &get_soname() const { return soname; } + + void set_import_library(ImportLibrary *); + ImportLibrary *get_import_library() const { return import_lib; } }; #endif