diff --git a/.github/workflows/conan-pkg.yml b/.github/workflows/conan-pkg.yml index f1d69f1..cdd8083 100644 --- a/.github/workflows/conan-pkg.yml +++ b/.github/workflows/conan-pkg.yml @@ -50,14 +50,6 @@ jobs: if: startsWith(matrix.config.os, 'ubuntu') run: conan profile update settings.compiler.libcxx=libstdc++11 default - - name: Install DX9 SDK - if: startsWith(matrix.config.os, 'windows') - shell: cmake -P {0} - run: | - file(MAKE_DIRECTORY $ENV{DXSDK_DIR}) - file(DOWNLOAD https://cdn.anotherfoxguy.com/DirectX-SDK.zip "$ENV{TMP}/DirectX.zip" SHOW_PROGRESS) - execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf "$ENV{TMP}/DirectX.zip" WORKING_DIRECTORY "$ENV{DXSDK_DIR}") - - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.10.0 diff --git a/ogre/1.11/conanfile.py b/ogre/1.11/conanfile.py index 89c19bb..34ce0ff 100644 --- a/ogre/1.11/conanfile.py +++ b/ogre/1.11/conanfile.py @@ -15,6 +15,9 @@ class OGREConan(ConanFile): for req in self.conan_data["requirements"]: self.requires(req) + if os_info.is_windows: + self.requires("directx-sdk/9.0@anotherfoxguy/stable") + def system_requirements(self): if os_info.is_linux: if os_info.with_apt: @@ -28,6 +31,11 @@ class OGREConan(ConanFile): def source(self): tools.get(**self.conan_data["sources"][self.version], strip_root=True) + tools.replace_in_file( + "CMake/Dependencies.cmake", + "find_package(DirectX)", + "find_package(DirectX9)", + ) for patch in self.conan_data["patches"][self.version]: tools.patch(**patch) diff --git a/ogre/1.12/conanfile.py b/ogre/1.12/conanfile.py index c5befba..1ec0d9d 100644 --- a/ogre/1.12/conanfile.py +++ b/ogre/1.12/conanfile.py @@ -21,6 +21,9 @@ class OGREConan(ConanFile): for req in self.conan_data["requirements"]: self.requires(req) + if os_info.is_windows: + self.requires("directx-sdk/9.0@anotherfoxguy/stable") + def system_requirements(self): if os_info.is_linux: if os_info.with_apt: @@ -30,6 +33,11 @@ class OGREConan(ConanFile): def source(self): tools.get(**self.conan_data["sources"][self.version], strip_root=True) + tools.replace_in_file( + "CMake/Dependencies.cmake", + "find_package(DirectX)", + "find_package(DirectX9)", + ) for patch in self.conan_data["patches"][self.version]: tools.patch(**patch)