diff --git a/.gitignore b/.gitignore index 46f42f8..28e305a 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..302ee2f --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libs/blah"] + path = libs/blah + url = https://github.com/noelfb/blah diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..af85d46 --- /dev/null +++ b/CMakeLists.txt @@ -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} + $/SDL2.dll) +endif() \ No newline at end of file diff --git a/libs/blah b/libs/blah new file mode 160000 index 0000000..d8930f1 --- /dev/null +++ b/libs/blah @@ -0,0 +1 @@ +Subproject commit d8930f15ac4583206855e03c5f246187072a8526 diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..dbb9c4d --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,18 @@ +#include + +using namespace Blah; + +namespace +{ + +} + +int main() +{ + Config config; + config.width = 1280; + config.height = 720; + config.name = "tiny link"; + + App::run(&config); +} \ No newline at end of file