Add NothinFancy and TestGame

This commit is contained in:
Grayson Riffe 2025-01-23 16:35:50 -06:00
parent af7d19a956
commit 9b6e333652
6 changed files with 40 additions and 0 deletions

View File

@ -2,3 +2,7 @@
cmake_minimum_required(VERSION 3.20)
project(nf)
add_subdirectory(NothinFancy)
add_subdirectory(TestGame)

View File

@ -0,0 +1,5 @@
# NF library CMakeLists.txt
add_library(NothinFancy STATIC "src/Engine.cpp" "src/include/nf.h")
# Use C++20
set_property(TARGET NothinFancy PROPERTY CXX_STANDARD 20)

View File

@ -0,0 +1,9 @@
// NF startup
#include <iostream>
namespace nf {
void test() {
std::cout << "NothinFancy\n";
std::cin.get();
}
}

View File

@ -0,0 +1,6 @@
// NF main public header
#pragma once
namespace nf {
void test();
}

9
TestGame/CMakeLists.txt Normal file
View File

@ -0,0 +1,9 @@
# TestGame app CMakeLists.txt
add_executable(TestGame "src/TestGame.cpp")
# Use C++20
set_property(TARGET TestGame PROPERTY CXX_STANDARD 20)
# Link to NF library
target_link_libraries(TestGame NothinFancy)
target_include_directories(TestGame PUBLIC "${CMAKE_SOURCE_DIR}/NothinFancy/src/include")

View File

@ -0,0 +1,7 @@
// TestGame main file
#include "nf.h"
int main(int argc, char* argv[]) {
nf::test();
return 0;
}