11/* runcpp2
22
3- # (Optional) The list of dependencies needed by the script
4- Dependencies:
5- # Dependency name
6- - Name: SDL2
7-
8- # Supported platforms of the dependency
9- Platforms: [Unix]
10-
11- # The source of getting the dependency
12- Source:
13- Type: Local
14- Value: "./dummy"
15-
16- # Library Type (Static, Object, Shared, Header)
17- LibraryType: Shared
18-
19- # (Optional if LibraryType is Header) Link properties of the dependency
20- LinkProperties:
21- # Properties for searching the library binary for the profile
3+ OverrideLinkFlags:
4+ All:
225 "g++":
23- # The library names to be searched for when linking against the script
24- SearchLibraryNames: []
25-
26- # (Optional) The library names to be excluded from being searched
27- ExcludeLibraryNames: []
28-
29- # The path (relative to the dependency folder) to be searched for the dependency binaries
30- SearchDirectories: []
31-
32- # (Optional) Additional link options for this dependency
33- AdditionalLinkOptions:
34- # Applies to all platforms (Can be changed to Linux, MacOS, Windows, Unix, etc.)
35- Unix: ["-lSDL2"]
6+ Remove: ""
7+ Append: "-lSDL2"
8+
369*/
3710
3811
@@ -48,20 +21,19 @@ int main(int arc, char ** argv)
4821
4922 SDL_Window* window = nullptr ;
5023
51- if (SDL_Init ( SDL_INIT_VIDEO ) < 0 ) {
24+ if (SDL_Init ( SDL_INIT_VIDEO ) < 0 )
5225 std::cout << " SDL could not initialize! SDL_Error: " << SDL_GetError () << std::endl;
53- } else {
54-
55- window = SDL_CreateWindow (
56- " SDL2 Demo " ,
57- SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
58- SCREEN_WIDTH, SCREEN_HEIGHT,
59- SDL_WINDOW_SHOWN
60- );
26+ else
27+ {
28+ window = SDL_CreateWindow ( " SDL2 Demo " ,
29+ SDL_WINDOWPOS_CENTERED,
30+ SDL_WINDOWPOS_CENTERED,
31+ SCREEN_WIDTH,
32+ SCREEN_HEIGHT,
33+ SDL_WINDOW_SHOWN );
6134 }
6235
6336 bool quit = false ;
64-
6537 SDL_Event e;
6638
6739 while (!quit)
@@ -74,8 +46,6 @@ int main(int arc, char ** argv)
7446 }
7547
7648 SDL_DestroyWindow (window);
77-
7849 SDL_Quit ();
79-
8050 return 0 ;
8151}
0 commit comments