Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 49 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ int main() {

## Consuming threepp

Threepp is available as a CMake package and can be consumed in a number of ways.
Threepp is mainly available as a CMake package and can be consumed in a number of ways. It's also available as a [Conan](https://conan.io/center/recipes?value=threepp) package, so it can be consumed using [conan](https://conan.io/_) or [xmake](https://xmake.io/).

#### CMake FetchContent (recommended)

Expand Down Expand Up @@ -192,6 +192,54 @@ An example is provided [here](tests/threepp_fetchcontent_test). <br>

See also [this demo](https://github.com/markaren/threepp_wxwidgets), which additionally uses [WxWidgets](https://wxwidgets.org/) as the Window system.

#### Using Conan

Example `conanfile.py` :

```python
from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout


class ExampleRecipe(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps", "CMakeToolchain"

def requirements(self):
self.requires("threepp/0.0.20260310")

def layout(self):
cmake_layout(self)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
```

#### Xmake

Example `xmake.lua` file:

```lua
add_rules("mode.debug", "mode.release")
add_requires("imgui", {configs = {glfw_opengl3 = true}}) -- optional dependency for UI widgets
add_requires("assimp") -- optional dependency for importing assembly models (.glb/.dae)
add_requires("conan::threepp/0.0.20260310", {
alias = "threepp",
configs = {
settings = {"compiler.cppstd=20"}
}
})
target("example")
set_kind("binary")
add_files("src/*.cpp")
add_packages("imgui", "threepp", "assimp")
set_languages("c++20")
```




### Screenshots
![Fonts](doc/screenshots/fonts.png)
Expand Down