diff --git a/recipes/diligent-core/all/conanfile.py b/recipes/diligent-core/all/conanfile.py index 7cea307df0b5e..994e880ad37e3 100644 --- a/recipes/diligent-core/all/conanfile.py +++ b/recipes/diligent-core/all/conanfile.py @@ -153,6 +153,10 @@ def package(self): self.copy(pattern="*.dylib", dst="lib", keep_path=False) self.copy(pattern="*.so", dst="lib", keep_path=False) self.copy(pattern="*.dll", dst="bin", keep_path=False) + self.copy(pattern="*.fxh", dst="res", keep_path=False) + + self.copy("File2String*", src=os.path.join(self._build_subfolder, "bin"), dst="bin", keep_path=False) + tools.remove_files_by_mask(self.package_folder, "*.pdb") def package_info(self): self.cpp_info.libs = tools.collect_libs(self) diff --git a/recipes/diligent-core/all/test_package/CMakeLists.txt b/recipes/diligent-core/all/test_package/CMakeLists.txt index 6c1d84c7e3d82..927e85d16c3ed 100644 --- a/recipes/diligent-core/all/test_package/CMakeLists.txt +++ b/recipes/diligent-core/all/test_package/CMakeLists.txt @@ -4,6 +4,21 @@ project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup() +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(CONVERTED_FILE "${PROJECT_BINARY_DIR}/HLSLDefinitions.h") + +add_custom_command(OUTPUT ${CONVERTED_FILE} + COMMAND ${FILE2STRING_PATH} ${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}) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17)