resolve cyclic dependency with zstd
[platform/upstream/cmake.git] / Source / cmFindLibraryCommand.h
1 /* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2    file Copyright.txt or https://cmake.org/licensing for details.  */
3 #pragma once
4
5 #include "cmConfigure.h" // IWYU pragma: keep
6
7 #include <string>
8 #include <vector>
9
10 #include "cmFindBase.h"
11
12 class cmExecutionStatus;
13
14 /** \class cmFindLibraryCommand
15  * \brief Define a command to search for a library.
16  *
17  * cmFindLibraryCommand is used to define a CMake variable
18  * that specifies a library. The command searches for a given
19  * file in a list of directories.
20  */
21 class cmFindLibraryCommand : public cmFindBase
22 {
23 public:
24   cmFindLibraryCommand(cmExecutionStatus& status);
25
26   bool InitialPass(std::vector<std::string> const& args);
27
28 protected:
29   void AddArchitecturePaths(const char* suffix);
30   void AddArchitecturePath(std::string const& dir,
31                            std::string::size_type start_pos,
32                            const char* suffix, bool fresh = true);
33   std::string FindLibrary();
34
35 private:
36   std::string FindNormalLibrary();
37   std::string FindNormalLibraryNamesPerDir();
38   std::string FindNormalLibraryDirsPerName();
39   std::string FindFrameworkLibrary();
40   std::string FindFrameworkLibraryNamesPerDir();
41   std::string FindFrameworkLibraryDirsPerName();
42 };
43
44 bool cmFindLibrary(std::vector<std::string> const& args,
45                    cmExecutionStatus& status);