first commit

This commit is contained in:
Noel Berry 2021-01-01 17:43:43 -08:00
parent 08a54973a2
commit 04557c8ca2
5 changed files with 53 additions and 11 deletions

15
.gitignore vendored
View File

@ -1,11 +1,4 @@
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
.vs
.vscode
out
CMakeSettings.json

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "libs/blah"]
path = libs/blah
url = https://github.com/noelfb/blah

27
CMakeLists.txt Normal file
View File

@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.6)
project(TinyLink)
# C++ version
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#include blah
add_subdirectory(libs/blah)
# add our source
add_executable(game
src/main.cpp
)
# Reference blah
target_link_libraries(game blah)
# copy SDL2 to the build directory
set(SDL2_DLL "" CACHE FILEPATH "SDL2 DLL Path")
if (SDL2_ENABLED)
add_custom_command(
TARGET game POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${SDL2_DLL}
$<TARGET_FILE_DIR:game>/SDL2.dll)
endif()

1
libs/blah Submodule

@ -0,0 +1 @@
Subproject commit d8930f15ac4583206855e03c5f246187072a8526

18
src/main.cpp Normal file
View File

@ -0,0 +1,18 @@
#include <blah.h>
using namespace Blah;
namespace
{
}
int main()
{
Config config;
config.width = 1280;
config.height = 720;
config.name = "tiny link";
App::run(&config);
}