forked from ruslo/hunter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-added changes to fix git history.
- Loading branch information
1 parent
b4b922f
commit 8b058bd
Showing
4 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |