Skip to content

Commit

Permalink
fix conan x86 build
Browse files Browse the repository at this point in the history
  • Loading branch information
cen1 committed Mar 10, 2024
1 parent 5f36fa0 commit b1b00d1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ jobs:
- name: Install dependencies with conan
if: matrix.preset == 'conan_x86'
shell: cmd
run: conan install . -of build -s build_type=Release -o *:shared=False --build=missing
run: conan install . -of build -s build_type=Release s:h arch=x86 -o *:shared=False --build=missing

- name: Configure
shell: cmd
Expand Down
1 change: 1 addition & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
{
"name": "conan_x86",
"binaryDir": "${sourceDir}/build",
"architecture": "WIN32",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/build/conan_toolchain.cmake",
"CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ cmake --build build
```

## Windows

### x64
Using vcpkg
```
cmake --preset vcpkg
Expand All @@ -54,6 +56,22 @@ cmake --preset conan
cmake --build build --config Release
```

### x86
Only Qt5 is tested on x86.

Using vcpkg
```
cmake --preset vcpkg_x86
cmake --build build --config Release
```

Using conan v2
```
conan install . -of build -s build_type=Release -s:h arch=x86 -o *:shared=False --build=missing
cmake --preset conan_x86
cmake --build build --config Release
```

If you don't use a package manager you will have to add library and include directories to your PATH or specify them with `CMAKE_PREFIX_PATH`.
Qt is not installed as a dependency of either vcpkg or conan.

Expand Down
10 changes: 8 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain

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

requires = (
"zlib/1.3.1",
"bzip2/1.0.8"
)
)

def generate(self):
tc = CMakeToolchain(self)
tc.user_presets_path = False
tc.generate()

0 comments on commit b1b00d1

Please sign in to comment.