Compare commits

..

No commits in common. "master" and "0.17.0" have entirely different histories.

72 changed files with 190 additions and 172 deletions

View File

@ -8,33 +8,44 @@ jobs:
strategy:
matrix:
include:
- { cxx: g++ }
- { cxx: g++, features: "coverage" }
- { cxx: clang++, features: "nooptlibs" }
- { cxx: clang++, features: "static" }
name: ${{ matrix.cxx }} ${{ matrix.features }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update -qq
apt-get install -yqq --no-install-recommends build-essential clang cmake libsdl2-dev cppcheck doxygen graphviz curl ca-certificates
apt-get install -yqq --no-install-recommends build-essential clang cmake libsdl2-dev cppcheck doxygen graphviz xvfb curl
if [ ${{ !contains(matrix.features, 'nooptlibs') }} = true ]; then
apt-get install -qq --no-install-recommends libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev
fi
if [ ${{ contains(matrix.features, 'coverage') }} = true ]; then
apt-get install -qq --no-install-recommends python3-pip git
pip install --user pyyaml cpp-coveralls
fi
- name: Set up environment
run: |
curl https://raw.githubusercontent.com/AMDmi3/github_env/c8cc83d/github_env.py > e; chmod 755 e
curl --insecure https://raw.githubusercontent.com/AMDmi3/github_env/c8cc83d/github_env.py > e; chmod 755 e
./e 'CXX=${{ matrix.cxx }}'
./e 'CXXFLAGS=-Wall -Wextra -pedantic' # XXX: Add -Werror
./e 'CMAKE_ARGS=-DSDL2PP_ENABLE_LIVE_TESTS=NO' # no ability to run live tests in CI (SDL_InitSubsystem failed: x11 not available with xvfb)
./e --if ${{ matrix.cxx == 'clang++' }} 'CXXFLAGS+=-Wno-self-assign-overloaded' # explicit self-assignment tests
./e 'SDL_AUDIODRIVER=disk'
./e 'SDL_VIDEODRIVER=x11'
./e 'DISPLAY=:99.0'
./e --if ${{ matrix.xxx == 'clang++' }} 'CXXFLAGS+=-Wno-self-assign-overloaded' # explicit self-assignment tests
./e --if ${{ contains(matrix.features, 'coverage') }} 'CXXFLAGS+=--coverage' 'LDFLAGS+=--coverage'
./e --if ${{ contains(matrix.features, 'nooptlibs') }} 'CMAKE_ARGS+=-DSDL2PP_WITH_IMAGE=NO -DSDL2PP_WITH_MIXER=NO -DSDL2PP_WITH_TTF=NO'
./e --if ${{ contains(matrix.features, 'static') }} 'CMAKE_ARGS+=-DSDL2PP_STATIC=YES'
- name: Set up environment for live tests
run: |
/sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 800x600x24 -ac +extension GLX
- name: Configure
run: cmake . -DCMAKE_VERBOSE_MAKEFILE=yes -DCMAKE_INSTALL_PREFIX=/usr ${CMAKE_ARGS}
- name: Build
@ -62,3 +73,9 @@ jobs:
cd $GITHUB_WORKSPACE/exttests/cmake
cmake .
cmake --build .
- name: Upload coverage
if: ${{ contains(matrix.features, 'coverage') }}
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true

View File

@ -1,44 +0,0 @@
name: Doxygen
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:rolling
steps:
- uses: actions/checkout@v4
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update -qq
apt-get install -yqq --no-install-recommends build-essential cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev doxygen graphviz curl ca-certificates git openssh-client
- uses: actions/checkout@v4
with:
repository: libSDL2pp/libSDL2pp.github.io
ssh-key: ${{ secrets.PAGES_SSH_KEY }}
path: doxygen/html
- name: Clean up old docs
run: |
cd doxygen/html
git rm -r .
- name: Configure
run: cmake .
- name: Run doxygen
run: make doxygen
- name: Deploy
run: |
cd doxygen/html
touch .nojekyll
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git add .
if git diff --cached --quiet; then
echo "No changes, skipping commit"
else
git commit -m "Update for ${{ github.repository }} commit ${{ github.sha }} run_id ${{ github.run_id }}"
git push --force
fi

View File

@ -2,14 +2,6 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## 0.18.1 - 2023-04-17
### Fixed
* Fix SDL2main library link order
## 0.18.0 - 2023-03-27
### Changed
* Switch SDL2_{mixer,mixer,ttf} detection to upstream CMake scripts
## 0.17.0 - 2022-04-28
### Changed
* Switch to modern CMake

View File

@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
# meta
project(libSDL2pp LANGUAGES CXX VERSION 0.18.1)
project(libSDL2pp LANGUAGES CXX VERSION 0.17.0)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
@ -26,7 +28,7 @@ set(SDL2_ALL_LIBRARIES SDL2::SDL2)
set(SDL2_ALL_PKGCONFIG_MODULES sdl2)
if(TARGET SDL2::SDL2main)
set(SDL2_ALL_LIBRARIES SDL2::SDL2main ${SDL2_ALL_LIBRARIES})
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2main)
endif()
if(MINGW)
@ -37,7 +39,7 @@ endif()
if(SDL2PP_WITH_IMAGE)
find_package(SDL2_image REQUIRED)
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2_image::SDL2_image)
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_image)
set(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_image")
else()
message(STATUS "SDL2_image support disabled")
@ -45,7 +47,7 @@ endif()
if(SDL2PP_WITH_TTF)
find_package(SDL2_ttf REQUIRED)
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2_ttf::SDL2_ttf)
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_ttf)
set(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_ttf")
else()
message(STATUS "SDL2_ttf support disabled")
@ -53,7 +55,7 @@ endif()
if(SDL2PP_WITH_MIXER)
find_package(SDL2_mixer REQUIRED)
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2_mixer::SDL2_mixer)
set(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_mixer)
set(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_mixer")
else()
message(STATUS "SDL2_mixer support disabled")
@ -241,5 +243,12 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
NAMESPACE SDL2pp::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SDL2pp
)
install(FILES ${PROJECT_BINARY_DIR}/cmake/SDL2ppConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SDL2pp)
install(
FILES
${PROJECT_BINARY_DIR}/cmake/SDL2ppConfig.cmake
cmake/FindSDL2_image.cmake
cmake/FindSDL2_ttf.cmake
cmake/FindSDL2_mixer.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/SDL2pp
)
endif()

