sdl updated to version 3.2.24
This commit is contained in:
parent
8511cae7ab
commit
79d768e8f6
16 changed files with 1037 additions and 3 deletions
13
conan/sdl3/all/test_package/CMakeLists.txt
Normal file
13
conan/sdl3/all/test_package/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
project(test_package)
|
||||
|
||||
find_package(SDL2 REQUIRED CONFIG)
|
||||
|
||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} SDL2::SDL2main)
|
||||
if(TARGET SDL2::SDL2-static)
|
||||
target_link_libraries(${PROJECT_NAME} SDL2::SDL2-static)
|
||||
else()
|
||||
target_link_libraries(${PROJECT_NAME} SDL2::SDL2)
|
||||
endif()
|
||||
|
||||
31
conan/sdl3/all/test_package/conanfile.py
Normal file
31
conan/sdl3/all/test_package/conanfile.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
from conan import ConanFile
|
||||
from conan.tools.build import can_run
|
||||
from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain
|
||||
import os
|
||||
|
||||
|
||||
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):
|
||||
tc = CMakeToolchain(self)
|
||||
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.bindir, "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
||||
9
conan/sdl3/all/test_package/test_package.cpp
Normal file
9
conan/sdl3/all/test_package/test_package.cpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#include <SDL.h>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char* args[]) {
|
||||
SDL_version v;
|
||||
SDL_GetVersion(&v);
|
||||
std::cout << "SDL version " << int(v.major) << "." << int(v.minor) << "." << int(v.patch) << std::endl;
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue