-
Notifications
You must be signed in to change notification settings - Fork 2k
diligent-core: migrate to Conan v2 #23347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
conan-center-bot
merged 9 commits into
conan-io:master
from
MikeLankamp:migrate/diligent-core
Jun 15, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
bd3e36a
diligent-core: migrate to Conan v2
MikeLankamp 2f28e68
fix: fix linter issues
MikeLankamp cdf7378
fix: resolve wayland dependency conflict
MikeLankamp ab5b43d
fix: fix build errors with fPIC and shared options
MikeLankamp f6f2369
Merge branch 'master' into migrate/diligent-core
MikeLankamp b478306
Merge branch 'master' into migrate/diligent-core
MikeLankamp 3d8fffb
Merge branch 'master' into migrate/diligent-core
MikeLankamp c39eb34
Merge branch 'master' into migrate/diligent-core
MikeLankamp 8754d20
fix: remove unnecessary test_v1_package
MikeLankamp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
find_package(SPIRV-Tools REQUIRED CONFIG) | ||
find_package(spirv-cross REQUIRED CONFIG) | ||
find_package(volk REQUIRED CONFIG) | ||
find_package(xxHash REQUIRED CONFIG) | ||
|
||
if (NOT ${DILIGENT_NO_GLSLANG}) | ||
find_package(glslang REQUIRED CONFIG) | ||
add_library(glslang INTERFACE) | ||
target_link_libraries(glslang INTERFACE glslang::glslang) | ||
target_include_directories(glslang INTERFACE ${glslang_INCLUDE_DIR}/glslang) | ||
add_library(SPIRV ALIAS glslang::SPIRV) | ||
endif() | ||
|
||
add_library(SPIRV-Headers ALIAS SPIRV-Headers::SPIRV-Headers) | ||
add_library(spirv-tools-core ALIAS spirv-tools::spirv-tools) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup() | ||
find_package(diligent-core REQUIRED CONFIG) | ||
|
||
if(WIN32) | ||
set(FILE2STRING_PATH "${CONAN_BIN_DIRS_DILIGENT-CORE}/File2String.exe") | ||
else() | ||
set(FILE2STRING_PATH "${CONAN_BIN_DIRS_DILIGENT-CORE}/File2String") | ||
endif() | ||
|
||
set(FILE "${CONAN_RES_DIRS_DILIGENT}/HLSLDefinitions.fxh") | ||
set(FILE "${core_INCLUDE_DIR}/../res/HLSLDefinitions.fxh") | ||
set(CONVERTED_FILE "${PROJECT_BINARY_DIR}/HLSLDefinitions.h") | ||
|
||
add_custom_command(OUTPUT ${CONVERTED_FILE} | ||
COMMAND ${FILE2STRING_PATH} ${FILE} ${CONVERTED_FILE} | ||
COMMAND File2String ${FILE} ${CONVERTED_FILE} | ||
MAIN_DEPENDENCY ${FILE} # the primary input source file to the command | ||
COMMENT "Processing shader ${FILE}" | ||
VERBATIM) | ||
|
||
add_executable(${PROJECT_NAME} test_package.cpp) | ||
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) | ||
target_link_libraries(${PROJECT_NAME} diligent-core::diligent-core) | ||
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
from conans import ConanFile, CMake, tools | ||
from conan import ConanFile | ||
from conan.tools.build import can_run | ||
from conan.tools.cmake import CMake, cmake_layout | ||
import os | ||
from conan.tools.build import cross_building | ||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake" | ||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" | ||
|
||
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 not cross_building(self): | ||
bin_path = os.path.join("bin", "test_package") | ||
self.run(bin_path, run_environment=True) | ||
if can_run(self): | ||
bin_path = os.path.join(self.cpp.build.bindir, "test_package") | ||
self.run(bin_path, env="conanrun") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.