View File

@ -1,5 +1,5 @@
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -5,7 +5,7 @@ PROJECT_NAME = "libSDL2pp"
PROJECT_NUMBER = @SDL2PP_VERSION@
# Project description
PROJECT_BRIEF = "C++ bindings/wrapper for SDL2"
PROJECT_BRIEF = "C++11 bindings/wrapper for SDL2"
# Where to place generated files
OUTPUT_DIRECTORY = doxygen
@ -26,9 +26,16 @@ EXCLUDE = "@CMAKE_CURRENT_SOURCE_DIR@/SDL2pp/external"
# Examples (doesn't work atm)
EXAMPLE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/examples"
# Filter through sed to remove badges which Doxygen fails to process properly
INPUT_FILTER = "sed -e '/^\[!\[/d'"
FILTER_PATTERNS = *.md
# README file is the main page
USE_MDFILE_AS_MAINPAGE = "@CMAKE_CURRENT_SOURCE_DIR@/README.md"
# Include timestamp
HTML_TIMESTAMP = YES
# We target web, no latex needed
GENERATE_LATEX = NO

View File

@ -1,4 +1,4 @@
<a href="https://repology.org/project/libsdl2pp/versions">
<a href="https://repology.org/metapackage/libsdl2pp/versions">
<img src="https://repology.org/badge/vertical-allrepos/libsdl2pp.svg" alt="libsdl2pp packaging status" align="right">
</a>
@ -7,7 +7,7 @@
# libSDL2pp
This library provides C++ bindings/wrapper for SDL2 and satellite libraries.
This library provides C++17 bindings/wrapper for SDL2 and satellite libraries.
## Synopsis
@ -72,11 +72,11 @@ try {
SDL_Delay(2000);
// All SDL objects are released at this point or if an error occurs
} catch (const SDL2pp::Exception& e) {
} catch (SDL2pp::Exception& e) {
// Exception stores SDL_GetError() result and name of function which failed
std::cerr << "Error in: " << e.GetSDLFunction() << std::endl;
std::cerr << " Reason: " << e.GetSDLError() << std::endl;
} catch (const std::exception& e) {
} catch (std::exception& e) {
// This also works (e.g. "SDL_Init failed: No available video device")
std::cerr << e.what() << std::endl;
}
@ -147,49 +147,40 @@ Dependencies:
To build standalone version:
```shell
cmake .
cmake --build .
```
cmake . && make
Following variables may be supplied to CMake to affect build:
* `SDL2PP_WITH_IMAGE` - enable SDL_image support (default ON)
* `SDL2PP_WITH_MIXER` - enable SDL_mixer support (default ON)
* `SDL2PP_WITH_TTF` - enable SDL_ttf support (default ON)
* `SDL2PP_WITH_EXAMPLES` - enable building example programs (only for standalone build, default ON)
* `SDL2PP_WITH_TESTS` - enable building tests (only for standalone build, default ON)
* `SDL2PP_STATIC` - build static library instead of shared (only for standalone build, default OFF)
* `SDL2PP_ENABLE_LIVE_TESTS` - enable tests which require X11 and/or audio device to run (only for standalone build, default ON)
* ```SDL2PP_WITH_IMAGE``` - enable SDL_image support (default ON)
* ```SDL2PP_WITH_MIXER``` - enable SDL_mixer support (default ON)
* ```SDL2PP_WITH_TTF``` - enable SDL_ttf support (default ON)
* ```SDL2PP_WITH_EXAMPLES``` - enable building example programs (only for standalone build, default ON)
* ```SDL2PP_WITH_TESTS``` - enable building tests (only for standalone build, default ON)
* ```SDL2PP_STATIC``` - build static library instead of shared (only for standalone build, default OFF)
* ```SDL2PP_ENABLE_LIVE_TESTS``` - enable tests which require X11 and/or audio device to run (only for standalone build, default ON)
## Installation
To install the library system-wide, run:
```shell
cmake .
cmake --build .
cmake --install .
```
cmake . && make && make install
You can change installation prefix with CMAKE_INSTALL_PREFIX cmake
variable:
```shell
cmake -DCMAKE_INSTALL_PREFIX=/usr/local .
cmake --build .
cmake --install .
```
cmake -DCMAKE_INSTALL_PREFIX=/usr/local . && make && make install
SDL2pp installs `pkg-config` file, so it can be used with any build
system that interacts with `pkg-config`, including CMake, meson and
GNU Autotools. It also installs CMake module file, which can be used
SDL2pp installs pkg-config file, so it can be used with any build
system that interacts with pkg-config, including CMake and GNU
Autotools. It also installs CMake module file, which can be used
from CMake directly:
```cmake
find_package(SDL2pp REQUIRED)
FIND_PACKAGE(SDL2PP REQUIRED)
target_link_libraries(mytarget SDL2pp::SDL2pp)
INCLUDE_DIRECTORIES(${SDL2PP_INCLUDE_DIRS})
...
TARGET_LINK_LIBRARIES(... ${SDL2PP_LIBRARIES})
```
## Bundling ##
@ -202,23 +193,27 @@ Just place the library into dedicated directory in your project
(for example, extlib/libSDL2pp) and add
```cmake
set(SDL2PP_WITH_IMAGE ON) # if you need SDL_image support
set(SDL2PP_WITH_MIXER ON) # if you need SDL_mixer support
set(SDL2PP_WITH_TTF ON) # if you need SDL_ttf support
add_subdirectory(extlib/libSDL2pp)
SET(SDL2PP_WITH_IMAGE ON) # if you need SDL_image support
SET(SDL2PP_WITH_MIXER ON) # if you need SDL_mixer support
SET(SDL2PP_WITH_TTF ON) # if you need SDL_ttf support
ADD_SUBDIRECTORY(extlib/libSDL2pp)
```
into your core CMakeLists.txt. This will act similar to how
`find_package` usually does, and will provide `SDL2pp::SDL2pp`
target for your project. You will then be able it as usual:
FIND_PACKAGE usually does, and will provide ${SDL2PP_INCLUDE_DIRS}
and ${SDL2PP_LIBRARIES} variables for your project. You will then
be able to use them as usual:
```cmake
target_link_libraries(mytarget SDL2pp::SDL2pp)
INCLUDE_DIRECTORIES(${SDL2PP_INCLUDE_DIRS})
ADD_EXECUTABLE(mytarget ...)
TARGET_LINK_LIBRARIES(mytarget ${SDL2PP_LIBRARIES})
```
If bundled, libSDL2pp does not build examples and becomes a static
library. See [hoverboard](https://github.com/AMDmi3/hoverboard-sdl/blob/5729f9fb6929f6e8147481f5b21772fc1e35562a/CMakeLists.txt#L34-L40)
project as an example of using both bundled and systemwide SDL2pp.
library, providing required SDL2 includes/libs in the mentioned
variables.
## Completeness
@ -250,8 +245,8 @@ Projects using libSDL2pp:
## WWW
* [GitHub repository](https://github.com/libSDL2pp/libSDL2pp)
* [Doxygen documentation](https://libsdl2pp.github.io/)
* [GitHub page](https://github.com/libSDL2pp/libSDL2pp)
* [Online documentation](https://sdl2pp.amdmi3.ru/)
## Author

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2017 Vraiment <jemc44@gmail.com>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2017 Vraiment <jemc44@gmail.com>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2016,2022 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015-2017 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015-2017 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied
@ -133,7 +133,7 @@ public:
/// works with it), Mem and ConstMem (take memory chunk and work with
/// it like a file) and allow one to write custom RWops.
///
/// SDL2pp::RWops support all this in extended C++ way.
/// SDL2pp::RWops support all this in extended C++11 way.
///
/// Usage example:
/// \code

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2014-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2017 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2017 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -0,0 +1,14 @@
# SDL2::SDL2_image
find_path(SDL2_IMAGE_INCLUDE_DIR NAMES SDL_image.h PATH_SUFFIXES SDL2)
find_library(SDL2_IMAGE_LIBRARY NAMES SDL2_image)
if(SDL2_IMAGE_INCLUDE_DIR AND SDL2_IMAGE_LIBRARY)
add_library(SDL2::SDL2_image UNKNOWN IMPORTED)
set_property(TARGET SDL2::SDL2_image PROPERTY IMPORTED_LOCATION ${SDL2_IMAGE_LIBRARY})
set_target_properties(SDL2::SDL2_image PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${SDL2_IMAGE_INCLUDE_DIR})
message(STATUS "Found SDL2_image: ${SDL2_IMAGE_LIBRARY}")
else()
message(FATAL_ERROR "Could not find SDL2_image")
endif()

View File

@ -0,0 +1,14 @@
# SDL2::SDL2_mixer
find_path(SDL2_MIXER_INCLUDE_DIR NAMES SDL_mixer.h PATH_SUFFIXES SDL2)
find_library(SDL2_MIXER_LIBRARY NAMES SDL2_mixer)
if(SDL2_MIXER_INCLUDE_DIR AND SDL2_MIXER_LIBRARY)
add_library(SDL2::SDL2_mixer UNKNOWN IMPORTED)
set_property(TARGET SDL2::SDL2_mixer PROPERTY IMPORTED_LOCATION ${SDL2_MIXER_LIBRARY})
set_target_properties(SDL2::SDL2_mixer PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${SDL2_MIXER_INCLUDE_DIR})
message(STATUS "Found SDL2_mixer: ${SDL2_MIXER_LIBRARY}")
else()
message(FATAL_ERROR "Could not find SDL2_mixer")
endif()

14
cmake/FindSDL2_ttf.cmake Normal file
View File

@ -0,0 +1,14 @@
# SDL2::SDL2_ttf
find_path(SDL2_TTF_INCLUDE_DIR NAMES SDL_ttf.h PATH_SUFFIXES SDL2)
find_library(SDL2_TTF_LIBRARY NAMES SDL2_ttf)
if(SDL2_TTF_INCLUDE_DIR AND SDL2_TTF_LIBRARY)
add_library(SDL2::SDL2_ttf UNKNOWN IMPORTED)
set_property(TARGET SDL2::SDL2_ttf PROPERTY IMPORTED_LOCATION ${SDL2_TTF_LIBRARY})
set_target_properties(SDL2::SDL2_ttf PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${SDL2_TTF_INCLUDE_DIR})
message(STATUS "Found SDL2_ttf: ${SDL2_TTF_LIBRARY}")
else()
message(FATAL_ERROR "Could not find SDL2_ttf")
endif()

View File

@ -1,15 +1,15 @@
find_package(SDL2 REQUIRED)
if(@SDL2PP_WITH_IMAGE@)
find_package(SDL2_image REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/FindSDL2_image.cmake")
endif()
if(@SDL2PP_WITH_TTF@)
find_package(SDL2_ttf REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/FindSDL2_ttf.cmake")
endif()
if(@SDL2PP_WITH_MIXER@)
find_package(SDL2_mixer REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/FindSDL2_mixer.cmake")
endif()
include("${CMAKE_CURRENT_LIST_DIR}/SDL2ppTargets.cmake")

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2016 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -1,5 +1,5 @@
/*
libSDL2pp - C++ bindings/wrapper for SDL2
libSDL2pp - C++11 bindings/wrapper for SDL2
Copyright (C) 2013-2015 Dmitry Marakasov <amdmi3@amdmi3.ru>
This software is provided 'as-is', without any express or implied

View File

@ -4,7 +4,7 @@ libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: sdl2pp
Description: C++ bindings/wrappers for SDL2
Description: C++11 bindings/wrappers for SDL2
Version: @SDL2PP_VERSION@
Requires: @SDL2_ALL_PKGCONFIG_MODULES@
Conflicts: