-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconanfile.py
More file actions
38 lines (30 loc) · 1.24 KB
/
conanfile.py
File metadata and controls
38 lines (30 loc) · 1.24 KB
1
2
3
4
5
6
7
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
from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
class MyCrossPlatformProject(ConanFile):
name = "ConchCrossProject"
version = "1.0.0"
settings = "os", "compiler", "build_type", "arch"
# Define generators: CMakeDeps and CMakeToolchain
generators = "CMakeDeps", "CMakeToolchain"
# Define all required third-party libraries
def requirements(self):
self.requires("spdlog/1.16.0")
self.requires("fmt/12.0.0")
self.requires("libuv/1.51.0")
self.requires("gtest/1.17.0")
self.requires("benchmark/1.9.4")
# Qt6 is only needed for desktop apps, not mobile (using native iOS/Android)
if self.settings.os not in ["Android", "iOS"]:
self.requires("qt/6.10.1")
# Optional: self.requires("nlohmann_json/3.11.3")
def configure(self):
# Qt6 optimization configuration (only for desktop)
if self.settings.os not in ["Android", "iOS"]:
self.options["qt"].shared = True # Desktop typically uses dynamic linking
def layout(self):
# Use standard CMake layout
cmake_layout(self)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()