-
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.
- Loading branch information
Showing
5 changed files
with
96 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Game files | ||
history | ||
highscore | ||
|
||
# Dependencies | ||
lib | ||
|
||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
shoot-the-aliens | ||
shoot-the-aliens.exe | ||
|
||
# CMake | ||
CMakeLists.txt.user | ||
CMakeCache.txt | ||
CMakeFiles | ||
CMakeScripts | ||
Testing | ||
Makefile | ||
cmake_install.cmake | ||
install_manifest.txt | ||
compile_commands.json | ||
CTestTestfile.cmake | ||
_deps |
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,31 @@ | ||
cmake_minimum_required(VERSION 3.12 FATAL_ERROR) | ||
|
||
# Set project name and version | ||
project(shoot-the-aliens VERSION 0.1.0) | ||
|
||
# Set C++ standard | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) | ||
|
||
if(MSVC) | ||
# Link statically when building on windows to help distribution of the software | ||
set(SFML_STATIC_LIBRARIES TRUE) | ||
# Hide the console window in visual studio projects | ||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") | ||
endif() | ||
|
||
# Find SFML shared libraries | ||
find_package(SFML 2.5.1 COMPONENTS system window graphics audio REQUIRED) | ||
|
||
# Compile executable | ||
add_executable(shoot-the-aliens alien.cpp explosion.cpp fond.cpp gameengine.cpp jeu.cpp joueur.cpp main.cpp soundmanager.cpp tir.cpp vaisseau.cpp) | ||
|
||
# Set include directory search paths | ||
target_include_directories(shoot-the-aliens PRIVATE "${PROJECT_BINARY_DIR}") | ||
|
||
# Link executable to required SFML libraries | ||
target_link_libraries(shoot-the-aliens sfml-audio sfml-graphics sfml-window sfml-system) | ||
|
||
# Install target | ||
install(TARGETS shoot-the-aliens DESTINATION bin) |
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
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