Initial Video, Render, and Properties implementations.
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
+15
-17
@@ -1,24 +1,16 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(hdk-sdl
|
||||
VERSION 0.0.0
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
project(hdk-sdl
|
||||
VERSION 0.0.1
|
||||
LANGUAGES CXX
|
||||
DESCRIPTION "header only shared_ptr wrappers around SDL3 structs and functions"
|
||||
)
|
||||
# hdk-sdl OPTIONS
|
||||
option(HDK_SDL_BUILD_TESTS "Build hdk-sdl tests" OFF)
|
||||
# TODO: Unit testing
|
||||
if(HDK_SDL_BUILD_TESTS)
|
||||
message(WARNING "hdk-sdl tests are not implemented yet.")
|
||||
endif()
|
||||
option(HDK_SDL_BUILD_EXAMPLES "Build hdk-sdl examples" OFF)
|
||||
option(HDK_SDL_BUILD_TESTS "Build hdk-sdl tests" ${HDK_BUILD_TESTS})
|
||||
option(HDK_SDL_BUILD_EXAMPLES "Build hdk-sdl examples" ${HDK_BUILD_EXAMPLES})
|
||||
if(HDK_SDL_BUILD_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif()
|
||||
option(HDK_SDL_BUILD_COVERAGE "Build hdk-sdl with coverage reporting enabled" OFF)
|
||||
if(HDK_SDL_BUILD_COVERAGE)
|
||||
message(WARNING "hdk-sdl coverage testing is not implemented yet.")
|
||||
endif()
|
||||
# TODO: Coverage testing
|
||||
|
||||
# FOR SDL Building
|
||||
set(SDL_TEST OFF CACHE BOOL "Disable SDL tests" FORCE)
|
||||
@@ -28,11 +20,17 @@ set(SDL_INSTALL OFF CACHE BOOL "Disable SDL install" FORCE)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
SDL3
|
||||
GIT_REPOSITORY http://github.com/libsdl-org/SDL.git
|
||||
GIT_TAG release-3.4.0
|
||||
GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
|
||||
GIT_TAG release-3.4.4
|
||||
)
|
||||
FetchContent_MakeAvailable(SDL3)
|
||||
|
||||
add_library(hdk-sdl INTERFACE)
|
||||
target_link_libraries(hdk-sdl INTERFACE SDL3::SDL3 hdk-grid)
|
||||
target_include_directories(hdk-sdl INTERFACE ${SDL3_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
target_compile_features(hdk-sdl INTERFACE cxx_std_17)
|
||||
|
||||
if(HDK_SDL_BUILD_TESTS)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user