Skip to content

Commit

Permalink
Re-added changes to fix git history.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberunner23 committed Jun 20, 2016
1 parent b4b922f commit 8b058bd
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/configs/default.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ hunter_config(QtAndroidCMake VERSION 1.0.6)
hunter_config(QtCMakeExtra VERSION 1.0.17)
hunter_config(QtQmlManager VERSION 1.0.0)
hunter_config(RapidJSON VERSION 0.11-hunter)
hunter_config(SDL2 VERSION 2.0.4-p1)
hunter_config(SQLite3 VERSION autoconf-3080803) #R-Tree enabled
hunter_config(Sober VERSION 0.1.3)
hunter_config(Sugar VERSION 1.2.2)
Expand Down
22 changes: 22 additions & 0 deletions cmake/projects/SDL2/hunter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# !!! DO NOT PLACE HEADER GUARDS HERE !!!

# Load used modules
include(hunter_add_version)
include(hunter_download)
include(hunter_pick_scheme)
include(hunter_cacheable)

hunter_add_version(
PACKAGE_NAME
SDL2
VERSION
"2.0.4-p1"
URL
"https://github.com/hunter-packages/SDL2/archive/2.0.4-p1.tar.gz"
SHA1
daebe20807e166f62f3671f742e81e8d2959388b
)

hunter_pick_scheme(DEFAULT url_sha1_cmake)
hunter_cacheable(SDL2)
hunter_download(PACKAGE_NAME SDL2)
15 changes: 15 additions & 0 deletions examples/SDL2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required (VERSION 3.0)

# Emulate HunterGate:
# * https://github.com/hunter-packages/gate
include("../common.cmake")

project(SDL2-test)

hunter_add_package(SDL2)
find_package(SDL2 CONFIG REQUIRED)

add_executable(main main.cpp)
target_link_libraries(main
SDL2::SDL2main
SDL2::SDL2-static)
15 changes: 15 additions & 0 deletions examples/SDL2/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include<iostream>
#include<SDL2/SDL.h>

int main(int argc, char **argv){

if (SDL_Init(SDL_INIT_TIMER) != 0){
std::cout << "Error while initializing SDL: " << SDL_GetError() << std::endl;
SDL_Quit();
return -1;
}

SDL_Quit();

return 0;
}

0 comments on commit 8b058bd

Please sign in to comment.