reveal

Check-in [f445e8b648]
Login

Check-in [f445e8b648]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Conan 2 compatibility
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f445e8b648962ac43296fa1192365695620b7d5d5348e905d4a440b546d0a1e7
User & Date: chust 2023-10-05 17:54:38.807
Context
2023-10-23
20:36
Removed obsolete EPM package descriptor check-in: 9ed131ba7d user: chust tags: trunk
2023-10-05
17:54
Conan 2 compatibility check-in: f445e8b648 user: chust tags: trunk
2023-09-28
15:36
Gtk+ linkage tweaks check-in: 9e755d3a4f user: murphy tags: trunk, v1.2.1
Changes
Unified Diff Ignore Whitespace Patch
Changes to conanfile.py.
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38




39
40
41
42
43
44





45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

60
61
62
63
64

65
66
67
68
69
70
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from conans import ConanFile, CMake



class RevealConan(ConanFile):
    name = "reveal"
    version = "1.2.1"
    license = "Apache-2.0"
    author = "Thomas C. Chust <chust@web.de>"
    url = "https://chust.org/repos/reveal"
    description = "reveal is a small utility to launch or reveal files using your desktop environment."
    topics = ("os", "fs", "gui", "desktop", "util")
    settings = "os", "compiler", "build_type", "arch"
    options = {"shared": [True, False], "fPIC": [True, False]}
    default_options = {"shared": False, "fPIC": True}
    generators = "cmake"
    exports_sources = (
        "*.cxx", "*.h", "README.txt", "LICENSE.txt", "CMakeLists.txt",
        "!build"
    )

    def config_options(self):
        if self.settings.os == "Windows":
            del self.options.fPIC





    def requirements(self):
        if self.settings.os == "Windows":
            pass # see package_info
        else:
            self.requires("gtk/system")






    def build(self):
        cmake = CMake(self)

        cmake.definitions["CMAKE_INSTALL_PREFIX"] = "../stage"
        cmake.definitions["CMAKE_BUILD_TYPE"] = self.settings.build_type
        cmake.definitions["BUILD_SHARED_LIBS"] = "ON" if self.options.shared else "OFF"
        cmake.configure(build_dir="build")

        cmake.build(build_dir="build")
        cmake.install(build_dir="build")

    def package(self):
        self.copy("*", dst="include", src="stage/include", keep_path=True)
        self.copy("*", dst="bin", src="stage/bin", keep_path=False)
        self.copy("*", dst="lib", src="stage/lib", keep_path=False, symlinks=True)


    def package_info(self):
        self.cpp_info.libs = ["uishell"]
        for cmake in "cmake", "cmake_multi", "cmake_find_package", "cmake_find_package_multi", "cmake_paths":
            self.cpp_info.names[cmake] = "uishell"

        if not self.options.shared:
            self.cpp_info.defines += ["UISHELL_STATIC"]
            if self.settings.os == "Windows":
                self.cpp_info.system_libs += ["shlwapi", "shell32", "ole32"]
            else:
                pass # see requirements







|
>













|









>
>
>
>






>
>
>
>
>


<
<
<
<
|
<
|
<


|
<
<
>



|
|
>






8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56




57

58

59
60
61


62
63
64
65
66
67
68
69
70
71
72
73
74
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from conan import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain


class RevealConan(ConanFile):
    name = "reveal"
    version = "1.2.1"
    license = "Apache-2.0"
    author = "Thomas C. Chust <chust@web.de>"
    url = "https://chust.org/repos/reveal"
    description = "reveal is a small utility to launch or reveal files using your desktop environment."
    topics = ("os", "fs", "gui", "desktop", "util")
    settings = "os", "compiler", "build_type", "arch"
    options = {"shared": [True, False], "fPIC": [True, False]}
    default_options = {"shared": False, "fPIC": True}
    generators = "CMakeDeps"
    exports_sources = (
        "*.cxx", "*.h", "README.txt", "LICENSE.txt", "CMakeLists.txt",
        "!build"
    )

    def config_options(self):
        if self.settings.os == "Windows":
            del self.options.fPIC

    def configure(self):
        if self.options.shared:
            self.options.rm_safe("fPIC")

    def requirements(self):
        if self.settings.os == "Windows":
            pass # see package_info
        else:
            self.requires("gtk/system")

    def generate(self):
        tc = CMakeToolchain(self)
        tc.variables["BUILD_SHARED_LIBS"] = self.options.shared
        tc.generate()

    def build(self):
        cmake = CMake(self)




        cmake.configure()

        cmake.build()


    def package(self):
        cmake = CMake(self)


        cmake.install()

    def package_info(self):
        self.cpp_info.libs = ["uishell"]
        self.cpp_info.set_property("cmake_find_mode", "both")
        self.cpp_info.set_property("cmake_file_name", "uishell")
        self.cpp_info.set_property("cmake_target_name", "uishell::uishell")
        if not self.options.shared:
            self.cpp_info.defines += ["UISHELL_STATIC"]
            if self.settings.os == "Windows":
                self.cpp_info.system_libs += ["shlwapi", "shell32", "ole32"]
            else:
                pass # see requirements