Compare commits
5 Commits
main
...
451568113a
| Author | SHA1 | Date | |
|---|---|---|---|
| 451568113a | |||
| 4689d0a002 | |||
| 030bf0a590 | |||
| 65be0a9fac | |||
| 534384356e |
@@ -7,102 +7,35 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CCACHE_DIR: /ccache
|
CCACHE_BASEDIR: ${{ github.workspace }}
|
||||||
CCACHE_MAXSIZE: 10G
|
|
||||||
CCACHE_BASEDIR: /root/.conan2
|
|
||||||
CCACHE_COMPILERCHECK: "%compiler% -dumpversion"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
conan-packages-tier1:
|
conan-packages:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 120
|
timeout-minutes: 120
|
||||||
container:
|
container:
|
||||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:main
|
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:${{ github.ref_name }}
|
||||||
env:
|
|
||||||
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
|
|
||||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
package: [
|
|
||||||
{ name: "mold", version: "2.41.0", location: "all" },
|
|
||||||
|
|
||||||
{ name: "eabase", version: "01082025", location: "all" },
|
|
||||||
|
|
||||||
{ name: "vulkan-headers", version: "1.4.341.0", location: "all" },
|
|
||||||
{ name: "spirv-headers", version: "1.4.341.0", location: "all" },
|
|
||||||
{ name: "spirv-cross", version: "1.4.341.0", location: "all" },
|
|
||||||
|
|
||||||
{ name: "pixelmatch-cpp17", version: "1.0.3", location: "all" },
|
|
||||||
{ name: "lodepng", version: "cci.20260210", location: "all" },
|
|
||||||
{ name: "stduuid", version: "1.2.3", location: "all" },
|
|
||||||
{ name: "flatbuffers", version: "25.12.19-2026-02-06-03fffb2-bigfoot", location: "all" },
|
|
||||||
|
|
||||||
{ name: "glm", version: "1.0.3", location: "all" },
|
|
||||||
|
|
||||||
{ name: "unordered_dense", version: "4.8.1", location: "all" },
|
|
||||||
{ name: "mimalloc", version: "3.3.2", location: "all" },
|
|
||||||
{ name: "meshoptimizer", version: "1.1", location: "all" },
|
|
||||||
{ name: "sqlite3", version: "3.53.1", location: "all" },
|
|
||||||
{ name: "rapidhash", version: "3.0", location: "all" },
|
|
||||||
{ name: "cli11", version: "2.6.1", location: "all" },
|
|
||||||
{ name: "assimp", version: "6.0.4", location: "5.x" },
|
|
||||||
|
|
||||||
{ name: "imgui", version: "1.92.7-docking", location: "all" },
|
|
||||||
]
|
|
||||||
name: "Package ${{matrix.package.name }}/${{ matrix.package.version }}"
|
|
||||||
steps:
|
|
||||||
- name: Set BRANCH_NAME
|
|
||||||
run: echo "BRANCH_NAME=$(echo $GITHUB_REF_NAME | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install Node.js
|
|
||||||
run: apt-get update && apt-get install -y nodejs
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Reset ccache stats
|
|
||||||
run: ccache --zero-stats
|
|
||||||
|
|
||||||
- name: Run Conan packaging
|
|
||||||
run: |
|
|
||||||
echo "Building ${{ matrix.package.name }}@${{ matrix.package.version }}"
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
|
||||||
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
|
||||||
conan create ./${{ matrix.package.name }}/${{ matrix.package.location }} \
|
|
||||||
--version=${{ matrix.package.version }} \
|
|
||||||
--user=bigfootdev \
|
|
||||||
--channel=${{ env.BRANCH_NAME }} \
|
|
||||||
-pr:b=./ConanProfiles/clang -pr:h=./ConanProfiles/clang \
|
|
||||||
--build=* --remote=bigfootpackages
|
|
||||||
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
|
||||||
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
|
||||||
conan upload ${{ matrix.package.name }}/${{ matrix.package.version }}@bigfootdev/${{ env.BRANCH_NAME }} \
|
|
||||||
--only-recipe --remote=bigfootpackages
|
|
||||||
|
|
||||||
- name: Show ccache stats
|
|
||||||
run: ccache --show-stats
|
|
||||||
|
|
||||||
conan-packages-tier2:
|
|
||||||
needs: conan-packages-tier1
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 120
|
|
||||||
container:
|
|
||||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:main
|
|
||||||
env:
|
env:
|
||||||
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
|
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
|
||||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
package: [
|
package: [
|
||||||
|
{ name: "eabase", version: "01082025", location: "all", needs_pkg: "" },
|
||||||
{ name: "eastl", version: "3.27.01", location: "all", needs_pkg: "eabase" },
|
{ name: "eastl", version: "3.27.01", location: "all", needs_pkg: "eabase" },
|
||||||
|
{ name: "pixelmatch-cpp17", version: "1.0.3", location: "all", needs_pkg: "" },
|
||||||
{ name: "vulkan-utility-libraries", version: "1.4.341.0", location: "all" },
|
{ name: "lodepng", version: "cci.20250727", location: "all", needs_pkg: "" },
|
||||||
{ name: "spirv-tools", version: "1.4.341.0", location: "all" },
|
{ name: "stduuid", version: "1.2.3", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "flatbuffers", version: "25.12.19", location: "all", needs_pkg: "" },
|
||||||
{ name: "vulkan-memory-allocator", version: "3.3.0", location: "all" },
|
{ name: "vulkan-memory-allocator", version: "3.3.0", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "vulkan-utility-libraries", version: "1.4.313.0", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "vulkan-validationlayers", version: "1.4.313.0", location: "all", needs_pkg: "vulkan-utility-libraries" },
|
||||||
|
{ name: "shaderc", version: "2025.3", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "unordered_dense", version: "4.8.1", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "mimalloc", version: "3.1.5", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "meshoptimizer", version: "1.0", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "sqlite3", version: "3.51.0", location: "all", needs_pkg: "" },
|
||||||
|
{ name: "rapidhash", version: "3.0", location: "all", needs_pkg: "" }
|
||||||
]
|
]
|
||||||
name: "Package ${{matrix.package.name }}/${{ matrix.package.version }}"
|
name: "Package ${{matrix.package.name }}/${{ matrix.package.version }}"
|
||||||
steps:
|
steps:
|
||||||
@@ -117,7 +50,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Reset ccache stats
|
- name: Show ccache stats before
|
||||||
run: ccache --zero-stats
|
run: ccache --zero-stats
|
||||||
|
|
||||||
- name: Run Conan packaging
|
- name: Run Conan packaging
|
||||||
@@ -129,114 +62,13 @@ jobs:
|
|||||||
--version=${{ matrix.package.version }} \
|
--version=${{ matrix.package.version }} \
|
||||||
--user=bigfootdev \
|
--user=bigfootdev \
|
||||||
--channel=${{ env.BRANCH_NAME }} \
|
--channel=${{ env.BRANCH_NAME }} \
|
||||||
-pr:b=./ConanProfiles/clang -pr:h=./ConanProfiles/clang \
|
-pr:b=./clang -pr:h=./clang \
|
||||||
--build=* --remote=bigfootpackages
|
--build=missing --remote=bigfootpackages
|
||||||
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
||||||
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
||||||
conan upload ${{ matrix.package.name }}/${{ matrix.package.version }}@bigfootdev/${{ env.BRANCH_NAME }} \
|
conan upload ${{ matrix.package.name }}/${{ matrix.package.version }}@bigfootdev/${{ env.BRANCH_NAME }} \
|
||||||
--only-recipe --remote=bigfootpackages
|
--only-recipe --remote=bigfootpackages
|
||||||
|
|
||||||
- name: Show ccache stats
|
- name: Show ccache stats after
|
||||||
run: ccache --show-stats
|
|
||||||
|
|
||||||
conan-packages-tier3:
|
|
||||||
needs: conan-packages-tier2
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 120
|
|
||||||
container:
|
|
||||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:main
|
|
||||||
env:
|
|
||||||
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
|
|
||||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
package: [
|
|
||||||
{ name: "glslang", version: "1.4.341.0", location: "all" },
|
|
||||||
{ name: "vulkan-validationlayers", version: "1.4.341.0", location: "all" },
|
|
||||||
]
|
|
||||||
name: "Package ${{matrix.package.name }}/${{ matrix.package.version }}"
|
|
||||||
steps:
|
|
||||||
- name: Set BRANCH_NAME
|
|
||||||
run: echo "BRANCH_NAME=$(echo $GITHUB_REF_NAME | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install Node.js
|
|
||||||
run: apt-get update && apt-get install -y nodejs
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Reset ccache stats
|
|
||||||
run: ccache --zero-stats
|
|
||||||
|
|
||||||
- name: Run Conan packaging
|
|
||||||
run: |
|
|
||||||
echo "Building ${{ matrix.package.name }}@${{ matrix.package.version }}"
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
|
||||||
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
|
||||||
conan create ./${{ matrix.package.name }}/${{ matrix.package.location }} \
|
|
||||||
--version=${{ matrix.package.version }} \
|
|
||||||
--user=bigfootdev \
|
|
||||||
--channel=${{ env.BRANCH_NAME }} \
|
|
||||||
-pr:b=./ConanProfiles/clang -pr:h=./ConanProfiles/clang \
|
|
||||||
--build=* --remote=bigfootpackages
|
|
||||||
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
|
||||||
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
|
||||||
conan upload ${{ matrix.package.name }}/${{ matrix.package.version }}@bigfootdev/${{ env.BRANCH_NAME }} \
|
|
||||||
--only-recipe --remote=bigfootpackages
|
|
||||||
|
|
||||||
- name: Show ccache stats
|
|
||||||
run: ccache --show-stats
|
|
||||||
|
|
||||||
conan-packages-tier4:
|
|
||||||
needs: conan-packages-tier3
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 120
|
|
||||||
container:
|
|
||||||
image: git.romainboullard.com/bigfootdev/linuxcppbuilder:main
|
|
||||||
env:
|
|
||||||
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
|
|
||||||
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
package: [
|
|
||||||
{ name: "shaderc", version: "2026.1", location: "all" },
|
|
||||||
]
|
|
||||||
name: "Package ${{matrix.package.name }}/${{ matrix.package.version }}"
|
|
||||||
steps:
|
|
||||||
- name: Set BRANCH_NAME
|
|
||||||
run: echo "BRANCH_NAME=$(echo $GITHUB_REF_NAME | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Install Node.js
|
|
||||||
run: apt-get update && apt-get install -y nodejs
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v6
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Reset ccache stats
|
|
||||||
run: ccache --zero-stats
|
|
||||||
|
|
||||||
- name: Run Conan packaging
|
|
||||||
run: |
|
|
||||||
echo "Building ${{ matrix.package.name }}@${{ matrix.package.version }}"
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
|
||||||
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
|
||||||
conan create ./${{ matrix.package.name }}/${{ matrix.package.location }} \
|
|
||||||
--version=${{ matrix.package.version }} \
|
|
||||||
--user=bigfootdev \
|
|
||||||
--channel=${{ env.BRANCH_NAME }} \
|
|
||||||
-pr:b=./ConanProfiles/clang -pr:h=./ConanProfiles/clang \
|
|
||||||
--build=* --remote=bigfootpackages
|
|
||||||
|
|
||||||
CONAN_LOGIN_USERNAME=${ARTIFACTORY_USER} \
|
|
||||||
CONAN_PASSWORD=${ARTIFACTORY_PASSWORD} \
|
|
||||||
conan upload ${{ matrix.package.name }}/${{ matrix.package.version }}@bigfootdev/${{ env.BRANCH_NAME }} \
|
|
||||||
--only-recipe --remote=bigfootpackages
|
|
||||||
|
|
||||||
- name: Show ccache stats
|
|
||||||
run: ccache --show-stats
|
run: ccache --show-stats
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
include_guard()
|
|
||||||
|
|
||||||
# Find ccache executable
|
|
||||||
find_program(CCACHE_PROGRAM NAMES ccache)
|
|
||||||
|
|
||||||
if(CCACHE_PROGRAM)
|
|
||||||
message(STATUS "ccache found: ${CCACHE_PROGRAM}, enabling via CMake launcher and environment.")
|
|
||||||
if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
|
||||||
# Copy original ccache.exe and rename to cl.exe, this way intermediate cmd file is not needed
|
|
||||||
file(COPY_FILE ${CCACHE_PROGRAM} ${CMAKE_BINARY_DIR}/cl.exe ONLY_IF_DIFFERENT)
|
|
||||||
|
|
||||||
# Set Visual Studio global variables:
|
|
||||||
# - Use above cl.exe (ccache.exe) as a compiler
|
|
||||||
# - Enable parallel compilation
|
|
||||||
list(APPEND CMAKE_VS_GLOBALS
|
|
||||||
"CLToolExe=cl.exe"
|
|
||||||
"CLToolPath=${CMAKE_BINARY_DIR}"
|
|
||||||
"UseMultiToolTask=true"
|
|
||||||
"UseStructuredOutput=false"
|
|
||||||
)
|
|
||||||
elseif(CMAKE_GENERATOR MATCHES "Ninja" OR CMAKE_GENERATOR MATCHES "Unix Makefiles")
|
|
||||||
message(STATUS "Using ccache as compiler launcher for Ninja or Makefiles.")
|
|
||||||
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE FILEPATH "CXX compiler cache used" FORCE)
|
|
||||||
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE FILEPATH "C compiler cache used" FORCE)
|
|
||||||
else()
|
|
||||||
message(WARNING "Unsupported generator for ccache integration: ${CMAKE_GENERATOR}. ccache will not be used.")
|
|
||||||
endif()
|
|
||||||
else()
|
|
||||||
message(WARNING "ccache not found. Not enabling ccache integration.")
|
|
||||||
endif()
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
include_guard()
|
|
||||||
|
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
|
|
||||||
|
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
[built-in options]
|
|
||||||
b_lto = true
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Linux
|
|
||||||
arch=x86_64
|
|
||||||
compiler=clang
|
|
||||||
compiler.version=22
|
|
||||||
compiler.libcxx=libstdc++11
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Release
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ccache.cmake
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ipo.cmake
|
|
||||||
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/Toolchains/ipo.ini
|
|
||||||
|
|
||||||
tools.system.package_manager:mode=install
|
|
||||||
tools.system.package_manager:sudo=True
|
|
||||||
|
|
||||||
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/[>=4.2]
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
[settings]
|
|
||||||
os=Windows
|
|
||||||
arch=x86_64
|
|
||||||
compiler=msvc
|
|
||||||
compiler.version=195
|
|
||||||
compiler.cppstd=20
|
|
||||||
compiler.cstd=17
|
|
||||||
compiler.runtime=static
|
|
||||||
build_type=Release
|
|
||||||
|
|
||||||
[conf]
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ccache.cmake
|
|
||||||
tools.cmake.cmaketoolchain:user_toolchain+={{profile_dir}}/Toolchains/ipo.cmake
|
|
||||||
tools.meson.mesontoolchain:extra_machine_files+={{profile_dir}}/Toolchains/ipo.ini
|
|
||||||
|
|
||||||
tools.build:cflags=["/Zc:preprocessor", "/Zc:__STDC__", "/D_CRT_DECLARE_NONSTDC_NAMES=1"]
|
|
||||||
tools.build:cxxflags=["/Zc:preprocessor", "/permissive-", "/Zc:__cplusplus", "/Zc:enumTypes", "/Zc:templateScope"]
|
|
||||||
|
|
||||||
[tool_requires]
|
|
||||||
!cmake/*: cmake/[>=4.2]
|
|
||||||
|
|
||||||
[buildenv]
|
|
||||||
CCACHE_NOHASHDIR=1
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
find_package(minizip REQUIRED CONFIG)
|
|
||||||
link_libraries(minizip::minizip)
|
|
||||||
|
|
||||||
find_package(pugixml REQUIRED CONFIG)
|
|
||||||
link_libraries(pugixml::pugixml)
|
|
||||||
|
|
||||||
find_package(utf8cpp REQUIRED CONFIG)
|
|
||||||
link_libraries(utf8cpp::utf8cpp)
|
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED CONFIG)
|
|
||||||
link_libraries(ZLIB::ZLIB)
|
|
||||||
|
|
||||||
if(WITH_CLIPPER)
|
|
||||||
find_package(clipper REQUIRED CONFIG)
|
|
||||||
link_libraries(clipper::clipper)
|
|
||||||
endif()
|
|
||||||
if(WITH_DRACO)
|
|
||||||
find_package(draco REQUIRED CONFIG)
|
|
||||||
link_libraries(draco::draco)
|
|
||||||
add_definitions(-DASSIMP_ENABLE_DRACO)
|
|
||||||
endif()
|
|
||||||
if(WITH_KUBAZIP)
|
|
||||||
find_package(zip REQUIRED CONFIG)
|
|
||||||
link_libraries(zip::zip)
|
|
||||||
endif()
|
|
||||||
if(WITH_OPENDDL)
|
|
||||||
find_package(openddlparser REQUIRED CONFIG)
|
|
||||||
link_libraries(openddlparser::openddlparser)
|
|
||||||
endif()
|
|
||||||
if(WITH_POLY2TRI)
|
|
||||||
find_package(poly2tri REQUIRED CONFIG)
|
|
||||||
link_libraries(poly2tri::poly2tri)
|
|
||||||
endif()
|
|
||||||
if(WITH_PUGIXML)
|
|
||||||
endif()
|
|
||||||
if(WITH_RAPIDJSON)
|
|
||||||
find_package(RapidJSON REQUIRED CONFIG)
|
|
||||||
link_libraries(rapidjson::rapidjson)
|
|
||||||
endif()
|
|
||||||
if(WITH_STB)
|
|
||||||
find_package(stb REQUIRED CONFIG)
|
|
||||||
link_libraries(stb::stb)
|
|
||||||
endif()
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
sources:
|
|
||||||
"6.0.4":
|
|
||||||
url: "https://github.com/assimp/assimp/archive/refs/tags/v6.0.4.tar.gz"
|
|
||||||
sha256: "afa5487efdd285661afa842c85187cd8c541edad92e8d4aa85be4fca7476eccc"
|
|
||||||
"6.0.2":
|
|
||||||
url: "https://github.com/assimp/assimp/archive/refs/tags/v6.0.2.tar.gz"
|
|
||||||
sha256: "d1822d9a19c9205d6e8bc533bf897174ddb360ce504680f294170cc1d6319751"
|
|
||||||
"5.4.3":
|
|
||||||
url: "https://github.com/assimp/assimp/archive/refs/tags/v5.4.3.tar.gz"
|
|
||||||
sha256: "66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb"
|
|
||||||
@@ -1,329 +0,0 @@
|
|||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import stdcpp_library, check_min_cppstd
|
|
||||||
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
|
|
||||||
from conan.tools.env import VirtualBuildEnv
|
|
||||||
from conan.tools.files import collect_libs, copy, get, replace_in_file, rmdir, save
|
|
||||||
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
import os
|
|
||||||
|
|
||||||
required_conan_version = ">=2"
|
|
||||||
|
|
||||||
|
|
||||||
class AssimpConan(ConanFile):
|
|
||||||
name = "assimp"
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
homepage = "https://github.com/assimp/assimp"
|
|
||||||
description = (
|
|
||||||
"A library to import and export various 3d-model-formats including "
|
|
||||||
"scene-post-processing to generate missing render data."
|
|
||||||
)
|
|
||||||
topics = ("assimp", "3d", "game development", "3mf", "collada")
|
|
||||||
license = "BSD-3-Clause"
|
|
||||||
package_type = "library"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
options = {
|
|
||||||
"shared": [True, False],
|
|
||||||
"fPIC": [True, False],
|
|
||||||
"double_precision": [True, False],
|
|
||||||
}
|
|
||||||
default_options = {
|
|
||||||
"shared": False,
|
|
||||||
"fPIC": True,
|
|
||||||
"double_precision": False,
|
|
||||||
}
|
|
||||||
|
|
||||||
_format_option_map = {
|
|
||||||
"with_3d": ("ASSIMP_BUILD_3D_IMPORTER", "5.0.0"),
|
|
||||||
"with_3ds": ("ASSIMP_BUILD_3DS_IMPORTER", "5.0.0"),
|
|
||||||
"with_3ds_exporter": ("ASSIMP_BUILD_3DS_EXPORTER", "5.0.0"),
|
|
||||||
"with_3mf": ("ASSIMP_BUILD_3MF_IMPORTER", "5.0.0"),
|
|
||||||
"with_3mf_exporter": ("ASSIMP_BUILD_3MF_EXPORTER", "5.0.0"),
|
|
||||||
"with_ac": ("ASSIMP_BUILD_AC_IMPORTER", "5.0.0"),
|
|
||||||
"with_amf": ("ASSIMP_BUILD_AMF_IMPORTER", "5.0.0"),
|
|
||||||
"with_ase": ("ASSIMP_BUILD_ASE_IMPORTER", "5.0.0"),
|
|
||||||
"with_assbin": ("ASSIMP_BUILD_ASSBIN_IMPORTER", "5.0.0"),
|
|
||||||
"with_assbin_exporter": ("ASSIMP_BUILD_ASSBIN_EXPORTER", "5.0.0"),
|
|
||||||
"with_assxml_exporter": ("ASSIMP_BUILD_ASSXML_EXPORTER", "5.0.0"),
|
|
||||||
"with_assjson_exporter": ("ASSIMP_BUILD_ASSJSON_EXPORTER", "5.0.0"),
|
|
||||||
"with_b3d": ("ASSIMP_BUILD_B3D_IMPORTER", "5.0.0"),
|
|
||||||
"with_blend": ("ASSIMP_BUILD_BLEND_IMPORTER", "5.0.0"),
|
|
||||||
"with_bvh": ("ASSIMP_BUILD_BVH_IMPORTER", "5.0.0"),
|
|
||||||
"with_ms3d": ("ASSIMP_BUILD_MS3D_IMPORTER", "5.0.0"),
|
|
||||||
"with_cob": ("ASSIMP_BUILD_COB_IMPORTER", "5.0.0"),
|
|
||||||
"with_collada": ("ASSIMP_BUILD_COLLADA_IMPORTER", "5.0.0"),
|
|
||||||
"with_collada_exporter": ("ASSIMP_BUILD_COLLADA_EXPORTER", "5.0.0"),
|
|
||||||
"with_csm": ("ASSIMP_BUILD_CSM_IMPORTER", "5.0.0"),
|
|
||||||
"with_dxf": ("ASSIMP_BUILD_DXF_IMPORTER", "5.0.0"),
|
|
||||||
"with_fbx": ("ASSIMP_BUILD_FBX_IMPORTER", "5.0.0"),
|
|
||||||
"with_fbx_exporter": ("ASSIMP_BUILD_FBX_EXPORTER", "5.0.0"),
|
|
||||||
"with_gltf": ("ASSIMP_BUILD_GLTF_IMPORTER", "5.0.0"),
|
|
||||||
"with_gltf_exporter": ("ASSIMP_BUILD_GLTF_EXPORTER", "5.0.0"),
|
|
||||||
"with_hmp": ("ASSIMP_BUILD_HMP_IMPORTER", "5.0.0"),
|
|
||||||
"with_ifc": ("ASSIMP_BUILD_IFC_IMPORTER", "5.0.0"),
|
|
||||||
"with_irr": ("ASSIMP_BUILD_IRR_IMPORTER", "5.0.0"),
|
|
||||||
"with_irrmesh": ("ASSIMP_BUILD_IRRMESH_IMPORTER", "5.0.0"),
|
|
||||||
"with_lwo": ("ASSIMP_BUILD_LWO_IMPORTER", "5.0.0"),
|
|
||||||
"with_lws": ("ASSIMP_BUILD_LWS_IMPORTER", "5.0.0"),
|
|
||||||
"with_md2": ("ASSIMP_BUILD_MD2_IMPORTER", "5.0.0"),
|
|
||||||
"with_md3": ("ASSIMP_BUILD_MD3_IMPORTER", "5.0.0"),
|
|
||||||
"with_md5": ("ASSIMP_BUILD_MD5_IMPORTER", "5.0.0"),
|
|
||||||
"with_mdc": ("ASSIMP_BUILD_MDC_IMPORTER", "5.0.0"),
|
|
||||||
"with_mdl": ("ASSIMP_BUILD_MDL_IMPORTER", "5.0.0"),
|
|
||||||
"with_mmd": ("ASSIMP_BUILD_MMD_IMPORTER", "5.0.0"),
|
|
||||||
"with_ndo": ("ASSIMP_BUILD_NDO_IMPORTER", "5.0.0"),
|
|
||||||
"with_nff": ("ASSIMP_BUILD_NFF_IMPORTER", "5.0.0"),
|
|
||||||
"with_obj": ("ASSIMP_BUILD_OBJ_IMPORTER", "5.0.0"),
|
|
||||||
"with_obj_exporter": ("ASSIMP_BUILD_OBJ_EXPORTER", "5.0.0"),
|
|
||||||
"with_off": ("ASSIMP_BUILD_OFF_IMPORTER", "5.0.0"),
|
|
||||||
"with_ogre": ("ASSIMP_BUILD_OGRE_IMPORTER", "5.0.0"),
|
|
||||||
"with_opengex": ("ASSIMP_BUILD_OPENGEX_IMPORTER", "5.0.0"),
|
|
||||||
"with_opengex_exporter": ("ASSIMP_BUILD_OPENGEX_EXPORTER", "5.0.0"),
|
|
||||||
"with_pbrt_exporter": ("ASSIMP_BUILD_PBRT_EXPORTER", "5.1.0"),
|
|
||||||
"with_ply": ("ASSIMP_BUILD_PLY_IMPORTER", "5.0.0"),
|
|
||||||
"with_ply_exporter": ("ASSIMP_BUILD_PLY_EXPORTER", "5.0.0"),
|
|
||||||
"with_q3bsp": ("ASSIMP_BUILD_Q3BSP_IMPORTER", "5.0.0"),
|
|
||||||
"with_q3d": ("ASSIMP_BUILD_Q3D_IMPORTER", "5.0.0"),
|
|
||||||
"with_raw": ("ASSIMP_BUILD_RAW_IMPORTER", "5.0.0"),
|
|
||||||
"with_sib": ("ASSIMP_BUILD_SIB_IMPORTER", "5.0.0"),
|
|
||||||
"with_smd": ("ASSIMP_BUILD_SMD_IMPORTER", "5.0.0"),
|
|
||||||
"with_step": ("ASSIMP_BUILD_STEP_IMPORTER", "5.0.0"),
|
|
||||||
"with_step_exporter": ("ASSIMP_BUILD_STEP_EXPORTER", "5.0.0"),
|
|
||||||
"with_stl": ("ASSIMP_BUILD_STL_IMPORTER", "5.0.0"),
|
|
||||||
"with_stl_exporter": ("ASSIMP_BUILD_STL_EXPORTER", "5.0.0"),
|
|
||||||
"with_terragen": ("ASSIMP_BUILD_TERRAGEN_IMPORTER", "5.0.0"),
|
|
||||||
"with_x": ("ASSIMP_BUILD_X_IMPORTER", "5.0.0"),
|
|
||||||
"with_x_exporter": ("ASSIMP_BUILD_X_EXPORTER", "5.0.0"),
|
|
||||||
"with_x3d": ("ASSIMP_BUILD_X3D_IMPORTER", "5.0.0"),
|
|
||||||
"with_x3d_exporter": ("ASSIMP_BUILD_X3D_EXPORTER", "5.0.0"),
|
|
||||||
"with_xgl": ("ASSIMP_BUILD_XGL_IMPORTER", "5.0.0"),
|
|
||||||
"with_m3d": ("ASSIMP_BUILD_M3D_IMPORTER", "5.1.0"),
|
|
||||||
"with_m3d_exporter": ("ASSIMP_BUILD_M3D_EXPORTER", "5.1.0"),
|
|
||||||
"with_iqm": ("ASSIMP_BUILD_IQM_IMPORTER", "5.2.0"),
|
|
||||||
}
|
|
||||||
options.update(dict.fromkeys(_format_option_map, [True, False]))
|
|
||||||
default_options.update(dict.fromkeys(_format_option_map, True))
|
|
||||||
|
|
||||||
def export_sources(self):
|
|
||||||
copy(self, "conan_deps.cmake", self.recipe_folder, os.path.join(self.export_sources_folder, "src"))
|
|
||||||
|
|
||||||
def config_options(self):
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
del self.options.fPIC
|
|
||||||
|
|
||||||
for option, (_, min_version) in self._format_option_map.items():
|
|
||||||
if Version(self.version) < Version(min_version):
|
|
||||||
delattr(self.options, option)
|
|
||||||
|
|
||||||
def configure(self):
|
|
||||||
if self.options.shared:
|
|
||||||
self.options.rm_safe("fPIC")
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _depends_on_kuba_zip(self):
|
|
||||||
return self.options.with_3mf_exporter
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _depends_on_poly2tri(self):
|
|
||||||
return self.options.with_blend or self.options.with_ifc
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _depends_on_rapidjson(self):
|
|
||||||
return self.options.with_gltf or self.options.with_gltf_exporter
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _depends_on_draco(self):
|
|
||||||
return self.options.with_gltf or self.options.with_gltf_exporter
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _depends_on_clipper(self):
|
|
||||||
return self.options.with_ifc
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _depends_on_stb(self):
|
|
||||||
return self.options.with_m3d or self.options.with_m3d_exporter or \
|
|
||||||
self.options.with_pbrt_exporter
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _depends_on_openddlparser(self):
|
|
||||||
return self.options.with_opengex
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
# TODO: unvendor others libs:
|
|
||||||
# - Open3DGC
|
|
||||||
self.requires("minizip/1.2.13")
|
|
||||||
self.requires("pugixml/1.14")
|
|
||||||
self.requires("utfcpp/4.0.1")
|
|
||||||
self.requires("zlib/[>=1.2.11 <2]")
|
|
||||||
if self._depends_on_kuba_zip:
|
|
||||||
self.requires("kuba-zip/0.3.0")
|
|
||||||
if self._depends_on_poly2tri:
|
|
||||||
self.requires("poly2tri/cci.20130502")
|
|
||||||
if self._depends_on_rapidjson:
|
|
||||||
self.requires("rapidjson/cci.20230929")
|
|
||||||
if self._depends_on_draco:
|
|
||||||
self.requires("draco/1.5.6")
|
|
||||||
if self._depends_on_clipper:
|
|
||||||
self.requires("clipper/6.4.2")
|
|
||||||
if self._depends_on_stb:
|
|
||||||
self.requires("stb/cci.20230920")
|
|
||||||
if self._depends_on_openddlparser:
|
|
||||||
self.requires("openddl-parser/0.5.1")
|
|
||||||
|
|
||||||
def validate_build(self):
|
|
||||||
check_min_cppstd(self, 17)
|
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
check_min_cppstd(self, 11)
|
|
||||||
|
|
||||||
def build_requirements(self):
|
|
||||||
self.tool_requires("cmake/[>=3.22]")
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
self._patch_sources()
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["ASSIMP_ANDROID_JNIIOSYSTEM"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_ASSIMP_TOOLS"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_DOCS"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_DRACO"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_FRAMEWORK"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_MINIZIP"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_SAMPLES"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_TESTS"] = False
|
|
||||||
tc.variables["ASSIMP_BUILD_ZLIB"] = False
|
|
||||||
tc.variables["ASSIMP_DOUBLE_PRECISION"] = self.options.double_precision
|
|
||||||
tc.variables["ASSIMP_HUNTER_ENABLED"] = False
|
|
||||||
tc.variables["ASSIMP_IGNORE_GIT_HASH"] = True
|
|
||||||
tc.variables["ASSIMP_INJECT_DEBUG_POSTFIX"] = False
|
|
||||||
tc.variables["ASSIMP_INSTALL"] = True
|
|
||||||
tc.variables["ASSIMP_INSTALL_PDB"] = False
|
|
||||||
tc.variables["ASSIMP_NO_EXPORT"] = False
|
|
||||||
tc.variables["ASSIMP_OPT_BUILD_PACKAGES"] = False
|
|
||||||
tc.variables["ASSIMP_RAPIDJSON_NO_MEMBER_ITERATOR"] = False
|
|
||||||
tc.variables["ASSIMP_UBSAN"] = False
|
|
||||||
tc.variables["ASSIMP_WARNINGS_AS_ERRORS"] = False
|
|
||||||
tc.variables["USE_STATIC_CRT"] = is_msvc_static_runtime(self)
|
|
||||||
tc.cache_variables["ASSIMP_BUILD_USE_CCACHE"] = False
|
|
||||||
|
|
||||||
for option, (definition, _) in self._format_option_map.items():
|
|
||||||
value = self.options.get_safe(option)
|
|
||||||
if value is not None:
|
|
||||||
tc.variables[definition] = value
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
tc.preprocessor_definitions["NOMINMAX"] = 1
|
|
||||||
|
|
||||||
tc.cache_variables["CMAKE_PROJECT_Assimp_INCLUDE"] = "conan_deps.cmake"
|
|
||||||
tc.cache_variables["WITH_CLIPPER"] = self._depends_on_clipper
|
|
||||||
tc.cache_variables["WITH_DRACO"] = self._depends_on_draco
|
|
||||||
tc.cache_variables["WITH_KUBAZIP"] = self._depends_on_kuba_zip
|
|
||||||
tc.cache_variables["WITH_OPENDDL"] = self._depends_on_openddlparser
|
|
||||||
tc.cache_variables["WITH_POLY2TRI"] = self._depends_on_poly2tri
|
|
||||||
tc.cache_variables["WITH_RAPIDJSON"] = self._depends_on_rapidjson
|
|
||||||
tc.cache_variables["WITH_STB"] = self._depends_on_stb
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
cd = CMakeDeps(self)
|
|
||||||
cd.set_property("rapidjson", "cmake_target_name", "rapidjson::rapidjson")
|
|
||||||
cd.set_property("utfcpp", "cmake_target_name", "utf8cpp::utf8cpp")
|
|
||||||
cd.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
# Don't force several compiler and linker flags
|
|
||||||
for pattern in [
|
|
||||||
"-fPIC",
|
|
||||||
"-g ",
|
|
||||||
"SET(CMAKE_POSITION_INDEPENDENT_CODE ON)",
|
|
||||||
'SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /D_DEBUG /Zi /Od")',
|
|
||||||
'SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /PDBALTPATH:%_PDB% /OPT:REF /OPT:ICF")',
|
|
||||||
]:
|
|
||||||
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), pattern, "")
|
|
||||||
|
|
||||||
for pattern in ["-Werror", "/WX"]:
|
|
||||||
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"), pattern, "")
|
|
||||||
replace_in_file(self, os.path.join(self.source_folder, "code", "CMakeLists.txt"), pattern, "")
|
|
||||||
|
|
||||||
# Make sure vendored libs are not used by accident by removing their subdirs
|
|
||||||
allow_vendored = ["Open3DGC", "earcut-hpp"]
|
|
||||||
for contrib_dir in Path(self.source_folder).joinpath("contrib").iterdir():
|
|
||||||
if contrib_dir.is_dir() and contrib_dir.name not in allow_vendored:
|
|
||||||
rmdir(self, contrib_dir)
|
|
||||||
|
|
||||||
# Do not include add vendored library sources to the build
|
|
||||||
# https://github.com/assimp/assimp/blob/v5.3.1/code/CMakeLists.txt#L1151-L1159
|
|
||||||
code_cmakelists = Path(self.source_folder).joinpath("code", "CMakeLists.txt")
|
|
||||||
content = code_cmakelists.read_text(encoding="utf-8")
|
|
||||||
for vendored_lib in [
|
|
||||||
"unzip_compile",
|
|
||||||
"Poly2Tri",
|
|
||||||
"Clipper",
|
|
||||||
"openddl_parser",
|
|
||||||
# "open3dgc",
|
|
||||||
"ziplib",
|
|
||||||
"Pugixml",
|
|
||||||
"stb",
|
|
||||||
]:
|
|
||||||
content = content.replace("${%s_SRCS}" % vendored_lib, "")
|
|
||||||
code_cmakelists.write_text(content, encoding="utf-8")
|
|
||||||
|
|
||||||
# Make vendored headers redirect to external ones.
|
|
||||||
for contrib_header, include in [
|
|
||||||
(os.path.join("clipper", "clipper.hpp"), "polyclipping/clipper.hpp"),
|
|
||||||
(os.path.join("poly2tri", "poly2tri", "poly2tri.h"), "poly2tri/poly2tri.h"),
|
|
||||||
(os.path.join("stb", "stb_image.h"), "stb_image.h"),
|
|
||||||
(os.path.join("utf8cpp", "source", "utf8.h"), "utf8.h"),
|
|
||||||
(os.path.join("zip", "src", "zip.h"), "zip/zip.h"),
|
|
||||||
]:
|
|
||||||
save(self, os.path.join(self.source_folder, "contrib", contrib_header),
|
|
||||||
f"#include <{include}>\n")
|
|
||||||
rmdir(self, os.path.join(self.source_folder, "contrib", "utf8cpp"))
|
|
||||||
|
|
||||||
# minizip is provided via conan_deps.cmake, no need to use pkgconfig
|
|
||||||
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
|
|
||||||
"use_pkgconfig(UNZIP minizip)", "set(UNZIP_FOUND TRUE)")
|
|
||||||
|
|
||||||
# ZLIB is unvendored, no need to install it
|
|
||||||
# https://github.com/assimp/assimp/blob/v5.3.1/CMakeLists.txt#L483-L487
|
|
||||||
# https://github.com/assimp/assimp/blob/v5.1.6/CMakeLists.txt#L463-L466
|
|
||||||
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
|
|
||||||
"INSTALL( TARGETS zlib", "set(_ #")
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "assimp")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "assimp::assimp")
|
|
||||||
self.cpp_info.set_property("pkg_config_name", "assimp")
|
|
||||||
# Always ever just 1 library, but with some suffix variations
|
|
||||||
# that make it hard to map manually
|
|
||||||
self.cpp_info.libs = collect_libs(self)
|
|
||||||
if is_msvc(self) and self.options.shared:
|
|
||||||
self.cpp_info.defines.append("ASSIMP_DLL")
|
|
||||||
if self.settings.os in ["Linux", "FreeBSD"]:
|
|
||||||
self.cpp_info.system_libs = ["rt", "m", "pthread"]
|
|
||||||
elif self.settings.os == "WindowsStore":
|
|
||||||
self.cpp_info.system_libs.append("advapi32")
|
|
||||||
self.cpp_info.defines.append("WindowsStore")
|
|
||||||
if not self.options.shared:
|
|
||||||
libcxx = stdcpp_library(self)
|
|
||||||
if libcxx:
|
|
||||||
self.cpp_info.system_libs.append(libcxx)
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES C CXX)
|
|
||||||
|
|
||||||
find_package(assimp REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE assimp::assimp)
|
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}_c test_package.c)
|
|
||||||
target_link_libraries(${PROJECT_NAME}_c PRIVATE assimp::assimp)
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
|
|
||||||
bin_c_path = os.path.join(self.cpp.build.bindirs[0], "test_package_c")
|
|
||||||
self.run(bin_c_path, env="conanrun")
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <assimp/cimport.h>
|
|
||||||
#include <assimp/scene.h>
|
|
||||||
#include <assimp/postprocess.h>
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
const C_STRUCT aiScene *scene = aiImportFile("",
|
|
||||||
aiProcess_CalcTangentSpace |
|
|
||||||
aiProcess_Triangulate |
|
|
||||||
aiProcess_JoinIdenticalVertices |
|
|
||||||
aiProcess_SortByPType);
|
|
||||||
|
|
||||||
aiReleaseImport(scene);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#include <iostream>
|
|
||||||
|
|
||||||
#include <assimp/Importer.hpp>
|
|
||||||
#include <assimp/scene.h>
|
|
||||||
#include <assimp/postprocess.h>
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
Assimp::Importer importer;
|
|
||||||
const aiScene* scene = importer.ReadFile("",
|
|
||||||
aiProcess_CalcTangentSpace |
|
|
||||||
aiProcess_Triangulate |
|
|
||||||
aiProcess_JoinIdenticalVertices |
|
|
||||||
aiProcess_SortByPType);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
versions:
|
|
||||||
"6.0.4":
|
|
||||||
folder: "5.x"
|
|
||||||
"6.0.2":
|
|
||||||
folder: "5.x"
|
|
||||||
"5.4.3":
|
|
||||||
folder: "5.x"
|
|
||||||
24
clang
Normal file
24
clang
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
[settings]
|
||||||
|
os=Linux
|
||||||
|
arch=x86_64
|
||||||
|
compiler=clang
|
||||||
|
compiler.version=18
|
||||||
|
compiler.libcxx=libstdc++11
|
||||||
|
compiler.cppstd=20
|
||||||
|
compiler.cstd=17
|
||||||
|
build_type=Release
|
||||||
|
[conf]
|
||||||
|
tools.cmake.cmaketoolchain:extra_variables={'CMAKE_CXX_COMPILER_LAUNCHER': 'ccache', 'CMAKE_C_COMPILER_LAUNCHER': 'ccache'}
|
||||||
|
tools.cmake.cmaketoolchain:generator=Ninja
|
||||||
|
tools.system.package_manager:mode=install
|
||||||
|
tools.system.package_manager:sudo=True
|
||||||
|
tools.build:compiler_executables={"c": "clang", "cpp": "clang++"}
|
||||||
|
|
||||||
|
tools.build:exelinkflags=["-fuse-ld=mold", "-flto"]
|
||||||
|
tools.build:sharedlinkflags=["-fuse-ld=mold", "-flto"]
|
||||||
|
|
||||||
|
tools.build:cflags=["-flto"]
|
||||||
|
tools.build:cxxflags=["-flto"]
|
||||||
|
|
||||||
|
[tool_requires]
|
||||||
|
!cmake/*: cmake/[>=4.2]
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
sources:
|
|
||||||
"2.6.1":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.6.1.tar.gz"
|
|
||||||
sha256: "377691f3fac2b340f12a2f79f523c780564578ba3d6eaf5238e9f35895d5ba95"
|
|
||||||
"2.6.0":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.6.0.tar.gz"
|
|
||||||
sha256: "8c11bc049090a66cb71c3e90350cddaa792b2a45e0a7841799900b95ca38b101"
|
|
||||||
"2.5.0":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.5.0.tar.gz"
|
|
||||||
sha256: "17e02b4cddc2fa348e5dbdbb582c59a3486fa2b2433e70a0c3bacb871334fd55"
|
|
||||||
"2.4.2":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.4.2.tar.gz"
|
|
||||||
sha256: "f2d893a65c3b1324c50d4e682c0cdc021dd0477ae2c048544f39eed6654b699a"
|
|
||||||
"2.4.1":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.4.1.tar.gz"
|
|
||||||
sha256: "73b7ec52261ce8fe980a29df6b4ceb66243bb0b779451dbd3d014cfec9fdbb58"
|
|
||||||
"2.4.0":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.4.0.tar.gz"
|
|
||||||
sha256: "d2ce8d5318d2a7a7d1120e2a18caac49cd65423d5d4158cbbc0267e6768af522"
|
|
||||||
"2.3.2":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.3.2.tar.gz"
|
|
||||||
sha256: "aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22"
|
|
||||||
"2.3.1":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.3.1.tar.gz"
|
|
||||||
sha256: "378da73d2d1d9a7b82ad6ed2b5bda3e7bc7093c4034a1d680a2e009eb067e7b2"
|
|
||||||
"2.3.0":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.3.0.tar.gz"
|
|
||||||
sha256: "b6e116ca1555e2b7f2743fd41e3bd18149baae791acd98eb653e5b07e0f20561"
|
|
||||||
"2.2.0":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.2.0.tar.gz"
|
|
||||||
sha256: "d60440dc4d43255f872d174e416705f56ba40589f6eb07727f76376fb8378fd6"
|
|
||||||
"2.1.2":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.1.2.tar.gz"
|
|
||||||
sha256: "26291377e892ba0e5b4972cdfd4a2ab3bf53af8dac1f4ea8fe0d1376b625c8cb"
|
|
||||||
"2.1.1":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.1.1.tar.gz"
|
|
||||||
sha256: "d69023d1d0ab6a22be86b4f59d449422bc5efd9121868f4e284d6042e52f682e"
|
|
||||||
"2.0.0":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v2.0.0.tar.gz"
|
|
||||||
sha256: "2c672f17bf56e8e6223a3bfb74055a946fa7b1ff376510371902adb9cb0ab6a3"
|
|
||||||
"1.9.1":
|
|
||||||
url: "https://github.com/CLIUtils/CLI11/archive/v1.9.1.tar.gz"
|
|
||||||
sha256: "c780cf8cf3ba5ec2648a7eeb20a47e274493258f38a9b417628e0576f473a50b"
|
|
||||||
@@ -1,96 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.files import get, copy, rmdir
|
|
||||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
|
||||||
from conan.tools.build import check_min_cppstd
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
import os
|
|
||||||
|
|
||||||
required_conan_version = ">=1.52.0"
|
|
||||||
|
|
||||||
class CLI11Conan(ConanFile):
|
|
||||||
name = "cli11"
|
|
||||||
description = "A command line parser for C++11 and beyond."
|
|
||||||
license = "BSD-3-Clause"
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
homepage = "https://github.com/CLIUtils/CLI11"
|
|
||||||
topics = "cli-parser", "cpp11", "no-dependencies", "cli"
|
|
||||||
package_type = "header-library"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
no_copy_source = True
|
|
||||||
|
|
||||||
options = {
|
|
||||||
"header_only": [True, False]
|
|
||||||
}
|
|
||||||
default_options = {
|
|
||||||
"header_only": True
|
|
||||||
}
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _min_cppstd(self):
|
|
||||||
return "11"
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _supports_compilation(self):
|
|
||||||
return Version(self.version) >= "2.3"
|
|
||||||
|
|
||||||
def configure(self):
|
|
||||||
if not self._supports_compilation:
|
|
||||||
# TODO: Back to config_options after Conan 1 freeze
|
|
||||||
del self.options.header_only
|
|
||||||
elif not self.options.header_only:
|
|
||||||
self.package_type = "static-library"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def package_id(self):
|
|
||||||
if not self._supports_compilation or self.info.options.header_only:
|
|
||||||
self.info.clear()
|
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
if self.settings.compiler.get_safe("cppstd"):
|
|
||||||
check_min_cppstd(self, self._min_cppstd)
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
if self._supports_compilation:
|
|
||||||
tc.variables["CLI11_PRECOMPILED"] = not self.options.header_only
|
|
||||||
tc.variables["CLI11_BUILD_EXAMPLES"] = False
|
|
||||||
tc.variables["CLI11_BUILD_TESTS"] = False
|
|
||||||
tc.variables["CLI11_BUILD_DOCS"] = False
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
|
|
||||||
# since 2.1.1
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "share"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.bindirs = []
|
|
||||||
self.cpp_info.libdirs = []
|
|
||||||
|
|
||||||
if self._supports_compilation and not self.options.get_safe("header_only"):
|
|
||||||
self.cpp_info.libdirs = ["lib"]
|
|
||||||
self.cpp_info.libs = ["CLI11"]
|
|
||||||
self.cpp_info.defines = ["CLI11_COMPILE"]
|
|
||||||
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "CLI11")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "CLI11::CLI11")
|
|
||||||
self.cpp_info.set_property("pkg_config_name", "CLI11")
|
|
||||||
|
|
||||||
# TODO: to remove in conan v2 once cmake_find_package_* generators removed
|
|
||||||
self.cpp_info.names["cmake_find_package"] = "CLI11"
|
|
||||||
self.cpp_info.names["cmake_find_package_multi"] = "CLI11"
|
|
||||||
self.cpp_info.names["pkg_config"] = "CLI11"
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES CXX)
|
|
||||||
|
|
||||||
find_package(CLI11 REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${CMAKE_PROJECT_NAME} test_package.cpp)
|
|
||||||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE CLI11::CLI11)
|
|
||||||
|
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import cmake_layout, CMake
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#include <CLI/CLI.hpp>
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
CLI::App app("Test App");
|
|
||||||
CLI11_PARSE(app, argc, argv);
|
|
||||||
|
|
||||||
std::cout << app.help() << '\n';
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
versions:
|
|
||||||
"2.6.1":
|
|
||||||
folder: all
|
|
||||||
"2.6.0":
|
|
||||||
folder: all
|
|
||||||
"2.5.0":
|
|
||||||
folder: all
|
|
||||||
"2.4.2":
|
|
||||||
folder: all
|
|
||||||
"2.4.1":
|
|
||||||
folder: all
|
|
||||||
"2.4.0":
|
|
||||||
folder: all
|
|
||||||
"2.3.2":
|
|
||||||
folder: all
|
|
||||||
"2.3.1":
|
|
||||||
folder: all
|
|
||||||
"2.3.0":
|
|
||||||
folder: all
|
|
||||||
"2.2.0":
|
|
||||||
folder: all
|
|
||||||
"2.1.2":
|
|
||||||
folder: all
|
|
||||||
"2.1.1":
|
|
||||||
folder: all
|
|
||||||
"2.0.0":
|
|
||||||
folder: all
|
|
||||||
"1.9.1":
|
|
||||||
folder: all
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"25.12.19-2026-02-06-03fffb2-bigfoot":
|
|
||||||
url: "https://git.romainboullard.com/BigfootDev/flatbuffers-bigfoot/archive/v25.12.19-2026-02-06-03fffb2-bigfoot.tar.gz"
|
|
||||||
sha256: "501a1907df28950c50389b5f1c53c40cbb70428c20d9094ae57bb700a80f27c5"
|
|
||||||
"25.12.19":
|
"25.12.19":
|
||||||
url: "https://github.com/google/flatbuffers/archive/v25.12.19.tar.gz"
|
url: "https://github.com/google/flatbuffers/archive/v25.12.19.tar.gz"
|
||||||
sha256: "f81c3162b1046fe8b84b9a0dbdd383e24fdbcf88583b9cb6028f90d04d90696a"
|
sha256: "f81c3162b1046fe8b84b9a0dbdd383e24fdbcf88583b9cb6028f90d04d90696a"
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
versions:
|
versions:
|
||||||
"25.12.19-2026-02-06-03fffb2-bigfoot":
|
|
||||||
folder: all
|
|
||||||
"25.12.19":
|
"25.12.19":
|
||||||
folder: all
|
folder: all
|
||||||
"25.9.23":
|
"25.9.23":
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
sources:
|
|
||||||
"1.0.3":
|
|
||||||
url: "https://github.com/g-truc/glm/releases/download/1.0.3/glm-1.0.3.zip"
|
|
||||||
sha256: "1c0a0fced9b0d87c7b7bc94e40be490cff6d4c83c25db8488d8f33754e7fdeb2"
|
|
||||||
"1.0.1":
|
|
||||||
url: "https://github.com/g-truc/glm/releases/download/1.0.1/glm-1.0.1-light.zip"
|
|
||||||
sha256: "9A995DE4DA09723BD33EF194E6B79818950E5A8F2E154792F02E4615277CFB8D"
|
|
||||||
"0.9.9.8":
|
|
||||||
url: "https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip"
|
|
||||||
sha256: "37e2a3d62ea3322e43593c34bae29f57e3e251ea89f4067506c94043769ade4c"
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.files import copy, get
|
|
||||||
from conan.tools.layout import basic_layout
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
import os
|
|
||||||
|
|
||||||
required_conan_version = ">=1.50.0"
|
|
||||||
|
|
||||||
|
|
||||||
class GlmConan(ConanFile):
|
|
||||||
name = "glm"
|
|
||||||
description = "OpenGL Mathematics (GLM)"
|
|
||||||
topics = ("glm", "opengl", "mathematics")
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
homepage = "https://github.com/g-truc/glm"
|
|
||||||
license = "MIT"
|
|
||||||
package_type = "header-library"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
no_copy_source = True
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
basic_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def package_id(self):
|
|
||||||
self.info.clear()
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=self.version < Version("1.0.0"))
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
if self.version < Version("1.0.0"):
|
|
||||||
copy(self, "copying.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
else:
|
|
||||||
copy(self, "copying.txt", src=os.path.join(self.source_folder, "glm"), dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
|
|
||||||
if self.version < Version("1.0.2"):
|
|
||||||
for headers in ("*.hpp", "*.inl", "*.h", "*.cppm"):
|
|
||||||
copy(self, headers, src=os.path.join(self.source_folder, "glm"),
|
|
||||||
dst=os.path.join(self.package_folder, "include", "glm"))
|
|
||||||
else:
|
|
||||||
for headers in ("*.hpp", "*.inl", "*.h", "*.cppm"):
|
|
||||||
copy(self, headers, src=os.path.join(self.source_folder, "glm"),
|
|
||||||
dst=os.path.join(self.package_folder, "include"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "glm")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "glm::glm")
|
|
||||||
self.cpp_info.bindirs = []
|
|
||||||
self.cpp_info.libdirs = []
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES CXX)
|
|
||||||
|
|
||||||
find_package(glm REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE glm::glm)
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#include <cstdlib>
|
|
||||||
#include "glm/glm.hpp"
|
|
||||||
|
|
||||||
int main (int argc, char * argv[]) {
|
|
||||||
glm::vec4 position = glm::vec4(glm::vec3(0.0), 1.0);
|
|
||||||
glm::mat4 model = glm::mat4(1.0);
|
|
||||||
model[3] = glm::vec4(1.0, 1.0, 0.0, 1.0);
|
|
||||||
glm::vec4 transformed = model * position;
|
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
versions:
|
|
||||||
"1.0.3":
|
|
||||||
folder: all
|
|
||||||
"1.0.1":
|
|
||||||
folder: all
|
|
||||||
"0.9.9.8":
|
|
||||||
folder: all
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(cmake_wrapper)
|
|
||||||
|
|
||||||
# TODO:
|
|
||||||
# - It should be find_package(SPIRV-Tools-opt REQUIRED CONFIG), but it can't be
|
|
||||||
# modeled yet in spirv-tools recipe.
|
|
||||||
# - Upstream CMakeLists is not very neat, and doesn't always link
|
|
||||||
# Spirv-Tools-opt in all required targets. Keep in mind that it works thanks
|
|
||||||
# to global injection of include dirs/interface definitions from
|
|
||||||
# conan_basic_setup(). It won't work without patches when moving to
|
|
||||||
# CMakeToolchain + CMakeDeps.
|
|
||||||
if(ENABLE_OPT)
|
|
||||||
find_package(SPIRV-Tools REQUIRED CONFIG)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(src)
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# Add only the SDK release versions from https://github.com/KhronosGroup/glslang/tags for consistency
|
|
||||||
sources:
|
|
||||||
"1.4.341.0":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/vulkan-sdk-1.4.341.0.tar.gz"
|
|
||||||
sha256: "18cdf7d40a39001dde842c6a1338b2c9321ac5e487139b9d52b4b9c666da3c86"
|
|
||||||
"1.4.313.0":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
|
||||||
sha256: "555ac780ccceca926fa25775834639ce6ffc744120bfb68fb8657dd4032d21ee"
|
|
||||||
"1.3.268.0":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz"
|
|
||||||
sha256: "8cfb4824f185bc246cd41cceedbfcdf14abd3d2fa861512baf81df8a263b9283"
|
|
||||||
"1.3.261.1":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.261.1.tar.gz"
|
|
||||||
sha256: "eb1f9c2ff0a1409151d7749fb37bc1988dc1fd908444c1e4f43d4190c90befcd"
|
|
||||||
"1.3.243.0":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.243.0.tar.gz"
|
|
||||||
sha256: "18b8f296874ac19d034bfb9060238c87b6d67a39af0dfd305d3252762c265f9f"
|
|
||||||
"1.3.239.0":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.239.0.tar.gz"
|
|
||||||
sha256: "8b040328c18399b7bbf5bef84fac3d7b7376b39ec6833b7e19b7961bf7a72017"
|
|
||||||
"1.3.236.0":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.3.236.0.tar.gz"
|
|
||||||
sha256: "fb6f323a36efcd98766bb72f598008f73c4c92bce69c79fc98ad2b3cdca0c263"
|
|
||||||
"1.2.198.0":
|
|
||||||
url: "https://github.com/KhronosGroup/glslang/archive/refs/tags/sdk-1.2.198.0.tar.gz"
|
|
||||||
sha256: "b2a0541caf01de4fc411cbb32c805a3bd0f6578432e532c5fa6336d187a4a1b1"
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
from conan import ConanFile
|
|
||||||
from conan.errors import ConanInvalidConfiguration, ConanException
|
|
||||||
from conan.tools.build import check_min_cppstd
|
|
||||||
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
|
|
||||||
from conan.tools.env import VirtualBuildEnv
|
|
||||||
from conan.tools.files import copy, get, rmdir
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
|
|
||||||
required_conan_version = ">=2.1"
|
|
||||||
|
|
||||||
|
|
||||||
class GlslangConan(ConanFile):
|
|
||||||
name = "glslang"
|
|
||||||
description = "Khronos-reference front end for GLSL/ESSL, partial front " \
|
|
||||||
"end for HLSL, and a SPIR-V generator."
|
|
||||||
license = "DocumentRef-LICENSE.txt:LicenseRef-glslang"
|
|
||||||
topics = ("glsl", "hlsl", "spirv", "spir-v", "validation", "translation")
|
|
||||||
homepage = "https://github.com/KhronosGroup/glslang"
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
|
|
||||||
package_type = "library"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
options = {
|
|
||||||
"shared": [True, False],
|
|
||||||
"fPIC": [True, False],
|
|
||||||
"build_executables": [True, False],
|
|
||||||
"spv_remapper": [True, False],
|
|
||||||
"hlsl": [True, False],
|
|
||||||
"enable_optimizer": [True, False],
|
|
||||||
}
|
|
||||||
default_options = {
|
|
||||||
"shared": False,
|
|
||||||
"fPIC": True,
|
|
||||||
"build_executables": True,
|
|
||||||
"spv_remapper": True,
|
|
||||||
"hlsl": True,
|
|
||||||
"enable_optimizer": True,
|
|
||||||
}
|
|
||||||
|
|
||||||
short_paths = True
|
|
||||||
|
|
||||||
def export_sources(self):
|
|
||||||
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder)
|
|
||||||
|
|
||||||
def config_options(self):
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
del self.options.fPIC
|
|
||||||
if Version(self.version) >= "1.4.341.0":
|
|
||||||
del self.options.spv_remapper
|
|
||||||
|
|
||||||
def configure(self):
|
|
||||||
if self.options.shared:
|
|
||||||
self.options.rm_safe("fPIC")
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
if self.options.enable_optimizer:
|
|
||||||
if Version(self.version) >= "1.4.341.0":
|
|
||||||
self.requires(f"spirv-tools/{self.version}@{self.user}/{self.channel}")
|
|
||||||
else:
|
|
||||||
self.requires(f"spirv-tools/{self.version}")
|
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
if self.settings.compiler.get_safe("cppstd"):
|
|
||||||
check_min_cppstd(self, 11)
|
|
||||||
|
|
||||||
# see https://github.com/KhronosGroup/glslang/issues/2283
|
|
||||||
if self.options.shared:
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
raise ConanInvalidConfiguration(f"{self.ref} shared library build is broken on {self.settings.os}")
|
|
||||||
|
|
||||||
if self.options.enable_optimizer and self.dependencies["spirv-tools"].options.shared:
|
|
||||||
raise ConanInvalidConfiguration(
|
|
||||||
f"{self.ref} with enable_optimizer requires static spirv-tools, "
|
|
||||||
"because SPIRV-Tools-opt is not built if shared"
|
|
||||||
)
|
|
||||||
|
|
||||||
def build_requirements(self):
|
|
||||||
if Version(self.version) >= "1.3.261":
|
|
||||||
self.tool_requires("cmake/[>=3.17.2 <4]")
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
venv = VirtualBuildEnv(self)
|
|
||||||
venv.generate()
|
|
||||||
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["BUILD_EXTERNAL"] = False
|
|
||||||
tc.variables["SKIP_GLSLANG_INSTALL"] = False
|
|
||||||
tc.cache_variables["GLSLANG_ENABLE_INSTALL"] = True
|
|
||||||
tc.variables["ENABLE_SPVREMAPPER"] = self.options.get_safe("spv_remapper", False)
|
|
||||||
tc.variables["ENABLE_GLSLANG_BINARIES"] = self.options.build_executables
|
|
||||||
tc.variables["ENABLE_GLSLANG_JS"] = False
|
|
||||||
tc.variables["ENABLE_GLSLANG_WEBMIN"] = False
|
|
||||||
tc.variables["ENABLE_GLSLANG_WEBMIN_DEVEL"] = False
|
|
||||||
tc.variables["ENABLE_EMSCRIPTEN_SINGLE_FILE"] = False
|
|
||||||
tc.variables["ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE"] = False
|
|
||||||
tc.variables["ENABLE_HLSL"] = self.options.hlsl
|
|
||||||
tc.variables["ENABLE_RTTI"] = True
|
|
||||||
tc.variables["ENABLE_OPT"] = self.options.enable_optimizer
|
|
||||||
if self.options.enable_optimizer:
|
|
||||||
tc.variables["spirv-tools_SOURCE_DIR"] = self.dependencies["spirv-tools"].package_folder.replace("\\", "/")
|
|
||||||
tc.variables["ENABLE_PCH"] = False
|
|
||||||
tc.variables["ENABLE_CTEST"] = False
|
|
||||||
tc.variables["USE_CCACHE"] = False
|
|
||||||
tc.variables["OVERRIDE_MSVCCRT"] = False
|
|
||||||
tc.variables["CMAKE_MACOSX_BUNDLE"] = False
|
|
||||||
# Generate a relocatable shared lib on Macos
|
|
||||||
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW"
|
|
||||||
# glslang builds intermediate static libs, but Conan does not set -fPIC for shared builds
|
|
||||||
tc.variables["CMAKE_POSITION_INDEPENDENT_CODE"] = self.options.get_safe("fPIC", True)
|
|
||||||
if Version(self.version) < "1.3.224.1":
|
|
||||||
tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
for cmake_file in sorted(self.source_path.rglob("CMakeLists.txt")):
|
|
||||||
content = cmake_file.read_text(encoding="utf8")
|
|
||||||
if "POSITION_INDEPENDENT_CODE ON" in content:
|
|
||||||
content = re.sub(r"set_property\(TARGET \S+ PROPERTY POSITION_INDEPENDENT_CODE ON\)\n", "", content)
|
|
||||||
content = content.replace("POSITION_INDEPENDENT_CODE ON", "")
|
|
||||||
cmake_file.write_text(content, encoding="utf8")
|
|
||||||
self.output.info(f"Patched fPIC handling in {cmake_file.relative_to(self.source_path)}")
|
|
||||||
if "POSITION_INDEPENDENT_CODE" in content:
|
|
||||||
raise ConanException(f"POSITION_INDEPENDENT_CODE found in {cmake_file}, please update the recipe")
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
self._patch_sources()
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir))
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "LICENSE.txt", self.source_folder, os.path.join(self.package_folder, "licenses"))
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "share"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "glslang")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "glslang::_glslang-do-not-use") # because glslang-core target is glslang::glslang
|
|
||||||
|
|
||||||
lib_suffix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else ""
|
|
||||||
|
|
||||||
has_machineindependent = not self.options.shared
|
|
||||||
has_genericcodegen = not self.options.shared
|
|
||||||
has_osdependent = not self.options.shared
|
|
||||||
|
|
||||||
# removed - see CHANGES.md
|
|
||||||
has_oglcompiler = not self.options.shared and Version(self.version) <= "1.3.243"
|
|
||||||
has_hlsl = self.options.hlsl and Version(self.version) <= "1.3.243"
|
|
||||||
|
|
||||||
# glslang
|
|
||||||
self.cpp_info.components["glslang-core"].set_property("cmake_target_name", "glslang::glslang")
|
|
||||||
self.cpp_info.components["glslang-core"].libs = [f"glslang{lib_suffix}"]
|
|
||||||
if self.options.shared:
|
|
||||||
self.cpp_info.components["glslang-core"].defines.append("GLSLANG_IS_SHARED_LIBRARY")
|
|
||||||
if self.settings.os in ["Linux", "FreeBSD"]:
|
|
||||||
self.cpp_info.components["glslang-core"].system_libs.extend(["m", "pthread"])
|
|
||||||
if has_machineindependent:
|
|
||||||
self.cpp_info.components["glslang-core"].requires.append("machineindependent")
|
|
||||||
if has_genericcodegen:
|
|
||||||
self.cpp_info.components["glslang-core"].requires.append("genericcodegen")
|
|
||||||
if has_osdependent:
|
|
||||||
self.cpp_info.components["glslang-core"].requires.append("osdependent")
|
|
||||||
if has_oglcompiler:
|
|
||||||
self.cpp_info.components["glslang-core"].requires.append("oglcompiler")
|
|
||||||
if has_hlsl:
|
|
||||||
self.cpp_info.components["glslang-core"].defines.append("ENABLE_HLSL")
|
|
||||||
|
|
||||||
if has_machineindependent:
|
|
||||||
# MachineIndependent
|
|
||||||
self.cpp_info.components["machineindependent"].set_property("cmake_target_name", "glslang::MachineIndependent")
|
|
||||||
self.cpp_info.components["machineindependent"].libs = [f"MachineIndependent{lib_suffix}"]
|
|
||||||
if has_genericcodegen:
|
|
||||||
self.cpp_info.components["machineindependent"].requires.append("genericcodegen")
|
|
||||||
if has_osdependent:
|
|
||||||
self.cpp_info.components["machineindependent"].requires.append("osdependent")
|
|
||||||
if has_oglcompiler:
|
|
||||||
self.cpp_info.components["machineindependent"].requires.append("oglcompiler")
|
|
||||||
|
|
||||||
if has_genericcodegen:
|
|
||||||
# GenericCodeGen
|
|
||||||
self.cpp_info.components["genericcodegen"].set_property("cmake_target_name", "glslang::GenericCodeGen")
|
|
||||||
self.cpp_info.components["genericcodegen"].libs = [f"GenericCodeGen{lib_suffix}"]
|
|
||||||
|
|
||||||
if has_osdependent:
|
|
||||||
# OSDependent
|
|
||||||
self.cpp_info.components["osdependent"].set_property("cmake_target_name", "glslang::OSDependent")
|
|
||||||
self.cpp_info.components["osdependent"].libs = [f"OSDependent{lib_suffix}"]
|
|
||||||
if self.settings.os in ["Linux", "FreeBSD"]:
|
|
||||||
self.cpp_info.components["osdependent"].system_libs.append("pthread")
|
|
||||||
|
|
||||||
if has_oglcompiler:
|
|
||||||
# OGLCompiler
|
|
||||||
self.cpp_info.components["oglcompiler"].set_property("cmake_target_name", "glslang::OGLCompiler")
|
|
||||||
self.cpp_info.components["oglcompiler"].libs = [f"OGLCompiler{lib_suffix}"]
|
|
||||||
|
|
||||||
# SPIRV
|
|
||||||
self.cpp_info.components["spirv"].set_property("cmake_target_name", "glslang::SPIRV")
|
|
||||||
self.cpp_info.components["spirv"].libs = [f"SPIRV{lib_suffix}"]
|
|
||||||
self.cpp_info.components["spirv"].requires = ["glslang-core"]
|
|
||||||
if self.options.enable_optimizer:
|
|
||||||
self.cpp_info.components["spirv"].requires.append("spirv-tools::spirv-tools-opt")
|
|
||||||
self.cpp_info.components["spirv"].defines.append("ENABLE_OPT")
|
|
||||||
|
|
||||||
# HLSL
|
|
||||||
if has_hlsl:
|
|
||||||
self.cpp_info.components["hlsl"].set_property("cmake_target_name", "glslang::HLSL")
|
|
||||||
self.cpp_info.components["hlsl"].libs = [f"HLSL{lib_suffix}"]
|
|
||||||
self.cpp_info.components["glslang-core"].requires.append("hlsl")
|
|
||||||
|
|
||||||
# SPVRemapper
|
|
||||||
if self.options.get_safe("spv_remapper"):
|
|
||||||
self.cpp_info.components["spvremapper"].set_property("cmake_target_name", "glslang::SPVRemapper")
|
|
||||||
self.cpp_info.components["spvremapper"].libs = [f"SPVRemapper{lib_suffix}"]
|
|
||||||
|
|
||||||
if Version(self.version) >= "1.3.243":
|
|
||||||
self.cpp_info.components["glslang-default-resource-limits"].set_property("cmake_target_name", "glslang::glslang-default-resource-limits")
|
|
||||||
self.cpp_info.components["glslang-default-resource-limits"].libs = [f"glslang-default-resource-limits{lib_suffix}"]
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES CXX)
|
|
||||||
|
|
||||||
find_package(glslang REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE glslang::glslang)
|
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str, run=can_run(self))
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
shader_name = os.path.join(self.source_folder, "test_package.vert")
|
|
||||||
self.run(f"glslangValidator \"{shader_name}\"", env="conanrun")
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#include <glslang/Public/ShaderLang.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
glslang::InitializeProcess();
|
|
||||||
glslang::FinalizeProcess();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#version 450
|
|
||||||
#extension GL_ARB_separate_shader_objects : enable
|
|
||||||
|
|
||||||
layout(location = 0) in vec2 inPosition;
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
gl_Position = vec4(inPosition, 0.0, 1.0);
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
versions:
|
|
||||||
"1.4.341.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.313.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.268.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.261.1":
|
|
||||||
folder: all
|
|
||||||
"1.3.243.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.239.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.236.0":
|
|
||||||
folder: all
|
|
||||||
"1.2.198.0":
|
|
||||||
folder: all
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.9)
|
|
||||||
project(imgui LANGUAGES CXX)
|
|
||||||
|
|
||||||
set(MISC_DIR ${IMGUI_SRC_DIR}/misc)
|
|
||||||
set(EXTRA_FONTS_DIR ${MISC_DIR}/fonts)
|
|
||||||
set(IMGUI_EXPORT_HEADERS imgui_export_headers.h)
|
|
||||||
|
|
||||||
file(GLOB SOURCE_FILES ${IMGUI_SRC_DIR}/*.cpp)
|
|
||||||
file(GLOB HEADER_FILES ${IMGUI_SRC_DIR}/*.h)
|
|
||||||
|
|
||||||
if(IMGUI_ENABLE_TEST_ENGINE)
|
|
||||||
message(STATUS "Building ImGui with test engine")
|
|
||||||
file(GLOB TEST_ENGINE_FILES ${IMGUI_TEST_ENGINE_DIR}/imgui_test_engine/*.cpp)
|
|
||||||
list(APPEND SOURCE_FILES ${TEST_ENGINE_FILES})
|
|
||||||
file(GLOB TEST_ENGINE_HEADER_FILES ${IMGUI_TEST_ENGINE_DIR}/imgui_test_engine/*.h)
|
|
||||||
list(APPEND HEADER_FILES ${TEST_ENGINE_HEADER_FILES})
|
|
||||||
else()
|
|
||||||
message(STATUS "Building ImGui without test engine")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(GLOB EXTRA_FONTS_FILES ${EXTRA_FONTS_DIR}/*.ttf)
|
|
||||||
if (MSVC)
|
|
||||||
file(GLOB EXTRA_NATVIS_FILES ${MISC_DIR}/natvis/*.natvis)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(BINARY_TO_COMPRESSED_BIN binary_to_compressed_c)
|
|
||||||
|
|
||||||
add_executable(${BINARY_TO_COMPRESSED_BIN} ${EXTRA_FONTS_DIR}/binary_to_compressed_c.cpp)
|
|
||||||
target_compile_features(${BINARY_TO_COMPRESSED_BIN} PRIVATE cxx_std_11)
|
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} ${SOURCE_FILES})
|
|
||||||
|
|
||||||
if(IMGUI_WITH_SDL3_BINDING)
|
|
||||||
target_sources(${PROJECT_NAME} PRIVATE ${IMGUI_SRC_DIR}/backends/imgui_impl_sdl3.cpp)
|
|
||||||
list(APPEND HEADER_FILES ${IMGUI_SRC_DIR}/backends/imgui_impl_sdl3.h)
|
|
||||||
find_package(SDL3 REQUIRED CONFIG)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC SDL3::SDL3)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
||||||
CXX_VISIBILITY_PRESET hidden
|
|
||||||
VISIBILITY_INLINES_HIDDEN ON
|
|
||||||
)
|
|
||||||
include(GenerateExportHeader)
|
|
||||||
generate_export_header(${PROJECT_NAME}
|
|
||||||
EXPORT_MACRO_NAME IMGUI_API
|
|
||||||
EXPORT_FILE_NAME ${IMGUI_EXPORT_HEADERS}
|
|
||||||
)
|
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${IMGUI_SRC_DIR}>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
|
||||||
$<INSTALL_INTERFACE:include>
|
|
||||||
)
|
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
install(TARGETS ${PROJECT_NAME}
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
||||||
install(TARGETS ${BINARY_TO_COMPRESSED_BIN}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
||||||
install(FILES ${HEADER_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${IMGUI_EXPORT_HEADERS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
||||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
|
||||||
install(FILES ${EXTRA_FONTS_FILES}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/res/fonts
|
|
||||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
|
||||||
if (MSVC)
|
|
||||||
install(FILES ${EXTRA_NATVIS_FILES}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_PREFIX}/res/natvis
|
|
||||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
|
||||||
endif()
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
# this package's recipe relies on version suffixes to handle imgui's docking branch.
|
|
||||||
# Suffix: -docking for docking branch sources
|
|
||||||
sources:
|
|
||||||
"1.92.7-docking":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.92.7-docking.tar.gz"
|
|
||||||
sha256: "2c58e28c957497eba0ed01c48a0bc5f118ec5f10a1c3721ba9436253a623bd72"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.7.tar.gz"
|
|
||||||
sha256: "3bb2320044854abb479facdde01c38c8af2e0257a630eb4b582b100a4fa60043"
|
|
||||||
"1.92.6":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.92.6.tar.gz"
|
|
||||||
sha256: "5b17c01f69545bde732b14936d89ce0f508adb83e8b56fa82448371845172bc3"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.6.tar.gz"
|
|
||||||
sha256: "5374ec2318933f9fc663d924529ea80e5fa40866e82fafc3872ae94a16fdbc7f"
|
|
||||||
"1.92.6-docking":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.92.6-docking.tar.gz"
|
|
||||||
sha256: "5e84cdaa6a6041586a0d11a3071b749734a0439d66fdbdad37ae5b27e37d396c"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.6.tar.gz"
|
|
||||||
sha256: "5374ec2318933f9fc663d924529ea80e5fa40866e82fafc3872ae94a16fdbc7f"
|
|
||||||
"1.92.2b":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.92.2b.tar.gz"
|
|
||||||
sha256: "da3d453cce74e0fb3d67f8d798a2a8d04fcaf0b33ce0e0131d0695dfc4f64191"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.2.tar.gz"
|
|
||||||
sha256: "5914327269b2dd9ad66bead3be8577f99f5f572d196bbe4028f6812cf0356adb"
|
|
||||||
"1.92.2b-docking":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.92.2b-docking.tar.gz"
|
|
||||||
sha256: "f6ad86e6f938fdda4d5e362b9a9b39158963dd3257fdc9902efc148c0c0c39f9"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.92.2.tar.gz"
|
|
||||||
sha256: "5914327269b2dd9ad66bead3be8577f99f5f572d196bbe4028f6812cf0356adb"
|
|
||||||
"1.91.8":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.91.8.tar.gz"
|
|
||||||
sha256: "db3a2e02bfd6c269adf0968950573053d002f40bdfb9ef2e4a90bce804b0f286"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.91.8.tar.gz"
|
|
||||||
sha256: "bdfc31cb819bd6e4df2d5da0316edf92b1011d1c4046293aafd9ae14106570e2"
|
|
||||||
"1.91.8-docking":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.91.8-docking.tar.gz"
|
|
||||||
sha256: "55f5e65abea635f2a8bfa9a92cd966448a363a262cf6dead7cc662fb0ab37612"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.91.8.tar.gz"
|
|
||||||
sha256: "bdfc31cb819bd6e4df2d5da0316edf92b1011d1c4046293aafd9ae14106570e2"
|
|
||||||
"1.90.9":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.90.9.tar.gz"
|
|
||||||
sha256: "04943919721e874ac75a2f45e6eb6c0224395034667bf508923388afda5a50bf"
|
|
||||||
"1.90.9-docking":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.90.9-docking.tar.gz"
|
|
||||||
sha256: "48e7e4e4f154ad98d0946126a84e2375f849f6a67792129a805817dd60a34330"
|
|
||||||
"1.90.5":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.90.5.tar.gz"
|
|
||||||
sha256: "e94b48dba7311c85ba8e3e6fe7c734d76a0eed21b2b42c5180fd5706d1562241"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.90.5.tar.gz"
|
|
||||||
sha256: "79339246d8c919c5926df0a7bee99be585ebaf67cdaba89a0ac314b1f7846f92"
|
|
||||||
"1.90.5-docking":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.90.5-docking.tar.gz"
|
|
||||||
sha256: "8a5e1e594d6c8552e46e4c1ba8dd9deb51262067f04937904babc04384533ccc"
|
|
||||||
testengine:
|
|
||||||
url: "https://github.com/ocornut/imgui_test_engine/archive/v1.90.5.tar.gz"
|
|
||||||
sha256: "79339246d8c919c5926df0a7bee99be585ebaf67cdaba89a0ac314b1f7846f92"
|
|
||||||
"1.88":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.88.tar.gz"
|
|
||||||
sha256: "9f14c788aee15b777051e48f868c5d4d959bd679fc5050e3d2a29de80d8fd32e"
|
|
||||||
"1.87":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.87.tar.gz"
|
|
||||||
sha256: "b54ceb35bda38766e36b87c25edf7a1cd8fd2cb8c485b245aedca6fb85645a20"
|
|
||||||
"1.86":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.86.tar.gz"
|
|
||||||
sha256: "6ba6ae8425a19bc52c5e067702c48b70e4403cd339cba02073a462730a63e825"
|
|
||||||
"1.85":
|
|
||||||
core:
|
|
||||||
url: "https://github.com/ocornut/imgui/archive/v1.85.tar.gz"
|
|
||||||
sha256: "7ed49d1f4573004fa725a70642aaddd3e06bb57fcfe1c1a49ac6574a3e895a77"
|
|
||||||
patches:
|
|
||||||
"1.92.4":
|
|
||||||
- patch_file: "patches/1.92.4-0001-static-linking-bugfix-backport.patch"
|
|
||||||
patch_description: "Add missing export for a function needed by the backends"
|
|
||||||
patch_source: "https://github.com/ocornut/imgui/pull/9016"
|
|
||||||
patch_type: "backport"
|
|
||||||
"1.92.4-docking":
|
|
||||||
- patch_file: "patches/1.92.4-docking-0001-static-linking-bugfix-backport.patch"
|
|
||||||
patch_description: "Add missing export for a function needed by the backends"
|
|
||||||
patch_source: "https://github.com/ocornut/imgui/pull/9016"
|
|
||||||
patch_type: "backport"
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
import os
|
|
||||||
|
|
||||||
from conan import ConanFile
|
|
||||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout, CMakeDeps
|
|
||||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, replace_in_file
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
|
|
||||||
required_conan_version = ">=1.53.0"
|
|
||||||
|
|
||||||
|
|
||||||
class IMGUIConan(ConanFile):
|
|
||||||
name = "imgui"
|
|
||||||
description = "Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies"
|
|
||||||
license = "MIT"
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
homepage = "https://github.com/ocornut/imgui"
|
|
||||||
topics = ("gui", "graphical", "bloat-free")
|
|
||||||
package_type = "library"
|
|
||||||
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
options = {
|
|
||||||
"shared": [True, False],
|
|
||||||
"fPIC": [True, False],
|
|
||||||
"enable_test_engine": [True, False],
|
|
||||||
"with_sdl3_binding": [True, False],
|
|
||||||
}
|
|
||||||
default_options = {
|
|
||||||
"shared": False,
|
|
||||||
"fPIC": True,
|
|
||||||
"enable_test_engine": False,
|
|
||||||
"with_sdl3_binding": False,
|
|
||||||
}
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
if self.options.get_safe("with_sdl3_binding"):
|
|
||||||
self.requires("sdl/[>3 <4]", transitive_headers=True)
|
|
||||||
|
|
||||||
def export_sources(self):
|
|
||||||
copy(self, "CMakeLists.txt", self.recipe_folder, self.export_sources_folder)
|
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
def config_options(self):
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
del self.options.fPIC
|
|
||||||
if "testengine" not in self.conan_data["sources"][self.version]:
|
|
||||||
self.output.warning("No test engine found for this version, removing test engine option")
|
|
||||||
del self.options.enable_test_engine
|
|
||||||
|
|
||||||
# sdl3 bindings were introduced with 1.89.3
|
|
||||||
# 1.91.8 is the oldest version that supports the latest sdl headers
|
|
||||||
if Version(self.version) < "1.91.8":
|
|
||||||
del self.options.with_sdl3_binding
|
|
||||||
|
|
||||||
def configure(self):
|
|
||||||
if self.options.shared:
|
|
||||||
self.options.rm_safe("fPIC")
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version]["core"], strip_root=True)
|
|
||||||
if "testengine" in self.conan_data["sources"][self.version]:
|
|
||||||
get(self, **self.conan_data["sources"][self.version]["testengine"], strip_root=True, destination="test_engine")
|
|
||||||
self._patch_sources()
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["IMGUI_SRC_DIR"] = self.source_folder.replace("\\", "/")
|
|
||||||
tc.variables["IMGUI_WITH_SDL3_BINDING"] = self.options.get_safe("with_sdl3_binding", False)
|
|
||||||
# test engine is not available for all versions
|
|
||||||
if self.options.get_safe("enable_test_engine"):
|
|
||||||
tc.preprocessor_definitions["IMGUI_ENABLE_TEST_ENGINE"] = "1"
|
|
||||||
tc.preprocessor_definitions["IMGUI_TEST_ENGINE_ENABLE_COROUTINE_STDTHREAD_IMPL"] = "1"
|
|
||||||
tc.variables["IMGUI_ENABLE_TEST_ENGINE"] = "ON"
|
|
||||||
tc.variables["IMGUI_TEST_ENGINE_DIR"] = os.path.join(self.source_folder, "test_engine").replace("\\", "/")
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
deps = CMakeDeps(self)
|
|
||||||
deps.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
|
|
||||||
# Ensure we take into account export_headers
|
|
||||||
replace_in_file(self,
|
|
||||||
os.path.join(self.source_folder, "imgui.h"),
|
|
||||||
"#ifdef IMGUI_USER_CONFIG",
|
|
||||||
"#include \"imgui_export_headers.h\"\n\n#ifdef IMGUI_USER_CONFIG"
|
|
||||||
)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir))
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, pattern="LICENSE.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
|
|
||||||
backends_folder = os.path.join(self.source_folder, "backends")
|
|
||||||
copy(self, pattern="imgui_impl_*",
|
|
||||||
dst=os.path.join(self.package_folder, "res", "bindings"),
|
|
||||||
src=backends_folder)
|
|
||||||
copy(self, pattern="imgui*.cpp",
|
|
||||||
dst=os.path.join(self.package_folder, "res", "src"),
|
|
||||||
src=os.path.join(self.source_folder))
|
|
||||||
copy(self, pattern="*.*",
|
|
||||||
dst=os.path.join(self.package_folder, "res", "misc", "cpp"),
|
|
||||||
src=os.path.join(self.source_folder, "misc", "cpp"))
|
|
||||||
copy(self, pattern="*.*",
|
|
||||||
dst=os.path.join(self.package_folder, "res", "misc", "freetype"),
|
|
||||||
src=os.path.join(self.source_folder, "misc", "freetype"))
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
_is_docking_branch = "docking" in str(self.version)
|
|
||||||
self.conf_info.define("user.imgui:with_docking", _is_docking_branch)
|
|
||||||
self.cpp_info.libs = ["imgui"]
|
|
||||||
if self.settings.os == "Linux":
|
|
||||||
self.cpp_info.system_libs.append("m")
|
|
||||||
if self.settings.os == "Windows":
|
|
||||||
self.cpp_info.system_libs.append("imm32")
|
|
||||||
self.cpp_info.srcdirs = [os.path.join("res", "bindings")]
|
|
||||||
|
|
||||||
bin_path = os.path.join(self.package_folder, "bin")
|
|
||||||
self.output.info("Appending PATH env var with : {}".format(bin_path))
|
|
||||||
self.env_info.PATH.append(bin_path)
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
diff --git imgui.h imgui.h
|
|
||||||
index 0a216b76..baeda39b 100644
|
|
||||||
--- imgui.h
|
|
||||||
+++ imgui.h
|
|
||||||
@@ -3978,8 +3978,8 @@ struct ImGuiPlatformIO
|
|
||||||
// Functions
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
|
|
||||||
- void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
|
||||||
- void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
|
||||||
+ IMGUI_API void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
|
||||||
+ IMGUI_API void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
|
||||||
};
|
|
||||||
|
|
||||||
// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. Handler is called during EndFrame().
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
diff --git imgui.h imgui.h
|
|
||||||
index d0f071d2..8328e9a3 100644
|
|
||||||
--- imgui.h
|
|
||||||
+++ imgui.h
|
|
||||||
@@ -4235,8 +4235,8 @@ struct ImGuiPlatformIO
|
|
||||||
// Functions
|
|
||||||
//------------------------------------------------------------------
|
|
||||||
|
|
||||||
- void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
|
||||||
- void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
|
||||||
+ IMGUI_API void ClearPlatformHandlers(); // Clear all Platform_XXX fields. Typically called on Platform Backend shutdown.
|
|
||||||
+ IMGUI_API void ClearRendererHandlers(); // Clear all Renderer_XXX fields. Typically called on Renderer Backend shutdown.
|
|
||||||
};
|
|
||||||
|
|
||||||
// (Optional) This is required when enabling multi-viewport. Represent the bounds of each connected monitor/display and their DPI.
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES CXX)
|
|
||||||
|
|
||||||
find_package(imgui REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE imgui::imgui)
|
|
||||||
|
|
||||||
option(DOCKING "Test docking" OFF)
|
|
||||||
|
|
||||||
if (DOCKING)
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE -DDOCKING)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(ENABLE_TEST_ENGINE)
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE -DENABLE_TEST_ENGINE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC "IMGUI_USER_CONFIG=\"${CMAKE_CURRENT_SOURCE_DIR}/my_imgui_config.h\"")
|
|
||||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
with_docking = self.dependencies[self.tested_reference_str].conf_info.get("user.imgui:with_docking", False)
|
|
||||||
with_test_engine = self.dependencies[self.tested_reference_str].options.get_safe("enable_test_engine", False)
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["DOCKING"] = with_docking
|
|
||||||
tc.variables["ENABLE_TEST_ENGINE"] = with_test_engine
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace ImGui
|
|
||||||
{
|
|
||||||
void MyFunction(const char* name) {
|
|
||||||
printf(" ImGui::MyFunction(%s)\n", name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#include <imgui.h>
|
|
||||||
#ifdef DOCKING
|
|
||||||
#include <imgui_internal.h>
|
|
||||||
#endif
|
|
||||||
#ifdef ENABLE_TEST_ENGINE
|
|
||||||
#include <imgui_te_engine.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int main(int, char**)
|
|
||||||
{
|
|
||||||
printf("IMGUI VERSION: %s\n", IMGUI_VERSION);
|
|
||||||
ImGui::CreateContext();
|
|
||||||
#ifdef DOCKING
|
|
||||||
printf(" with docking\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ENABLE_TEST_ENGINE
|
|
||||||
printf(" with test engine\n");
|
|
||||||
ImGuiTestEngine *engine = ImGuiTestEngine_CreateContext();
|
|
||||||
if (engine == NULL) {
|
|
||||||
printf(" Failed to create test engine context\n");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
ImGui::DestroyContext();
|
|
||||||
ImGuiTestEngine_DestroyContext(engine);
|
|
||||||
#else
|
|
||||||
ImGui::DestroyContext();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
versions:
|
|
||||||
"1.92.7-docking":
|
|
||||||
folder: all
|
|
||||||
"1.92.6":
|
|
||||||
folder: all
|
|
||||||
"1.92.6-docking":
|
|
||||||
folder: all
|
|
||||||
"1.92.2b":
|
|
||||||
folder: all
|
|
||||||
"1.92.2b-docking":
|
|
||||||
folder: all
|
|
||||||
"1.91.8":
|
|
||||||
folder: all
|
|
||||||
"1.91.8-docking":
|
|
||||||
folder: all
|
|
||||||
"1.90.9":
|
|
||||||
folder: all
|
|
||||||
"1.90.9-docking":
|
|
||||||
folder: all
|
|
||||||
"1.90.5":
|
|
||||||
folder: all
|
|
||||||
"1.90.5-docking":
|
|
||||||
folder: all
|
|
||||||
"1.88":
|
|
||||||
folder: all
|
|
||||||
"1.87":
|
|
||||||
folder: all
|
|
||||||
"1.86":
|
|
||||||
folder: all
|
|
||||||
"1.85":
|
|
||||||
folder: all
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"cci.20260210":
|
|
||||||
url: "https://github.com/lvandeve/lodepng/archive/9a857a004f2828f287fdd8a6d3ab454eebe07166.tar.gz"
|
|
||||||
sha256: "071307b36cb5d102df2e7045cd6e69674b7137087755dd2c55ac4a1147df28f6"
|
|
||||||
"cci.20250727":
|
"cci.20250727":
|
||||||
url: "https://github.com/lvandeve/lodepng/archive/344b4b442d0de0787a999724dd6569461a00c92c.tar.gz"
|
url: "https://github.com/lvandeve/lodepng/archive/344b4b442d0de0787a999724dd6569461a00c92c.tar.gz"
|
||||||
sha256: "ffc13ecfbe27978e018e2ac6b089d6a2bd1a571d81b5ebb50e7364ec17ca3a74"
|
sha256: "ffc13ecfbe27978e018e2ac6b089d6a2bd1a571d81b5ebb50e7364ec17ca3a74"
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
versions:
|
versions:
|
||||||
"cci.20260210":
|
|
||||||
folder: all
|
|
||||||
"cci.20250727":
|
"cci.20250727":
|
||||||
folder: all
|
folder: all
|
||||||
"cci.20241228":
|
"cci.20241228":
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"1.1":
|
|
||||||
url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v1.1.tar.gz"
|
|
||||||
sha256: "b787011f81b4b3069c2f9065b7c191efdd4189a49be32ba5282dd5579f05261a"
|
|
||||||
"1.0":
|
"1.0":
|
||||||
url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v1.0.tar.gz"
|
url: "https://github.com/zeux/meshoptimizer/archive/refs/tags/v1.0.tar.gz"
|
||||||
sha256: "30d1c3651986b2074e847b17223a7269c9612ab7f148b944250f81214fed4993"
|
sha256: "30d1c3651986b2074e847b17223a7269c9612ab7f148b944250f81214fed4993"
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
versions:
|
versions:
|
||||||
"1.1":
|
|
||||||
folder: all
|
|
||||||
"1.0":
|
"1.0":
|
||||||
folder: all
|
folder: all
|
||||||
"0.25":
|
"0.25":
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"3.3.2":
|
|
||||||
url: "https://github.com/microsoft/mimalloc/archive/v3.3.2.tar.gz"
|
|
||||||
sha256: "ca02384e007f46950598500dfaebde5ff9948c1d231f5a81b058799afa64bbbb"
|
|
||||||
"3.3.1":
|
|
||||||
url: "https://github.com/microsoft/mimalloc/archive/v3.3.1.tar.gz"
|
|
||||||
sha256: "42c16914168ac6741eeb407e83b93a12b2b7ee25a7e14e6b4807fab8b577a540"
|
|
||||||
"3.2.8":
|
|
||||||
url: "https://github.com/microsoft/mimalloc/archive/v3.2.8.tar.gz"
|
|
||||||
sha256: "68163666575518c213a6593850099adce3863b340ca2751103dbd1f253664e05"
|
|
||||||
"3.1.5":
|
"3.1.5":
|
||||||
url: "https://github.com/microsoft/mimalloc/archive/v3.1.5.tar.gz"
|
url: "https://github.com/microsoft/mimalloc/archive/v3.1.5.tar.gz"
|
||||||
sha256: "1c6949032069d5ebea438ec5cedd602d06f40a92ddf0f0d9dcff0993e5f6635c"
|
sha256: "1c6949032069d5ebea438ec5cedd602d06f40a92ddf0f0d9dcff0993e5f6635c"
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ class MimallocConan(ConanFile):
|
|||||||
"single_object": [True, False],
|
"single_object": [True, False],
|
||||||
"guarded": [True, False],
|
"guarded": [True, False],
|
||||||
"win_redirect": [True, False],
|
"win_redirect": [True, False],
|
||||||
"asan": [True, False],
|
|
||||||
}
|
}
|
||||||
default_options = {
|
default_options = {
|
||||||
"shared": False,
|
"shared": False,
|
||||||
@@ -40,7 +39,6 @@ class MimallocConan(ConanFile):
|
|||||||
"single_object": False,
|
"single_object": False,
|
||||||
"guarded": False,
|
"guarded": False,
|
||||||
"win_redirect": False,
|
"win_redirect": False,
|
||||||
"asan": False,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def export_sources(self):
|
def export_sources(self):
|
||||||
@@ -93,11 +91,6 @@ class MimallocConan(ConanFile):
|
|||||||
raise ConanInvalidConfiguration(
|
raise ConanInvalidConfiguration(
|
||||||
f"Currently, {self.ref} doesn't work properly with shared MD builds in CCI. Contributions welcomed")
|
f"Currently, {self.ref} doesn't work properly with shared MD builds in CCI. Contributions welcomed")
|
||||||
|
|
||||||
if self.options.override and \
|
|
||||||
self.options.asan:
|
|
||||||
raise ConanInvalidConfiguration(
|
|
||||||
"Asan requires Mimalloc to be compiled without override")
|
|
||||||
|
|
||||||
# Shared overriding requires dynamic runtime for MSVC:
|
# Shared overriding requires dynamic runtime for MSVC:
|
||||||
if self.options.override and \
|
if self.options.override and \
|
||||||
self.options.shared and \
|
self.options.shared and \
|
||||||
@@ -136,7 +129,6 @@ class MimallocConan(ConanFile):
|
|||||||
tc.variables["MI_WIN_REDIRECT"] = "ON" if self.options.get_safe("win_redirect") else "OFF"
|
tc.variables["MI_WIN_REDIRECT"] = "ON" if self.options.get_safe("win_redirect") else "OFF"
|
||||||
tc.variables["MI_INSTALL_TOPLEVEL"] = "ON"
|
tc.variables["MI_INSTALL_TOPLEVEL"] = "ON"
|
||||||
tc.variables["MI_GUARDED"] = self.options.get_safe("guarded", False)
|
tc.variables["MI_GUARDED"] = self.options.get_safe("guarded", False)
|
||||||
tc.variables["MI_TRACK_ASAN"] = "ON" if self.options.get_safe("asan") else "OFF"
|
|
||||||
if Version(self.version) <= "1.7.6":
|
if Version(self.version) <= "1.7.6":
|
||||||
tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support
|
tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support
|
||||||
tc.generate()
|
tc.generate()
|
||||||
@@ -219,10 +211,6 @@ class MimallocConan(ConanFile):
|
|||||||
return os.path.join(self.package_folder, "lib", "cmake")
|
return os.path.join(self.package_folder, "lib", "cmake")
|
||||||
|
|
||||||
def package_info(self):
|
def package_info(self):
|
||||||
if(self.options.asan):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "mimalloc-asan")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "mimalloc-asan")
|
|
||||||
else:
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "mimalloc")
|
self.cpp_info.set_property("cmake_file_name", "mimalloc")
|
||||||
self.cpp_info.set_property("cmake_target_name", "mimalloc" if self.options.shared else "mimalloc-static")
|
self.cpp_info.set_property("cmake_target_name", "mimalloc" if self.options.shared else "mimalloc-static")
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
versions:
|
versions:
|
||||||
"3.3.2":
|
|
||||||
folder: all
|
|
||||||
"3.3.1":
|
|
||||||
folder: all
|
|
||||||
"3.2.8":
|
|
||||||
folder: all
|
|
||||||
"3.1.5":
|
"3.1.5":
|
||||||
folder: all
|
folder: all
|
||||||
"2.2.4":
|
"2.2.4":
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
# mold: A Modern Linker
|
|
||||||
|
|
||||||
mold is a faster drop-in replacement for existing Unix linkers. It is several
|
|
||||||
times quicker than the LLVM lld linker, the second-fastest open-source linker.
|
|
||||||
mold aims to enhance developer productivity by minimizing build time,
|
|
||||||
particularly in rapid debug-edit-rebuild cycles.
|
|
||||||
|
|
||||||
You can configure Conan to download the latest version of `mold` and use it as the linker
|
|
||||||
when building your dependencies and projects from source. Currently only supported
|
|
||||||
when targeting Linux as the platform.
|
|
||||||
|
|
||||||
To use mold automatically as the linker, you can add the following section to your
|
|
||||||
_host_ profile that targets Linux. When using gcc, please note that the following
|
|
||||||
flags require gcc 12.1 or greater.
|
|
||||||
|
|
||||||
```
|
|
||||||
[tool_requires]
|
|
||||||
*:mold/[*]
|
|
||||||
[conf]
|
|
||||||
tools.build:exelinkflags=['-fuse-ld=mold']
|
|
||||||
tools.build:sharedlinkflags=['-fuse-ld=mold']
|
|
||||||
```
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
sources:
|
|
||||||
"2.41.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.41.0.tar.gz"
|
|
||||||
sha256: "0a61abac85d818437b425df856822e9d6e9982baeae5a93bcb02fe6c0060c61a"
|
|
||||||
"2.40.1":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.40.1.tar.gz"
|
|
||||||
sha256: "d1ce09a69941f8158604c3edcc96c7178231e7dba2da66b20f5ef6e112c443b7"
|
|
||||||
"2.36.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.36.0.tar.gz"
|
|
||||||
sha256: "3f57fe75535500ecce7a80fa1ba33675830b7d7deb1e5ee9a737e2bc43cdb1c7"
|
|
||||||
"2.34.1":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.34.1.tar.gz"
|
|
||||||
sha256: "a8cf638045b4a4b2697d0bcc77fd96eae93d54d57ad3021bf03b0333a727a59d"
|
|
||||||
"2.33.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.33.0.tar.gz"
|
|
||||||
sha256: "37b3aacbd9b6accf581b92ba1a98ca418672ae330b78fe56ae542c2dcb10a155"
|
|
||||||
"2.32.1":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.32.1.tar.gz"
|
|
||||||
sha256: "f3c9a527d884c635834fe7d79b3de959b00783bf9446280ea274d996f0335825"
|
|
||||||
"2.32.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.32.0.tar.gz"
|
|
||||||
sha256: "4b7e4146ea0f52be9adae8b417399f3676a041e65b55e3f25f088120d30a320b"
|
|
||||||
"2.31.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.31.0.tar.gz"
|
|
||||||
sha256: "3dc3af83a5d22a4b29971bfad17261851d426961c665480e2ca294e5c74aa1e5"
|
|
||||||
"2.4.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.4.0.tar.gz"
|
|
||||||
sha256: "be65f3d785d32ece7b3204ecaa57810847fdd25c232cf704cbfff2dafb1ac107"
|
|
||||||
"2.0.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v2.0.0.tar.gz"
|
|
||||||
sha256: "2ae8a22db09cbff626df74c945079fa29c1e5f60bbe02502dcf69191cf43527b"
|
|
||||||
"1.11.0":
|
|
||||||
url: "https://github.com/rui314/mold/archive/refs/tags/v1.11.0.tar.gz"
|
|
||||||
sha256: "99318eced81b09a77e4c657011076cc8ec3d4b6867bd324b8677974545bc4d6f"
|
|
||||||
patches:
|
|
||||||
"2.40.1":
|
|
||||||
- patch_file: "patches/2.40.1/0001-patch-enforce-c-11-for-tbb.patch"
|
|
||||||
patch_description: "Fix bundled oneTBB build by enforcing C++11 standard"
|
|
||||||
patch_type: "conan"
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
import os
|
|
||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import check_min_cppstd
|
|
||||||
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
|
|
||||||
from conan.tools.files import copy, get, rmdir, apply_conandata_patches, export_conandata_patches
|
|
||||||
from conan.errors import ConanInvalidConfiguration
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
from conan.tools.env import VirtualBuildEnv
|
|
||||||
|
|
||||||
required_conan_version = ">2.0"
|
|
||||||
|
|
||||||
|
|
||||||
class MoldConan(ConanFile):
|
|
||||||
name = "mold"
|
|
||||||
description = (
|
|
||||||
"mold is a faster drop-in replacement for existing Unix linkers. "
|
|
||||||
"It is several times faster than the LLVM lld linker."
|
|
||||||
)
|
|
||||||
license = ("AGPL-3.0", "MIT")
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
homepage = "https://github.com/rui314/mold/"
|
|
||||||
topics = ("ld", "linkage", "compilation", "pre-built")
|
|
||||||
|
|
||||||
package_type = "application"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
options = {
|
|
||||||
"with_mimalloc": [True, False],
|
|
||||||
}
|
|
||||||
default_options = {
|
|
||||||
"with_mimalloc": False,
|
|
||||||
}
|
|
||||||
|
|
||||||
def configure(self):
|
|
||||||
if Version(self.version) < "2.0.0":
|
|
||||||
self.license = "AGPL-3.0"
|
|
||||||
else:
|
|
||||||
self.license = "MIT"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires("zlib/[>=1.2.11 <2]")
|
|
||||||
self.requires("xxhash/0.8.2")
|
|
||||||
if self.options.with_mimalloc:
|
|
||||||
self.requires("mimalloc/3.3.1@bigfootdev/main")
|
|
||||||
if Version(self.version) < "2.2.0":
|
|
||||||
# Newer versions use vendored-in BLAKE3
|
|
||||||
self.requires("openssl/[>=1.1 <4]")
|
|
||||||
|
|
||||||
def package_id(self):
|
|
||||||
del self.info.settings.compiler
|
|
||||||
|
|
||||||
def validate_build(self):
|
|
||||||
# perform these checks in validate_build() - since the compiler is removed from the package_id,
|
|
||||||
# this lets the compatibility plugin consider the executable built with other compilers
|
|
||||||
if Version(self.version) >= "2.34.0":
|
|
||||||
# mold has required C+20 since 1.4.1. However, C++20 features are used for the first time in 2.34.0.
|
|
||||||
check_min_cppstd(self, 20)
|
|
||||||
if self.settings.compiler in ["gcc", "clang", "intel-cc"] and self.settings.compiler.libcxx != "libstdc++11":
|
|
||||||
raise ConanInvalidConfiguration('Mold can only be built with libstdc++11; specify mold:compiler.libcxx=libstdc++11 in your build profile')
|
|
||||||
if self.settings.compiler == "msvc":
|
|
||||||
raise ConanInvalidConfiguration(f'{self.name} can not be built on {self.settings.os}.')
|
|
||||||
if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "10":
|
|
||||||
raise ConanInvalidConfiguration("GCC version 10 or higher required")
|
|
||||||
if self.settings.compiler in ('clang', 'apple-clang') and Version(self.settings.compiler.version) < "12":
|
|
||||||
raise ConanInvalidConfiguration("Clang version 12 or higher required")
|
|
||||||
if Version(self.version) >= "2.34.0" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14":
|
|
||||||
raise ConanInvalidConfiguration("Apple-Clang version 14 or higher required due to C++20 features")
|
|
||||||
if self.settings.compiler == "apple-clang" and "armv8" == self.settings.arch :
|
|
||||||
raise ConanInvalidConfiguration(f'{self.name} is still not supported by Mac M1.')
|
|
||||||
if Version(self.version) == "2.33.0" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "14":
|
|
||||||
raise ConanInvalidConfiguration(f'{self.ref} doesn\'t support Apple-Clang < 14.')
|
|
||||||
|
|
||||||
def build_requirements(self):
|
|
||||||
self.tool_requires("cmake/[>=3.18.0 <4]")
|
|
||||||
|
|
||||||
def export_sources(self):
|
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["MOLD_USE_MIMALLOC"] = self.options.with_mimalloc
|
|
||||||
tc.variables["MOLD_USE_SYSTEM_MIMALLOC"] = True
|
|
||||||
tc.variables["MOLD_USE_SYSTEM_TBB"] = False # see https://github.com/conan-io/conan-center-index/pull/23575#issuecomment-2059154281
|
|
||||||
tc.variables["CMAKE_INSTALL_LIBEXECDIR"] = "libexec"
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
cd = CMakeDeps(self)
|
|
||||||
cd.generate()
|
|
||||||
|
|
||||||
vbe = VirtualBuildEnv(self)
|
|
||||||
vbe.generate()
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "share"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.includedirs = []
|
|
||||||
self.cpp_info.libdirs = []
|
|
||||||
self.cpp_info.frameworkdirs = []
|
|
||||||
self.cpp_info.resdirs = []
|
|
||||||
|
|
||||||
if self.settings.os in ["Linux", "FreeBSD"]:
|
|
||||||
self.cpp_info.system_libs = ["m", "pthread", "dl"]
|
|
||||||
|
|
||||||
bindir = os.path.join(self.package_folder, "bin")
|
|
||||||
mold_executable = os.path.join(bindir, "mold")
|
|
||||||
self.conf_info.define("user.mold:path", mold_executable)
|
|
||||||
self.buildenv_info.define_path("MOLD_ROOT", bindir)
|
|
||||||
self.buildenv_info.define("LD", mold_executable)
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
From 2f29fc752620180d88e82792adb2ff8a1d886bd1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Tim=20Friedrich=20Br=C3=BCggemann?=
|
|
||||||
<tim.brueggemann@dampsoft.de>
|
|
||||||
Date: Tue, 17 Jun 2025 09:48:43 +0200
|
|
||||||
Subject: [PATCH] patch: Enforce C++11 for TBB
|
|
||||||
|
|
||||||
---
|
|
||||||
third-party/tbb/CMakeLists.txt | 4 +---
|
|
||||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/third-party/tbb/CMakeLists.txt b/third-party/tbb/CMakeLists.txt
|
|
||||||
index 12273b3e..21c4e2ef 100644
|
|
||||||
--- a/third-party/tbb/CMakeLists.txt
|
|
||||||
+++ b/third-party/tbb/CMakeLists.txt
|
|
||||||
@@ -77,9 +77,7 @@ include(CMakeDependentOption)
|
|
||||||
# ---------------------------------------------------------------------------------------------------------
|
|
||||||
# Handle C++ standard version.
|
|
||||||
if (NOT MSVC) # no need to cover MSVC as it uses C++14 by default.
|
|
||||||
- if (NOT CMAKE_CXX_STANDARD)
|
|
||||||
- set(CMAKE_CXX_STANDARD 11)
|
|
||||||
- endif()
|
|
||||||
+ set(CMAKE_CXX_STANDARD 11)
|
|
||||||
|
|
||||||
if (CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION) # if standard option was detected by CMake
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
--
|
|
||||||
2.25.1
|
|
||||||
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
|
|
||||||
|
|
||||||
class MoldTestConan(ConanFile):
|
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
self.run("mold -v", env="conanrun")
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
versions:
|
|
||||||
"2.41.0":
|
|
||||||
folder: all
|
|
||||||
"2.40.1":
|
|
||||||
folder: all
|
|
||||||
"2.36.0":
|
|
||||||
folder: all
|
|
||||||
"2.34.1":
|
|
||||||
folder: all
|
|
||||||
"2.33.0":
|
|
||||||
folder: all
|
|
||||||
"2.32.1":
|
|
||||||
folder: all
|
|
||||||
"2.32.0":
|
|
||||||
folder: all
|
|
||||||
"2.31.0":
|
|
||||||
folder: all
|
|
||||||
"2.4.0":
|
|
||||||
folder: all
|
|
||||||
"2.0.0":
|
|
||||||
folder: all
|
|
||||||
"1.11.0":
|
|
||||||
folder: all
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"2026.1":
|
|
||||||
url: "https://github.com/google/shaderc/archive/refs/tags/v2026.1.tar.gz"
|
|
||||||
sha256: "245002feccbe7f8361b223545a5654cea69780745886872d7efff50a38d96c66"
|
|
||||||
"2025.3":
|
"2025.3":
|
||||||
url: "https://github.com/google/shaderc/archive/refs/tags/v2025.3.tar.gz"
|
url: "https://github.com/google/shaderc/archive/refs/tags/v2025.3.tar.gz"
|
||||||
sha256: "a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937"
|
sha256: "a8e4a25e5c2686fd36981e527ed05e451fcfc226bddf350f4e76181371190937"
|
||||||
@@ -15,16 +12,6 @@ sources:
|
|||||||
url: "https://github.com/google/shaderc/archive/v2021.1.tar.gz"
|
url: "https://github.com/google/shaderc/archive/v2021.1.tar.gz"
|
||||||
sha256: "047113bc4628da164a3cb845efc20d442728873f6054a68ab56d04a053f2c32b"
|
sha256: "047113bc4628da164a3cb845efc20d442728873f6054a68ab56d04a053f2c32b"
|
||||||
patches:
|
patches:
|
||||||
"2026.1":
|
|
||||||
- patch_file: "patches/2025.3/use-conan-dependencies.patch"
|
|
||||||
patch_description: "Replace third_party with Conan dependencies"
|
|
||||||
patch_type: "conan"
|
|
||||||
- patch_file: "patches/2026.1/adapt-update_build_version.py.patch"
|
|
||||||
patch_description: "Adapt update_build_version.py for Conan"
|
|
||||||
patch_type: "conan"
|
|
||||||
- patch_file: "patches/2021.1/install-shaderc_util.patch"
|
|
||||||
patch_description: "install() shaderc_util"
|
|
||||||
patch_type: "conan"
|
|
||||||
"2025.3":
|
"2025.3":
|
||||||
- patch_file: "patches/2025.3/use-conan-dependencies.patch"
|
- patch_file: "patches/2025.3/use-conan-dependencies.patch"
|
||||||
patch_description: "Replace third_party with Conan dependencies"
|
patch_description: "Replace third_party with Conan dependencies"
|
||||||
@@ -67,7 +54,6 @@ patches:
|
|||||||
patch_type: "conan"
|
patch_type: "conan"
|
||||||
siprv_mapping:
|
siprv_mapping:
|
||||||
# TODO: bump me once newer versions are available on CCI
|
# TODO: bump me once newer versions are available on CCI
|
||||||
"2026.1": "1.4.341.0"
|
|
||||||
"2025.3": "1.4.313.0"
|
"2025.3": "1.4.313.0"
|
||||||
"2024.1": "1.3.261.1"
|
"2024.1": "1.3.261.1"
|
||||||
# "2023.6": "1.3.261.1"
|
# "2023.6": "1.3.261.1"
|
||||||
|
|||||||
@@ -51,11 +51,6 @@ class ShadercConan(ConanFile):
|
|||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
# transitive_headers=True is not required for any of the dependencies
|
# transitive_headers=True is not required for any of the dependencies
|
||||||
if Version(self.version) >= "1.4.341.0":
|
|
||||||
self.requires(f"glslang/{self._spirv_version}@{self.user}/{self.channel}")
|
|
||||||
self.requires(f"spirv-tools/{self._spirv_version}@{self.user}/{self.channel}")
|
|
||||||
self.requires(f"spirv-headers/{self._spirv_version}@{self.user}/{self.channel}")
|
|
||||||
else:
|
|
||||||
self.requires(f"glslang/{self._spirv_version}")
|
self.requires(f"glslang/{self._spirv_version}")
|
||||||
self.requires(f"spirv-tools/{self._spirv_version}")
|
self.requires(f"spirv-tools/{self._spirv_version}")
|
||||||
self.requires(f"spirv-headers/{self._spirv_version}")
|
self.requires(f"spirv-headers/{self._spirv_version}")
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
diff --git a/utils/update_build_version.py b/utils/update_build_version.py
|
|
||||||
--- a/utils/update_build_version.py
|
|
||||||
+++ b/utils/update_build_version.py
|
|
||||||
@@ -130,18 +130,18 @@
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
- if len(sys.argv) != 5:
|
|
||||||
+ if len(sys.argv) < 5:
|
|
||||||
print(('usage: {} <shaderc-dir> <spirv-tools-dir> <glslang-dir> <output-file>'.format(
|
|
||||||
sys.argv[0])))
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
- projects = ['shaderc', 'spirv-tools', 'glslang']
|
|
||||||
+ projects = ['shaderc']
|
|
||||||
new_content = ''.join([
|
|
||||||
'"{}\\n"\n'.format(get_version_string(p, d))
|
|
||||||
for (p, d) in zip(projects, sys.argv[1:])
|
|
||||||
])
|
|
||||||
|
|
||||||
- output_file = sys.argv[4]
|
|
||||||
+ output_file = sys.argv[-1]
|
|
||||||
mkdir_p(os.path.dirname(output_file))
|
|
||||||
|
|
||||||
if os.path.isfile(output_file):
|
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
versions:
|
versions:
|
||||||
"2026.1":
|
|
||||||
folder: all
|
|
||||||
"2025.3":
|
"2025.3":
|
||||||
folder: all
|
folder: all
|
||||||
"2024.1":
|
"2024.1":
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
sources:
|
|
||||||
"1.4.341.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.341.0.tar.gz"
|
|
||||||
sha256: "b2665ac9ddb65ff75a7ca2f6d410e73da443692742a1e3a5b7728ca6069a400c"
|
|
||||||
"1.4.321.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.321.0.tar.gz"
|
|
||||||
sha256: "6037555620c27105bf1d4068a6eeb4b0d7953630d556a1ca9799dfe06fd2fb68"
|
|
||||||
"1.4.313.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
|
||||||
sha256: "7d1de24918bea9897753f7561d4d154f68ec89c36bb70c13598222b8039d4212"
|
|
||||||
"1.4.309.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.4.309.0.tar.gz"
|
|
||||||
sha256: "cf4f12a767d63f63024e61750e372ffdc95567513b99ed9be6f21f474b328ddd"
|
|
||||||
"1.3.296.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz"
|
|
||||||
sha256: "4f7f9a8a643e6694f155712016b9b572c13a9444e65b3f43b27bb464c0ab76e0"
|
|
||||||
"1.3.268.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz"
|
|
||||||
sha256: "dd656a51ba4c229c1a0bb220b7470723e8fd4b68abb7f2cf2ca4027df824f4a0"
|
|
||||||
"1.3.261.1":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.261.1.tar.gz"
|
|
||||||
sha256: "a5cf99ed62e93800232e50b782890321d4d7e053dcaa71bd8efc0c48a00bd1dd"
|
|
||||||
"1.3.250.1":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.250.1.tar.gz"
|
|
||||||
sha256: "5b7402d7078eeffca0926875b1dcd0f5dd78791a30529de7c8456686f6fc52ce"
|
|
||||||
"1.3.246.1":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.246.1.tar.gz"
|
|
||||||
sha256: "44d1aef7e6e247b4b7ec6a1ef0bbb43cc9b681ee689393db90ac815d240808b1"
|
|
||||||
"1.3.243.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.243.0.tar.gz"
|
|
||||||
sha256: "549fff809de2b3484bcc5d710ccd76ca29cbd764dd304c3687252e2f3d034e06"
|
|
||||||
"1.3.239.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/refs/tags/sdk-1.3.239.0.tar.gz"
|
|
||||||
sha256: "a1695022880e7ef3c2d407647f79876045dc2a3ed012753adc71ead5cc5178ba"
|
|
||||||
# commit used in Vulkan SDK 1.2.198.0
|
|
||||||
"cci.20211113":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Cross/archive/7c3cb0b12c9965497b08403c82ac1b82846fa7be.tar.gz"
|
|
||||||
sha256: "5bb6837e2b75db1a9e36e7d6eac40d905e3460ff3b5234f391adc6bdf6aadcdf"
|
|
||||||
@@ -1,206 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.errors import ConanInvalidConfiguration
|
|
||||||
from conan.tools.build import stdcpp_library
|
|
||||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
|
||||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rm, rmdir, save
|
|
||||||
import os
|
|
||||||
import textwrap
|
|
||||||
|
|
||||||
required_conan_version = ">=1.54.0"
|
|
||||||
|
|
||||||
|
|
||||||
class SpirvCrossConan(ConanFile):
|
|
||||||
name = "spirv-cross"
|
|
||||||
description = "SPIRV-Cross is a practical tool and library for performing " \
|
|
||||||
"reflection on SPIR-V and disassembling SPIR-V back to high level languages."
|
|
||||||
license = "Apache-2.0"
|
|
||||||
topics = ("reflection", "disassembler", "spirv", "spir-v", "glsl", "hlsl")
|
|
||||||
homepage = "https://github.com/KhronosGroup/SPIRV-Cross"
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
|
|
||||||
package_type = "library"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
options = {
|
|
||||||
"shared": [True, False],
|
|
||||||
"fPIC": [True, False],
|
|
||||||
"build_executable": [True, False],
|
|
||||||
"exceptions": [True, False],
|
|
||||||
"glsl": [True, False],
|
|
||||||
"hlsl": [True, False],
|
|
||||||
"msl": [True, False],
|
|
||||||
"cpp": [True, False],
|
|
||||||
"reflect": [True, False],
|
|
||||||
"c_api": [True, False],
|
|
||||||
"util": [True, False],
|
|
||||||
"namespace": ["ANY"],
|
|
||||||
}
|
|
||||||
default_options = {
|
|
||||||
"shared": False,
|
|
||||||
"fPIC": True,
|
|
||||||
"build_executable": True,
|
|
||||||
"exceptions": True,
|
|
||||||
"glsl": True,
|
|
||||||
"hlsl": True,
|
|
||||||
"msl": True,
|
|
||||||
"cpp": True,
|
|
||||||
"reflect": True,
|
|
||||||
"c_api": True,
|
|
||||||
"util": True,
|
|
||||||
"namespace": "spirv_cross",
|
|
||||||
}
|
|
||||||
|
|
||||||
def export_sources(self):
|
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
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")
|
|
||||||
# these options don't contribute to shared binary
|
|
||||||
del self.options.c_api
|
|
||||||
del self.options.util
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
if not self.options.glsl and \
|
|
||||||
(self.options.hlsl or self.options.msl or self.options.cpp or self.options.reflect):
|
|
||||||
raise ConanInvalidConfiguration("hlsl, msl, cpp and reflect require glsl enabled")
|
|
||||||
|
|
||||||
if self.options.build_executable and \
|
|
||||||
not (self.options.glsl and self.options.hlsl and self.options.msl and
|
|
||||||
self.options.cpp and self.options.reflect and self.options.get_safe("util", True)):
|
|
||||||
raise ConanInvalidConfiguration("executable can't be built without glsl, hlsl, msl, cpp, reflect and util")
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS"] = not self.options.exceptions
|
|
||||||
tc.variables["SPIRV_CROSS_SHARED"] = self.options.shared
|
|
||||||
tc.variables["SPIRV_CROSS_STATIC"] = not self.options.shared or self.options.build_executable
|
|
||||||
tc.variables["SPIRV_CROSS_CLI"] = self.options.build_executable
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_TESTS"] = False
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_GLSL"] = self.options.glsl
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_HLSL"] = self.options.hlsl
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_MSL"] = self.options.msl
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_CPP"] = self.options.cpp
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_REFLECT"] = self.options.reflect
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_C_API"] = self.options.get_safe("c_api", True)
|
|
||||||
tc.variables["SPIRV_CROSS_ENABLE_UTIL"] = self.options.get_safe("util", False) or self.options.build_executable
|
|
||||||
tc.variables["SPIRV_CROSS_SKIP_INSTALL"] = False
|
|
||||||
tc.variables["SPIRV_CROSS_FORCE_PIC"] = self.options.get_safe("fPIC", True)
|
|
||||||
tc.variables["SPIRV_CROSS_NAMESPACE_OVERRIDE"] = self.options.namespace
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "share"))
|
|
||||||
rm(self, "*.ilk", os.path.join(self.package_folder, "bin"))
|
|
||||||
rm(self, "*.pdb", os.path.join(self.package_folder, "bin"))
|
|
||||||
if self.options.shared and self.options.build_executable:
|
|
||||||
for static_lib in [
|
|
||||||
"spirv-cross-core", "spirv-cross-glsl", "spirv-cross-hlsl", "spirv-cross-msl",
|
|
||||||
"spirv-cross-cpp", "spirv-cross-reflect", "spirv-cross-c", "spirv-cross-util",
|
|
||||||
]:
|
|
||||||
rm(self, f"*{static_lib}.*", os.path.join(self.package_folder, "lib"))
|
|
||||||
|
|
||||||
# TODO: to remove in conan v2 once legacy generators removed
|
|
||||||
self._create_cmake_module_alias_targets(
|
|
||||||
os.path.join(self.package_folder, self._module_file_rel_path),
|
|
||||||
{target: f"spirv-cross::{target}" for target in self._spirv_cross_components.keys()},
|
|
||||||
)
|
|
||||||
|
|
||||||
def _create_cmake_module_alias_targets(self, module_file, targets):
|
|
||||||
content = ""
|
|
||||||
for alias, aliased in targets.items():
|
|
||||||
content += textwrap.dedent(f"""\
|
|
||||||
if(TARGET {aliased} AND NOT TARGET {alias})
|
|
||||||
add_library({alias} INTERFACE IMPORTED)
|
|
||||||
set_property(TARGET {alias} PROPERTY INTERFACE_LINK_LIBRARIES {aliased})
|
|
||||||
endif()
|
|
||||||
""")
|
|
||||||
save(self, module_file, content)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _module_file_rel_path(self):
|
|
||||||
return os.path.join("lib", "cmake", f"conan-official-{self.name}-targets.cmake")
|
|
||||||
|
|
||||||
@property
|
|
||||||
def _spirv_cross_components(self):
|
|
||||||
components = {}
|
|
||||||
if self.options.shared:
|
|
||||||
components.update({"spirv-cross-c-shared": []})
|
|
||||||
else:
|
|
||||||
components.update({"spirv-cross-core": []})
|
|
||||||
if self.options.glsl:
|
|
||||||
components.update({"spirv-cross-glsl": ["spirv-cross-core"]})
|
|
||||||
if self.options.hlsl:
|
|
||||||
components.update({"spirv-cross-hlsl": ["spirv-cross-glsl"]})
|
|
||||||
if self.options.msl:
|
|
||||||
components.update({"spirv-cross-msl": ["spirv-cross-glsl"]})
|
|
||||||
if self.options.cpp:
|
|
||||||
components.update({"spirv-cross-cpp": ["spirv-cross-glsl"]})
|
|
||||||
if self.options.reflect:
|
|
||||||
components.update({"spirv-cross-reflect": []})
|
|
||||||
if self.options.c_api:
|
|
||||||
c_api_requires = []
|
|
||||||
if self.options.glsl:
|
|
||||||
c_api_requires.append("spirv-cross-glsl")
|
|
||||||
if self.options.hlsl:
|
|
||||||
c_api_requires.append("spirv-cross-hlsl")
|
|
||||||
if self.options.msl:
|
|
||||||
c_api_requires.append("spirv-cross-msl")
|
|
||||||
if self.options.cpp:
|
|
||||||
c_api_requires.append("spirv-cross-cpp")
|
|
||||||
if self.options.reflect:
|
|
||||||
c_api_requires.append("spirv-cross-reflect")
|
|
||||||
components.update({"spirv-cross-c": c_api_requires})
|
|
||||||
if self.options.util:
|
|
||||||
components.update({"spirv-cross-util": ["spirv-cross-core"]})
|
|
||||||
return components
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
# FIXME: we should provide one CMake config file per target (waiting for an implementation of https://github.com/conan-io/conan/issues/9000)
|
|
||||||
def _register_component(target_lib, requires):
|
|
||||||
self.cpp_info.components[target_lib].set_property("cmake_target_name", target_lib)
|
|
||||||
if self.options.shared:
|
|
||||||
self.cpp_info.components[target_lib].set_property("pkg_config_name", target_lib)
|
|
||||||
prefix = "d" if self.settings.os == "Windows" and self.settings.build_type == "Debug" else ""
|
|
||||||
self.cpp_info.components[target_lib].libs = [f"{target_lib}{prefix}"]
|
|
||||||
self.cpp_info.components[target_lib].includedirs.append(os.path.join("include", "spirv_cross"))
|
|
||||||
self.cpp_info.components[target_lib].defines.append(f"SPIRV_CROSS_NAMESPACE_OVERRIDE={self.options.namespace}")
|
|
||||||
self.cpp_info.components[target_lib].requires = requires
|
|
||||||
if self.settings.os in ["Linux", "FreeBSD"] and self.options.glsl:
|
|
||||||
self.cpp_info.components[target_lib].system_libs.append("m")
|
|
||||||
if not self.options.shared and self.options.c_api:
|
|
||||||
libcxx = stdcpp_library(self)
|
|
||||||
if libcxx:
|
|
||||||
self.cpp_info.components[target_lib].system_libs.append(libcxx)
|
|
||||||
|
|
||||||
# TODO: to remove in conan v2 once legacy generators removed
|
|
||||||
self.cpp_info.components[target_lib].names["cmake_find_package"] = target_lib
|
|
||||||
self.cpp_info.components[target_lib].names["cmake_find_package_multi"] = target_lib
|
|
||||||
self.cpp_info.components[target_lib].build_modules["cmake_find_package"] = [self._module_file_rel_path]
|
|
||||||
self.cpp_info.components[target_lib].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path]
|
|
||||||
|
|
||||||
for target_lib, requires in self._spirv_cross_components.items():
|
|
||||||
_register_component(target_lib, requires)
|
|
||||||
|
|
||||||
# TODO: to remove in conan v2 once legacy generators removed
|
|
||||||
if self.options.build_executable:
|
|
||||||
self.env_info.PATH.append(os.path.join(self.package_folder, "bin"))
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES C)
|
|
||||||
|
|
||||||
# FIXME: this is not the official way to find spirv-cross components
|
|
||||||
find_package(spirv-cross REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} test_package.c)
|
|
||||||
if(TARGET spirv-cross-c)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE spirv-cross-c)
|
|
||||||
elseif(TARGET spirv-cross-c-shared)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE spirv-cross-c-shared)
|
|
||||||
endif()
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#include <spirv_cross_c.h>
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
spvc_context context;
|
|
||||||
spvc_context_create(&context);
|
|
||||||
spvc_context_destroy(context);
|
|
||||||
|
|
||||||
unsigned major, minor, patch;
|
|
||||||
spvc_get_version(&major, &minor, &patch);
|
|
||||||
printf("SPIRV-Cross: C API version %u.%u.%u\n", major, minor, patch);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
versions:
|
|
||||||
"1.4.341.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.321.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.313.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.309.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.296.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.268.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.261.1":
|
|
||||||
folder: all
|
|
||||||
"1.3.250.1":
|
|
||||||
folder: all
|
|
||||||
"1.3.246.1":
|
|
||||||
folder: all
|
|
||||||
"1.3.243.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.239.0":
|
|
||||||
folder: all
|
|
||||||
"cci.20211113":
|
|
||||||
folder: all
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
sources:
|
|
||||||
"1.4.341.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.4.341.0.tar.gz"
|
|
||||||
sha256: "cab0a654c4917e16367483296b44cdb1d614e3120c721beafcd37e3a8580486c"
|
|
||||||
"1.4.313.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
|
||||||
sha256: "f68be549d74afb61600a1e3a7d1da1e6b7437758c8e77d664909f88f302c5ac1"
|
|
||||||
"1.4.309.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.4.309.0.tar.gz"
|
|
||||||
sha256: "a96f8b4f2dfb18f7432e5c523e220ab0075372a9509e0c25fbff21c76af0de7c"
|
|
||||||
"1.3.296.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz"
|
|
||||||
sha256: "1423d58a1171611d5aba2bf6f8c69c72ef9c38a0aca12c3493e4fda64c9b2dc6"
|
|
||||||
"1.3.268.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz"
|
|
||||||
sha256: "1022379e5b920ae21ccfb5cb41e07b1c59352a18c3d3fdcbf38d6ae7733384d4"
|
|
||||||
"1.3.261.1":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.3.261.1.tar.gz"
|
|
||||||
sha256: "32b4c6ae6a2fa9b56c2c17233c8056da47e331f76e117729925825ea3e77a739"
|
|
||||||
"1.3.243.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.3.243.0.tar.gz"
|
|
||||||
sha256: "16927b1868e7891377d059cd549484e4158912439cf77451ae7e01e2a3bcd28b"
|
|
||||||
"1.3.239.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.3.239.0.tar.gz"
|
|
||||||
sha256: "fdaf6670e311cd1c08ae90bf813e89dd31630205bc60030ffd25fb0af39b51fe"
|
|
||||||
"1.2.198.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.2.198.0.tar.gz"
|
|
||||||
sha256: "3301a23aca0434336a643e433dcacacdd60000ab3dd35dc0078a297c06124a12"
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
|
||||||
from conan.tools.files import copy, get, rmdir
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
import os
|
|
||||||
|
|
||||||
required_conan_version = ">=1.50.0"
|
|
||||||
|
|
||||||
|
|
||||||
class SpirvheadersConan(ConanFile):
|
|
||||||
name = "spirv-headers"
|
|
||||||
homepage = "https://github.com/KhronosGroup/SPIRV-Headers"
|
|
||||||
description = "Header files for the SPIRV instruction set."
|
|
||||||
license = "MIT-KhronosGroup"
|
|
||||||
topics = ("spirv", "spirv-v", "vulkan", "opengl", "opencl", "khronos")
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
package_type = "header-library"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def package_id(self):
|
|
||||||
self.info.clear()
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
tc.variables["SPIRV_HEADERS_SKIP_EXAMPLES"] = True
|
|
||||||
if Version(self.version) > "1.3.275.0":
|
|
||||||
tc.variables["SPIRV_HEADERS_ENABLE_TESTS"] = False
|
|
||||||
if Version(self.version) <= "1.3.243.0":
|
|
||||||
tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "share"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "SPIRV-Headers")
|
|
||||||
self.cpp_info.set_property("cmake_target_name", "SPIRV-Headers::SPIRV-Headers")
|
|
||||||
self.cpp_info.set_property("pkg_config_name", "SPIRV-Headers")
|
|
||||||
self.cpp_info.bindirs = []
|
|
||||||
self.cpp_info.libdirs = []
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES CXX)
|
|
||||||
|
|
||||||
find_package(SPIRV-Headers REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE SPIRV-Headers::SPIRV-Headers)
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// Copyright (c) 2016 The Khronos Group Inc.
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
// copy of this software and/or associated documentation files (the
|
|
||||||
// "Materials"), to deal in the Materials without restriction, including
|
|
||||||
// without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
// distribute, sublicense, and/or sell copies of the Materials, and to
|
|
||||||
// permit persons to whom the Materials are furnished to do so, subject to
|
|
||||||
// the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included
|
|
||||||
// in all copies or substantial portions of the Materials.
|
|
||||||
//
|
|
||||||
// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS
|
|
||||||
// KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS
|
|
||||||
// SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT
|
|
||||||
// https://www.khronos.org/registry/
|
|
||||||
//
|
|
||||||
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
|
||||||
|
|
||||||
#include <spirv/1.0/GLSL.std.450.h>
|
|
||||||
#include <spirv/1.0/OpenCL.std.h>
|
|
||||||
#include <spirv/1.0/spirv.hpp>
|
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
const GLSLstd450 kSin = GLSLstd450Sin;
|
|
||||||
const OpenCLLIB::Entrypoints kNative_cos = OpenCLLIB::Native_cos;
|
|
||||||
const spv::Op kNop = spv::OpNop;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char ** argv)
|
|
||||||
{
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
versions:
|
|
||||||
"1.4.341.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.313.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.309.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.296.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.268.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.261.1":
|
|
||||||
folder: all
|
|
||||||
"1.3.243.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.239.0":
|
|
||||||
folder: all
|
|
||||||
"1.2.198.0":
|
|
||||||
folder: all
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
# Add only the SDK release versions from https://github.com/KhronosGroup/SPIRV-Tools/tags for consistency
|
|
||||||
sources:
|
|
||||||
"1.4.341.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.4.341.0.tar.gz"
|
|
||||||
sha256: "15bfb678138cdf9cd1480dfb952547bbb66b763a735b6d5582578572f5c2e6f9"
|
|
||||||
"1.4.313.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
|
||||||
sha256: "6b60f723345ceed5291cceebbcfacf7fea9361a69332261fa08ae57e2a562005"
|
|
||||||
"1.4.309.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.4.309.0.tar.gz"
|
|
||||||
sha256: "6b8577054c575573ead3ad71cb6a2c0b3397b64c746cc3c99e48cc5e324c1b55"
|
|
||||||
"1.3.268.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz"
|
|
||||||
sha256: "4c19fdcffb5fe8ef8dc93d7a65ae78b64edc7a5688893ee381c57f70be77deaf"
|
|
||||||
"1.3.261.1":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.3.261.1.tar.gz"
|
|
||||||
sha256: "ead95c626ad482882a141d1aa0ce47b9453871f72c42c0b28d39c82f60a52008"
|
|
||||||
"1.3.243.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.3.243.0.tar.gz"
|
|
||||||
sha256: "684a29e37bfdc6e151fe1d3ec4b87c5396c17a439de545d81ea05d4ee6fbc86e"
|
|
||||||
"1.3.239.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.3.239.0.tar.gz"
|
|
||||||
sha256: "327b2dba4515646eee28c1a5fe1332891e81c8b6ff289363f52877f3e67c2d81"
|
|
||||||
"1.3.236.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.3.236.0.tar.gz"
|
|
||||||
sha256: "6789c782a8ba8fa127c3d579f9362f0cdde7a9ccc2e8513cdf217bba579dfda9"
|
|
||||||
"1.2.198.0":
|
|
||||||
url: "https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags/sdk-1.2.198.0.tar.gz"
|
|
||||||
sha256: "e8a9fec946f8473129374ad6b98ee690ac9a4574ace7cb3b46bbeb4eddfdc33b"
|
|
||||||
patches:
|
|
||||||
"1.4.313.0":
|
|
||||||
- patch_file: "patches/0001-fix-clang-20-build-issue.patch"
|
|
||||||
patch_description: "fix clang-20 build issue"
|
|
||||||
patch_type: "backport"
|
|
||||||
"1.4.309.0":
|
|
||||||
- patch_file: "patches/0001-fix-clang-20-build-issue.patch"
|
|
||||||
patch_description: "fix clang-20 build issue"
|
|
||||||
patch_type: "backport"
|
|
||||||
"1.3.268.0":
|
|
||||||
- patch_file: "patches/0001-fix-clang-20-build-issue.patch"
|
|
||||||
patch_description: "fix clang-20 build issue"
|
|
||||||
patch_type: "backport"
|
|
||||||
"1.3.261.1":
|
|
||||||
- patch_file: "patches/0001-fix-clang-20-build-issue.patch"
|
|
||||||
patch_description: "fix clang-20 build issue"
|
|
||||||
patch_type: "backport"
|
|
||||||
@@ -1,202 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import check_min_cppstd, stdcpp_library
|
|
||||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
|
||||||
from conan.tools.env import VirtualBuildEnv
|
|
||||||
from conan.tools.files import copy, get, replace_in_file, rm, rmdir, save, apply_conandata_patches, export_conandata_patches
|
|
||||||
from conan.tools.scm import Version
|
|
||||||
import os
|
|
||||||
|
|
||||||
required_conan_version = ">=2.1"
|
|
||||||
|
|
||||||
|
|
||||||
class SpirvtoolsConan(ConanFile):
|
|
||||||
name = "spirv-tools"
|
|
||||||
homepage = "https://github.com/KhronosGroup/SPIRV-Tools/"
|
|
||||||
description = "Create and optimize SPIRV shaders"
|
|
||||||
topics = ("spirv", "spirv-v", "vulkan", "opengl", "opencl", "hlsl", "khronos")
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
license = "Apache-2.0"
|
|
||||||
|
|
||||||
package_type = "library"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
options = {
|
|
||||||
"shared": [True, False],
|
|
||||||
"fPIC": [True, False],
|
|
||||||
"build_executables": [True, False],
|
|
||||||
}
|
|
||||||
default_options = {
|
|
||||||
"shared": False,
|
|
||||||
"fPIC": True,
|
|
||||||
"build_executables": True,
|
|
||||||
}
|
|
||||||
|
|
||||||
short_paths = True
|
|
||||||
|
|
||||||
def export_sources(self):
|
|
||||||
export_conandata_patches(self)
|
|
||||||
|
|
||||||
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 layout(self):
|
|
||||||
cmake_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
if Version(self.version) >= "1.4.341.0":
|
|
||||||
self.requires(f"spirv-headers/{self.version}@{self.user}/{self.channel}")
|
|
||||||
else:
|
|
||||||
self.requires(f"spirv-headers/{self.version}")
|
|
||||||
|
|
||||||
def validate_build(self):
|
|
||||||
# newer versions of the library require C++17 for internals
|
|
||||||
check_min_cppstd(self, 11 if Version(self.version) < "1.3.243" else 17)
|
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
# The interface requires C++11
|
|
||||||
check_min_cppstd(self, 11)
|
|
||||||
|
|
||||||
def build_requirements(self):
|
|
||||||
if Version(self.version) >= "1.3.239":
|
|
||||||
self.tool_requires("cmake/[>=3.17.2 <4]")
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def generate(self):
|
|
||||||
env = VirtualBuildEnv(self)
|
|
||||||
env.generate()
|
|
||||||
|
|
||||||
tc = CMakeToolchain(self)
|
|
||||||
|
|
||||||
#====================
|
|
||||||
# Shared libs mess in Spirv-Tools (see https://github.com/KhronosGroup/SPIRV-Tools/issues/3909)
|
|
||||||
#====================
|
|
||||||
# We have 2 solutions if shared True:
|
|
||||||
# - Only package SPIRV-Tools-shared lib (private symbols properly hidden), and wait resolution
|
|
||||||
# of above issue before allowing to build shared for all Spirv-Tools libs.
|
|
||||||
# - Build and package shared libs with all symbols exported
|
|
||||||
# (it would require CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS for msvc)
|
|
||||||
# Currently this recipe implements the first solution
|
|
||||||
|
|
||||||
# Static and shared libs are controlled by a weird combination
|
|
||||||
# of SPIRV_TOOLS_BUILD_STATIC and BUILD_SHARED_LIBS.
|
|
||||||
tc.variables["SPIRV_TOOLS_BUILD_STATIC"] = True
|
|
||||||
#============
|
|
||||||
|
|
||||||
# Required by the project's CMakeLists.txt
|
|
||||||
tc.variables["SPIRV-Headers_SOURCE_DIR"] = self.dependencies["spirv-headers"].package_folder.replace("\\", "/")
|
|
||||||
|
|
||||||
# There are some switch( ) statements that are causing errors
|
|
||||||
# need to turn this off
|
|
||||||
tc.variables["SPIRV_WERROR"] = False
|
|
||||||
|
|
||||||
tc.variables["SKIP_SPIRV_TOOLS_INSTALL"] = False
|
|
||||||
tc.variables["SPIRV_LOG_DEBUG"] = False
|
|
||||||
tc.variables["SPIRV_SKIP_TESTS"] = True
|
|
||||||
tc.variables["SPIRV_CHECK_CONTEXT"] = False
|
|
||||||
tc.variables["SPIRV_BUILD_FUZZER"] = False
|
|
||||||
tc.variables["SPIRV_SKIP_EXECUTABLES"] = not self.options.build_executables
|
|
||||||
# To install relocatable shared libs on Macos
|
|
||||||
if Version(self.version) < "1.3.239":
|
|
||||||
tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW"
|
|
||||||
tc.cache_variables["CMAKE_POLICY_VERSION_MINIMUM"] = "3.5" # CMake 4 support
|
|
||||||
# For iOS/tvOS/watchOS
|
|
||||||
tc.variables["CMAKE_MACOSX_BUNDLE"] = False
|
|
||||||
|
|
||||||
tc.generate()
|
|
||||||
|
|
||||||
def _patch_sources(self):
|
|
||||||
apply_conandata_patches(self)
|
|
||||||
# CMAKE_POSITION_INDEPENDENT_CODE was set ON for the entire
|
|
||||||
# project in the lists file.
|
|
||||||
replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
|
|
||||||
"set(CMAKE_POSITION_INDEPENDENT_CODE ON)", "")
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
self._patch_sources()
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.install()
|
|
||||||
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "SPIRV-Tools"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "SPIRV-Tools-link"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "SPIRV-Tools-opt"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "SPIRV-Tools-reduce"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "SPIRV-Tools-lint"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "SPIRV-Tools-diff"))
|
|
||||||
rmdir(self, os.path.join(self.package_folder, "SPIRV-Tools-tools"))
|
|
||||||
if self.options.shared:
|
|
||||||
for file_name in [
|
|
||||||
"*SPIRV-Tools", "*SPIRV-Tools-opt", "*SPIRV-Tools-link",
|
|
||||||
"*SPIRV-Tools-reduce", "*SPIRV-Tools-lint",
|
|
||||||
]:
|
|
||||||
for ext in [".a", ".lib"]:
|
|
||||||
rm(self, f"{file_name}{ext}", os.path.join(self.package_folder, "lib"))
|
|
||||||
else:
|
|
||||||
rm(self, "*SPIRV-Tools-shared.dll", os.path.join(self.package_folder, "bin"))
|
|
||||||
rm(self, "*SPIRV-Tools-shared*", os.path.join(self.package_folder, "lib"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "SPIRV-Tools")
|
|
||||||
self.cpp_info.set_property("pkg_config_name", "SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools")
|
|
||||||
|
|
||||||
# SPIRV-Tools
|
|
||||||
self.cpp_info.components["spirv-tools-core"].set_property(
|
|
||||||
"cmake_target_name",
|
|
||||||
"SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools-static",
|
|
||||||
)
|
|
||||||
self.cpp_info.components["spirv-tools-core"].set_property("cmake_target_aliases", ["SPIRV-Tools"]) # before 2020.5, kept for conveniency
|
|
||||||
self.cpp_info.components["spirv-tools-core"].libs = ["SPIRV-Tools-shared" if self.options.shared else "SPIRV-Tools"]
|
|
||||||
self.cpp_info.components["spirv-tools-core"].requires = ["spirv-headers::spirv-headers"]
|
|
||||||
if self.options.shared:
|
|
||||||
self.cpp_info.components["spirv-tools-core"].defines = ["SPIRV_TOOLS_SHAREDLIB"]
|
|
||||||
if self.settings.os in ["Linux", "FreeBSD"]:
|
|
||||||
self.cpp_info.components["spirv-tools-core"].system_libs.extend(["m", "rt"])
|
|
||||||
if not self.options.shared:
|
|
||||||
libcxx = stdcpp_library(self)
|
|
||||||
if libcxx:
|
|
||||||
self.cpp_info.components["spirv-tools-core"].system_libs.append(libcxx)
|
|
||||||
|
|
||||||
# FIXME: others components should have their own CMake config file
|
|
||||||
if not self.options.shared:
|
|
||||||
# SPIRV-Tools-opt
|
|
||||||
self.cpp_info.components["spirv-tools-opt"].set_property("cmake_target_name", "SPIRV-Tools-opt")
|
|
||||||
self.cpp_info.components["spirv-tools-opt"].libs = ["SPIRV-Tools-opt"]
|
|
||||||
self.cpp_info.components["spirv-tools-opt"].requires = ["spirv-tools-core", "spirv-headers::spirv-headers"]
|
|
||||||
if self.settings.os in ["Linux", "FreeBSD"]:
|
|
||||||
self.cpp_info.components["spirv-tools-opt"].system_libs.append("m")
|
|
||||||
|
|
||||||
# SPIRV-Tools-link
|
|
||||||
self.cpp_info.components["spirv-tools-link"].set_property("cmake_target_name", "SPIRV-Tools-link")
|
|
||||||
self.cpp_info.components["spirv-tools-link"].libs = ["SPIRV-Tools-link"]
|
|
||||||
self.cpp_info.components["spirv-tools-link"].requires = ["spirv-tools-core", "spirv-tools-opt"]
|
|
||||||
|
|
||||||
# SPIRV-Tools-reduce
|
|
||||||
self.cpp_info.components["spirv-tools-reduce"].set_property("cmake_target_name", "SPIRV-Tools-reduce")
|
|
||||||
self.cpp_info.components["spirv-tools-reduce"].libs = ["SPIRV-Tools-reduce"]
|
|
||||||
self.cpp_info.components["spirv-tools-reduce"].requires = ["spirv-tools-core", "spirv-tools-opt"]
|
|
||||||
|
|
||||||
# SPIRV-Tools-lint
|
|
||||||
self.cpp_info.components["spirv-tools-lint"].set_property("cmake_target_name", "SPIRV-Tools-lint")
|
|
||||||
self.cpp_info.components["spirv-tools-lint"].libs = ["SPIRV-Tools-lint"]
|
|
||||||
self.cpp_info.components["spirv-tools-lint"].requires = ["spirv-tools-core", "spirv-tools-opt"]
|
|
||||||
|
|
||||||
# SPIRV-Tools-diff
|
|
||||||
self.cpp_info.components["spirv-tools-diff"].set_property("cmake_target_name", "SPIRV-Tools-diff")
|
|
||||||
self.cpp_info.components["spirv-tools-diff"].libs = ["SPIRV-Tools-diff"]
|
|
||||||
self.cpp_info.components["spirv-tools-diff"].requires = ["spirv-tools-core", "spirv-tools-opt"]
|
|
||||||
|
|
||||||
if Version(self.version) < "1.3" and not self.options.shared:
|
|
||||||
del self.cpp_info.components["spirv-tools-diff"]
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
From 4b46b76c7c68f838f18906c6d3ca275eef207ca7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Elvis Dukaj <elvis.dukaj@dynatrace.com>
|
|
||||||
Date: Thu, 24 Apr 2025 14:36:21 +0200
|
|
||||||
Subject: [PATCH] fix clang-20 build issue
|
|
||||||
|
|
||||||
---
|
|
||||||
tools/diff/diff.cpp | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/tools/diff/diff.cpp b/tools/diff/diff.cpp
|
|
||||||
index d60edb2e..349ec092 100644
|
|
||||||
--- a/tools/diff/diff.cpp
|
|
||||||
+++ b/tools/diff/diff.cpp
|
|
||||||
@@ -87,7 +87,8 @@ std::unique_ptr<spvtools::opt::IRContext> load_module(const char* path) {
|
|
||||||
return spvtools::BuildModule(
|
|
||||||
kDefaultEnvironment, spvtools::utils::CLIMessageConsumer,
|
|
||||||
std::string(contents.begin(), contents.end()),
|
|
||||||
- spvtools::SpirvTools::kDefaultAssembleOption |
|
|
||||||
+ static_cast<spv_text_to_binary_options_t>(
|
|
||||||
+ spvtools::SpirvTools::kDefaultAssembleOption) |
|
|
||||||
SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package)
|
|
||||||
|
|
||||||
find_package(SPIRV-Tools REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME}_c test_package.c)
|
|
||||||
if(TARGET SPIRV-Tools-shared)
|
|
||||||
target_link_libraries(${PROJECT_NAME}_c PRIVATE SPIRV-Tools-shared)
|
|
||||||
elseif(TARGET SPIRV-Tools-static)
|
|
||||||
target_link_libraries(${PROJECT_NAME}_c PRIVATE SPIRV-Tools-static)
|
|
||||||
else()
|
|
||||||
target_link_libraries(${PROJECT_NAME}_c PRIVATE SPIRV-Tools)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# TODO: we should call find_package(SPIRV-Tools-opt REQUIRED CONFIG), but not modeled right now
|
|
||||||
if(TARGET SPIRV-Tools-opt)
|
|
||||||
add_executable(${PROJECT_NAME}_cpp test_package.cpp)
|
|
||||||
target_link_libraries(${PROJECT_NAME}_cpp PRIVATE SPIRV-Tools-opt)
|
|
||||||
if(SPIRV-Tools_VERSION VERSION_LESS "1.3.243.0")
|
|
||||||
target_compile_features(${PROJECT_NAME}_cpp PRIVATE cxx_std_11)
|
|
||||||
else()
|
|
||||||
target_compile_features(${PROJECT_NAME}_cpp PRIVATE cxx_std_17)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path_c = os.path.join(self.cpp.build.bindirs[0], "test_package_c")
|
|
||||||
self.run(bin_path_c, env="conanrun")
|
|
||||||
bin_path_cpp = os.path.join(self.cpp.build.bindirs[0], "test_package_cpp")
|
|
||||||
if os.path.exists(bin_path_cpp):
|
|
||||||
self.run(bin_path_cpp, env="conanrun")
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#include "spirv-tools/libspirv.h"
|
|
||||||
|
|
||||||
int main(int argc, char ** argv)
|
|
||||||
{
|
|
||||||
const char input_text[] =
|
|
||||||
"OpCapability Shader\n"
|
|
||||||
"OpCapability Linkage\n"
|
|
||||||
"OpMemoryModel Logical GLSL450";
|
|
||||||
spv_text text;
|
|
||||||
spv_binary binary;
|
|
||||||
spv_context context;
|
|
||||||
|
|
||||||
context = spvContextCreate(SPV_ENV_UNIVERSAL_1_1);
|
|
||||||
|
|
||||||
binary = 0;
|
|
||||||
if( SPV_SUCCESS != spvTextToBinary(context, input_text, sizeof(input_text), &binary, 0) )
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
text = 0;
|
|
||||||
if( SPV_SUCCESS != spvBinaryToText(context, binary->code, binary->wordCount, 0, &text, 0) )
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
spvTextDestroy(text);
|
|
||||||
spvBinaryDestroy(binary);
|
|
||||||
spvContextDestroy(context);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
// Copyright (c) 2016 Google Inc.
|
|
||||||
//
|
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
// you may not use this file except in compliance with the License.
|
|
||||||
// You may obtain a copy of the License at
|
|
||||||
//
|
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
// This program demonstrates basic SPIR-V module processing using
|
|
||||||
// SPIRV-Tools C++ API:
|
|
||||||
// * Assembling
|
|
||||||
// * Validating
|
|
||||||
// * Optimizing
|
|
||||||
// * Disassembling
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "spirv-tools/libspirv.hpp"
|
|
||||||
#include "spirv-tools/optimizer.hpp"
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
const std::string source =
|
|
||||||
" OpCapability Linkage "
|
|
||||||
" OpCapability Shader "
|
|
||||||
" OpMemoryModel Logical GLSL450 "
|
|
||||||
" OpSource GLSL 450 "
|
|
||||||
" OpDecorate %spec SpecId 1 "
|
|
||||||
" %int = OpTypeInt 32 1 "
|
|
||||||
" %spec = OpSpecConstant %int 0 "
|
|
||||||
"%const = OpConstant %int 42";
|
|
||||||
|
|
||||||
spvtools::SpirvTools core(SPV_ENV_UNIVERSAL_1_3);
|
|
||||||
spvtools::Optimizer opt(SPV_ENV_UNIVERSAL_1_3);
|
|
||||||
|
|
||||||
auto print_msg_to_stderr = [](spv_message_level_t, const char*,
|
|
||||||
const spv_position_t&, const char* m) {
|
|
||||||
std::cerr << "error: " << m << std::endl;
|
|
||||||
};
|
|
||||||
core.SetMessageConsumer(print_msg_to_stderr);
|
|
||||||
opt.SetMessageConsumer(print_msg_to_stderr);
|
|
||||||
|
|
||||||
std::vector<uint32_t> spirv;
|
|
||||||
if (!core.Assemble(source, &spirv)) return 1;
|
|
||||||
if (!core.Validate(spirv)) return 1;
|
|
||||||
|
|
||||||
opt.RegisterPass(spvtools::CreateSetSpecConstantDefaultValuePass({{1, "42"}}))
|
|
||||||
.RegisterPass(spvtools::CreateFreezeSpecConstantValuePass())
|
|
||||||
.RegisterPass(spvtools::CreateUnifyConstantPass())
|
|
||||||
.RegisterPass(spvtools::CreateStripDebugInfoPass());
|
|
||||||
if (!opt.Run(spirv.data(), spirv.size(), &spirv)) return 1;
|
|
||||||
|
|
||||||
std::string disassembly;
|
|
||||||
if (!core.Disassemble(spirv, &disassembly)) return 1;
|
|
||||||
std::cout << disassembly << "\n";
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
versions:
|
|
||||||
"1.4.341.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.313.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.309.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.268.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.261.1":
|
|
||||||
folder: all
|
|
||||||
"1.3.243.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.239.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.236.0":
|
|
||||||
folder: all
|
|
||||||
"1.2.198.0":
|
|
||||||
folder: all
|
|
||||||
@@ -1,10 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"3.53.1":
|
|
||||||
url: "https://sqlite.org/2026/sqlite-amalgamation-3530100.zip"
|
|
||||||
sha256: "36ad6e7f38540a3b21a2ac36340833f0a9e426bc1c752751c3ba669466827eae"
|
|
||||||
"3.51.2":
|
|
||||||
url: "https://sqlite.org/2026/sqlite-amalgamation-3510200.zip"
|
|
||||||
sha256: "6e2a845a493026bdbad0618b2b5a0cf48584faab47384480ed9f592d912f23ec"
|
|
||||||
"3.51.0":
|
"3.51.0":
|
||||||
url: "https://sqlite.org/2025/sqlite-amalgamation-3510000.zip"
|
url: "https://sqlite.org/2025/sqlite-amalgamation-3510000.zip"
|
||||||
sha256: "1caf7116f2910600d04473ad69d37ec538fa62fa36adccd37b5e0e43647c98be"
|
sha256: "1caf7116f2910600d04473ad69d37ec538fa62fa36adccd37b5e0e43647c98be"
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
versions:
|
versions:
|
||||||
"3.53.1":
|
|
||||||
folder: all
|
|
||||||
"3.51.2":
|
|
||||||
folder: all
|
|
||||||
"3.51.0":
|
"3.51.0":
|
||||||
folder: all
|
folder: all
|
||||||
"3.50.4":
|
"3.50.4":
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
sources:
|
|
||||||
"1.4.341.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.341.0.tar.gz"
|
|
||||||
sha256: "d73bc5036b6556b741f6985ff600ca720308c5f2850e4a43ceb498bd3de069e7"
|
|
||||||
"1.4.313.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
|
||||||
sha256: "20743c99a96c07290f24377360e7a12bdd2c465ba202e0c7ef2ec25d446cf61d"
|
|
||||||
"1.4.309.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.4.309.0.tar.gz"
|
|
||||||
sha256: "2bc1b4127950badc80212abf1edfa5c3b5032f3425edf37255863ba7592c1969"
|
|
||||||
"1.3.296.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.296.0.tar.gz"
|
|
||||||
sha256: "1e872a0be3890784bbe68dcd89b7e017fed77ba95820841848718c98bda6dc33"
|
|
||||||
"1.3.290.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.290.0.tar.gz"
|
|
||||||
sha256: "5b186e1492d97c44102fe858fb9f222b55524a8b6da940a8795c9e326ae6d722"
|
|
||||||
"1.3.268.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/vulkan-sdk-1.3.268.0.tar.gz"
|
|
||||||
sha256: "94993cbe2b1a604c0d5d9ea37a767e1aba4d771d2bfd4ddceefd66243095164f"
|
|
||||||
"1.3.261.1":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/sdk-1.3.261.1.tar.gz"
|
|
||||||
sha256: "7a25ebdb6325e626dc5d33bc937b289ccce7ddb7b0ac1a1b1d5d7ff33b6715d3"
|
|
||||||
"1.3.250.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/sdk-1.3.250.0.tar.gz"
|
|
||||||
sha256: "0da601a81b868bc543ec09ab7e514d1b059774993dfce81df7150f432c8bf33a"
|
|
||||||
"1.3.243.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/sdk-1.3.243.0.tar.gz"
|
|
||||||
sha256: "29ddb2ef931f5fb0cabd1a78398f9c4da44d37f8c8a1e110f834f4c260c9d548"
|
|
||||||
"1.3.239.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/sdk-1.3.239.0.tar.gz"
|
|
||||||
sha256: "865fa8e8e8314fcca60777a92f50bd0cf612205a36e719d6975482d3366f619e"
|
|
||||||
"1.2.198.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/sdk-1.2.198.0.tar.gz"
|
|
||||||
sha256: "34782c61cad9b3ccf2fa0a31ec397d4fce99490500b4f3771cb1a48713fece80"
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.files import copy, get
|
|
||||||
from conan.tools.layout import basic_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
required_conan_version = ">=1.50.0"
|
|
||||||
|
|
||||||
|
|
||||||
class VulkanHeadersConan(ConanFile):
|
|
||||||
name = "vulkan-headers"
|
|
||||||
description = "Vulkan Header files."
|
|
||||||
license = "Apache-2.0"
|
|
||||||
topics = ("vulkan-headers", "vulkan")
|
|
||||||
homepage = "https://github.com/KhronosGroup/Vulkan-Headers"
|
|
||||||
url = "https://github.com/conan-io/conan-center-index"
|
|
||||||
package_type = "header-library"
|
|
||||||
package_id_embed_mode = "patch_mode"
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
no_copy_source = True
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
basic_layout(self, src_folder="src")
|
|
||||||
|
|
||||||
def package_id(self):
|
|
||||||
self.info.clear()
|
|
||||||
|
|
||||||
def source(self):
|
|
||||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def package(self):
|
|
||||||
copy(self, "LICENSE*", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
|
||||||
copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include"))
|
|
||||||
copy(self, "*", src=os.path.join(self.source_folder, "registry"), dst=os.path.join(self.package_folder, "res", "vulkan", "registry"))
|
|
||||||
|
|
||||||
def package_info(self):
|
|
||||||
self.cpp_info.set_property("cmake_file_name", "VulkanHeaders")
|
|
||||||
self.cpp_info.components["vulkanheaders"].set_property("cmake_target_name", "Vulkan::Headers")
|
|
||||||
self.cpp_info.components["vulkanheaders"].bindirs = []
|
|
||||||
self.cpp_info.components["vulkanheaders"].libdirs = []
|
|
||||||
self.cpp_info.components["vulkanregistry"].set_property("cmake_target_name", "Vulkan::Registry")
|
|
||||||
self.cpp_info.components["vulkanregistry"].includedirs = [os.path.join("res", "vulkan", "registry")]
|
|
||||||
self.cpp_info.components["vulkanregistry"].bindirs = []
|
|
||||||
self.cpp_info.components["vulkanregistry"].libdirs = []
|
|
||||||
self.cpp_info.components["vulkanregistry"].resdirs = ["res"]
|
|
||||||
|
|
||||||
self.cpp_info.filenames["cmake_find_package"] = "VulkanHeaders"
|
|
||||||
self.cpp_info.filenames["cmake_find_package_multi"] = "VulkanHeaders"
|
|
||||||
self.cpp_info.names["cmake_find_package"] = "Vulkan"
|
|
||||||
self.cpp_info.names["cmake_find_package_multi"] = "Vulkan"
|
|
||||||
self.cpp_info.components["vulkanheaders"].names["cmake_find_package"] = "Headers"
|
|
||||||
self.cpp_info.components["vulkanheaders"].names["cmake_find_package_multi"] = "Headers"
|
|
||||||
self.cpp_info.components["vulkanregistry"].names["cmake_find_package"] = "Registry"
|
|
||||||
self.cpp_info.components["vulkanregistry"].names["cmake_find_package_multi"] = "Registry"
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
|
||||||
project(test_package LANGUAGES C)
|
|
||||||
|
|
||||||
find_package(VulkanHeaders REQUIRED CONFIG)
|
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} test_package.c)
|
|
||||||
target_link_libraries(${PROJECT_NAME} Vulkan::Headers)
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
from conan import ConanFile
|
|
||||||
from conan.tools.build import can_run
|
|
||||||
from conan.tools.cmake import CMake, cmake_layout
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
class TestPackageConan(ConanFile):
|
|
||||||
settings = "os", "arch", "compiler", "build_type"
|
|
||||||
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
|
|
||||||
test_type = "explicit"
|
|
||||||
|
|
||||||
def layout(self):
|
|
||||||
cmake_layout(self)
|
|
||||||
|
|
||||||
def requirements(self):
|
|
||||||
self.requires(self.tested_reference_str)
|
|
||||||
|
|
||||||
def build(self):
|
|
||||||
cmake = CMake(self)
|
|
||||||
cmake.configure()
|
|
||||||
cmake.build()
|
|
||||||
|
|
||||||
def test(self):
|
|
||||||
if can_run(self):
|
|
||||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
|
||||||
self.run(bin_path, env="conanrun")
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#include <vulkan/vulkan.h>
|
|
||||||
|
|
||||||
int main() {
|
|
||||||
VkApplicationInfo appInfo;
|
|
||||||
appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
|
|
||||||
appInfo.pApplicationName = "Hello Conan";
|
|
||||||
appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0);
|
|
||||||
appInfo.pEngineName = "Dummy Engine";
|
|
||||||
appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0);
|
|
||||||
appInfo.apiVersion = VK_API_VERSION_1_0;
|
|
||||||
|
|
||||||
VkInstanceCreateInfo createInfo;
|
|
||||||
createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
|
||||||
createInfo.pApplicationInfo = &appInfo;
|
|
||||||
createInfo.enabledLayerCount = 0;
|
|
||||||
createInfo.ppEnabledLayerNames = NULL;
|
|
||||||
createInfo.enabledExtensionCount = 0;
|
|
||||||
createInfo.ppEnabledExtensionNames = NULL;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
versions:
|
|
||||||
"1.4.341.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.313.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.309.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.296.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.290.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.268.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.261.1":
|
|
||||||
folder: all
|
|
||||||
"1.3.250.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.243.0":
|
|
||||||
folder: all
|
|
||||||
"1.3.239.0":
|
|
||||||
folder: all
|
|
||||||
"1.2.198.0":
|
|
||||||
folder: all
|
|
||||||
@@ -29,7 +29,7 @@ class VulkanMemoryAllocatorConan(ConanFile):
|
|||||||
basic_layout(self, src_folder="src")
|
basic_layout(self, src_folder="src")
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires(f"vulkan-headers/1.4.341.0@{self.user}/{self.channel}")
|
self.requires("vulkan-headers/1.4.313.0")
|
||||||
|
|
||||||
def package_id(self):
|
def package_id(self):
|
||||||
self.info.clear()
|
self.info.clear()
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"1.4.341.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Utility-Libraries/archive/refs/heads/vulkan-sdk-1.4.341.tar.gz"
|
|
||||||
sha256: "a9e0611238558e108f6cc1df6e21ae00c8a935f9a8a0003c88d8de1fc4acec65"
|
|
||||||
"1.4.313.0":
|
"1.4.313.0":
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-Utility-Libraries/archive/refs/heads/vulkan-sdk-1.4.313.tar.gz"
|
url: "https://github.com/KhronosGroup/Vulkan-Utility-Libraries/archive/refs/heads/vulkan-sdk-1.4.313.tar.gz"
|
||||||
sha256: "18c49c694f6b6aec17d9e8c7807a89ac7ad93517c93cb94ceaed3150bd4117ef"
|
sha256: "18c49c694f6b6aec17d9e8c7807a89ac7ad93517c93cb94ceaed3150bd4117ef"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from conan import ConanFile
|
|||||||
from conan.tools.build import check_min_cppstd
|
from conan.tools.build import check_min_cppstd
|
||||||
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
|
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
|
||||||
from conan.tools.files import copy, get, rm, rmdir
|
from conan.tools.files import copy, get, rm, rmdir
|
||||||
from conan.tools.scm import Version
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
@@ -30,9 +29,6 @@ class VulkanUtilityLibraries(ConanFile):
|
|||||||
cmake_layout(self, src_folder="src")
|
cmake_layout(self, src_folder="src")
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
if Version(self.version) >= "1.4.341.0":
|
|
||||||
self.requires(f"vulkan-headers/{self.version}@{self.user}/{self.channel}", transitive_headers=True)
|
|
||||||
else:
|
|
||||||
self.requires(f"vulkan-headers/{self.version}", transitive_headers=True)
|
self.requires(f"vulkan-headers/{self.version}", transitive_headers=True)
|
||||||
|
|
||||||
def validate(self):
|
def validate(self):
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
versions:
|
versions:
|
||||||
"1.4.341.0":
|
|
||||||
folder: all
|
|
||||||
"1.4.313.0":
|
"1.4.313.0":
|
||||||
folder: all
|
folder: all
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
sources:
|
sources:
|
||||||
"1.4.341.0":
|
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/refs/tags/vulkan-sdk-1.4.341.0.tar.gz"
|
|
||||||
sha256: "7f521490495e43561f70fe8b6317fd5cc13d4083413f1abf891f50cbabe12238"
|
|
||||||
"1.4.313.0":
|
"1.4.313.0":
|
||||||
url: "https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
url: "https://github.com/KhronosGroup/Vulkan-ValidationLayers/archive/refs/tags/vulkan-sdk-1.4.313.0.tar.gz"
|
||||||
sha256: "49b8ee6c2352157b12b1c87eb1165bc0f82a885bc2135ad97041ac84f79aacd0"
|
sha256: "49b8ee6c2352157b12b1c87eb1165bc0f82a885bc2135ad97041ac84f79aacd0"
|
||||||
|
|||||||
@@ -101,23 +101,14 @@ class VulkanValidationLayersConan(ConanFile):
|
|||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.requires("robin-hood-hashing/3.11.5")
|
self.requires("robin-hood-hashing/3.11.5")
|
||||||
if Version(conan_version).minor >= "1.4.341":
|
|
||||||
self.requires(f"{self._require("spirv-headers")}@{self.user}/{self.channel}")
|
|
||||||
else:
|
|
||||||
self.requires(self._require("spirv-headers"))
|
self.requires(self._require("spirv-headers"))
|
||||||
if Version(conan_version).minor >= "1.4.313":
|
if Version(conan_version).minor >= "1.4.313":
|
||||||
self.requires(f"{self._require("vulkan-utility-libraries")}@{self.user}/{self.channel}", transitive_headers=True)
|
self.requires(f"{self._require("vulkan-utility-libraries")}@{self.user}/{self.channel}", transitive_headers=True)
|
||||||
if Version(conan_version).major < "2":
|
if Version(conan_version).major < "2":
|
||||||
# TODO: set private=True, once the issue is resolved https://github.com/conan-io/conan/issues/9390
|
# TODO: set private=True, once the issue is resolved https://github.com/conan-io/conan/issues/9390
|
||||||
self.requires(self._require("spirv-tools"), private=not hasattr(self, "settings_build"))
|
self.requires(self._require("spirv-tools"), private=not hasattr(self, "settings_build"))
|
||||||
else:
|
|
||||||
if Version(conan_version).minor >= "1.4.341":
|
|
||||||
self.requires(f"{self._require("spirv-tools")}@{self.user}/{self.channel}")
|
|
||||||
else:
|
else:
|
||||||
self.requires(self._require("spirv-tools"))
|
self.requires(self._require("spirv-tools"))
|
||||||
if Version(conan_version).minor >= "1.4.341":
|
|
||||||
self.requires(f"{self._require("vulkan-headers")}@{self.user}/{self.channel}", transitive_headers=True)
|
|
||||||
else:
|
|
||||||
self.requires(self._require("vulkan-headers"), transitive_headers=True)
|
self.requires(self._require("vulkan-headers"), transitive_headers=True)
|
||||||
if self.options.get_safe("with_wsi_xcb") or self.options.get_safe("with_wsi_xlib"):
|
if self.options.get_safe("with_wsi_xcb") or self.options.get_safe("with_wsi_xlib"):
|
||||||
self.requires("xorg/system")
|
self.requires("xorg/system")
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
spirv-headers: "1.4.341.0"
|
|
||||||
spirv-tools: "1.4.341.0"
|
|
||||||
vulkan-headers: "1.4.341.0"
|
|
||||||
vulkan-utility-libraries: "1.4.341.0"
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
project(test_package LANGUAGES CXX)
|
project(test_package LANGUAGES CXX)
|
||||||
|
|
||||||
find_package(vulkan-validationlayers REQUIRED CONFIG)
|
find_package(vulkan-validationlayers REQUIRED CONFIG)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user