~skiter23/codeblocks/Stable

« back to all changes in this revision

Viewing changes to plugins/contrib/lib_finder/pkgconfigmanager.h

  • Committer: skiter
  • Date: 2008-04-13 02:17:50 UTC
  • Revision ID: skiter@anonymous-20080413021750-idptbpxvdui6ms6y
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* This file is part of lib_finder plugin for Code::Blocks Studio
 
3
* Copyright (C) 2007  Bartlomiej Swiecki
 
4
*
 
5
* wxSmith is free software; you can redistribute it and/or modify
 
6
* it under the terms of the GNU General Public License as published by
 
7
* the Free Software Foundation; either version 2 of the License, or
 
8
* (at your option) any later version.
 
9
*
 
10
* wxSmith is distributed in the hope that it will be useful,
 
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
13
* GNU General Public License for more details.
 
14
*
 
15
* You should have received a copy of the GNU General Public License
 
16
* along with wxSmith; if not, write to the Free Software
 
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 
18
*
 
19
* $Revision: 4504 $
 
20
* $Id: wxsmithpluginregistrants.cpp 4504 2007-10-02 21:52:30Z byo $
 
21
* $HeadURL: svn+ssh://byo@svn.berlios.de/svnroot/repos/codeblocks/trunk/src/plugins/contrib/wxSmith/plugin/wxsmithpluginregistrants.cpp $
 
22
*/
 
23
 
 
24
#ifndef PKGCONFIGMANAGER_H
 
25
#define PKGCONFIGMANAGER_H
 
26
 
 
27
#include "resultmap.h"
 
28
#include <compiletargetbase.h>
 
29
 
 
30
/** \brief Class responsible for integration with pkg-config utility
 
31
 *
 
32
 * The functinality of this class is as follows:
 
33
 *  - Checking whether the system has pkg-config installed
 
34
 *  - List libraries which may be configured through pkg-config
 
35
 *  - Generate options which allow to use pkg-config inside project
 
36
 */
 
37
class PkgConfigManager
 
38
{
 
39
    public:
 
40
 
 
41
        /** \brief Ctor
 
42
         *
 
43
         * It does not detet the presence or list of libraries
 
44
         */
 
45
        PkgConfigManager();
 
46
 
 
47
        /** \brief Dctor */
 
48
        ~PkgConfigManager();
 
49
 
 
50
        /** \brief Checking whether there is pkg-config on this system */
 
51
        bool IsPkgConfig() { return m_PkgConfigVersion!=-1L; }
 
52
 
 
53
        /** \brief Adding libraries detected from pkg-config to given set */
 
54
        bool DetectLibraries(ResultMap& Results);
 
55
 
 
56
        /** \brief Clear all results */
 
57
        void Clear();
 
58
 
 
59
        /** \brief Update given target to use library from pkg-config */
 
60
        bool UpdateTarget(const wxString& LibName,CompileTargetBase* Target,bool Force=true);
 
61
 
 
62
        /** \brief Refreshing pkg-config data */
 
63
        void RefreshData();
 
64
 
 
65
    private:
 
66
 
 
67
        /** \brief Detecting version of pkg-config */
 
68
        bool DetectVersion();
 
69
 
 
70
//        /** \brief Reading list of supported libraries */
 
71
//        bool LoadLibraries();
 
72
 
 
73
        long m_PkgConfigVersion;    ///< \brief Pkg-Config version, -1 if there's no pkg-config
 
74
//        ResultMap m_Libraries;      ///< \brief Libraries detected by pkg-config
 
75
};
 
76
 
 
77
 
 
78
#endif