Skip to content

Commit d822c11

Browse files
FlyAndNotDownclaude
andcommitted
build: support building conan recipes on Linux
Teach build_recipes.py to recognize Linux-x86_64 as a host (it used to sys.exit on Linux) and add Linux-x86_64 to the platforms list of every recipe that can target it: assimp, clipp, debugbreak, libclang, qt and dxc. molten-vk stays macOS-only. Verified on Linux/gcc-13/x86_64 via conan create: clipp, debugbreak, assimp, libclang and qt all build, package and (where applicable) pass their test_package. dxc also gets its packaging fixed -- package() now copies installed/lib on Linux as well as macOS, so libdxcompiler.so is shipped (previously only Windows/macOS were handled, leaving the Linux package without the library it declares). The dxc Linux build itself is not yet verified end-to-end (LLVM-scale source build); the packaging change mirrors the macOS path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d0f1d5a commit d822c11

8 files changed

Lines changed: 12 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
platforms:
22
- Windows-x86_64
33
- Macos-armv8
4+
- Linux-x86_64
45
sources:
56
"6.0.2-exp":
67
url: "https://github.com/assimp/assimp/archive/refs/tags/v6.0.2.tar.gz"

ThirdParty/ConanRecipes/build_recipes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import yaml
3232

3333

34-
SUPPORTED_PLATFORMS = ("Windows-x86_64", "Macos-armv8")
34+
SUPPORTED_PLATFORMS = ("Windows-x86_64", "Macos-armv8", "Linux-x86_64")
3535

3636
# 'conan graph info' binary states that mean a matching binary already exists (in the local cache or on
3737
# a remote) and so needs neither building nor downloading-to-rebuild. We skip 'conan create' for these
@@ -46,6 +46,8 @@ def current_platform() -> str:
4646
return "Windows-x86_64"
4747
if system == "Darwin" and machine in ("arm64", "aarch64"):
4848
return "Macos-armv8"
49+
if system == "Linux" and machine in ("amd64", "x86_64"):
50+
return "Linux-x86_64"
4951
sys.exit(
5052
f"error: unsupported host {system}/{platform.machine()}; "
5153
f"only {', '.join(SUPPORTED_PLATFORMS)} are supported"

ThirdParty/ConanRecipes/clipp/conandata.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
platforms:
22
- Windows-x86_64
33
- Macos-armv8
4+
- Linux-x86_64
45
sources:
56
"1.2.3-exp":
67
url: "https://github.com/muellan/clipp/archive/refs/tags/v1.2.3.tar.gz"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
platforms:
22
- Windows-x86_64
33
- Macos-armv8
4+
- Linux-x86_64
45
sources:
56
"1.0-exp":
67
url: "https://github.com/scottt/debugbreak/archive/refs/tags/v1.0.tar.gz"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
platforms:
22
- Windows-x86_64
33
- Macos-armv8
4+
- Linux-x86_64
45
sources:
56
"1.8.2505.1-exp":
67
commit: "b106a961d09221b3c5bdb37be45b679257da08b8"

ThirdParty/ConanRecipes/dxc/conanfile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ def package(self):
7474
copy(self, "d3d12shader.h", os.path.join(self.source_folder, "external", "DirectX-Headers", "include", "directx"), os.path.join(self.package_folder, "include", "dxc"))
7575
copy(self, "dxil.dll", os.path.join(self.build_folder, "bin"), os.path.join(self.package_folder, "bin"))
7676
copy(self, "dxcompiler.lib", os.path.join(self.build_folder, "lib"), os.path.join(self.package_folder, "lib"))
77-
elif self.settings.os == "Macos":
77+
elif self.settings.os in ("Macos", "Linux"):
78+
# install-distribution drops the shared compiler (libdxcompiler.dylib /
79+
# libdxcompiler.so) under installed/lib on both Unix-likes.
7880
copy(self, "*", os.path.join(self.build_folder, "installed", "lib"), os.path.join(self.package_folder, "lib"))
7981

8082
def package_info(self):

ThirdParty/ConanRecipes/libclang/conandata.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
platforms:
22
- Windows-x86_64
33
- Macos-armv8
4+
- Linux-x86_64
45
sources:
56
"22.1.6-exp":
67
Windows-x86_64:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
platforms:
22
- Windows-x86_64
33
- Macos-armv8
4+
- Linux-x86_64
45
versions:
56
- "6.10.3-exp"

0 commit comments

Comments
 (0)