Add NothinFancy and TestGame
This commit is contained in:
parent
af7d19a956
commit
9b6e333652
@ -2,3 +2,7 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
project(nf)
|
||||
|
||||
add_subdirectory(NothinFancy)
|
||||
|
||||
add_subdirectory(TestGame)
|
||||
|
5
NothinFancy/CMakeLists.txt
Normal file
5
NothinFancy/CMakeLists.txt
Normal 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)
|
9
NothinFancy/src/Engine.cpp
Normal file
9
NothinFancy/src/Engine.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
// NF startup
|
||||
#include <iostream>
|
||||
|
||||
namespace nf {
|
||||
void test() {
|
||||
std::cout << "NothinFancy\n";
|
||||
std::cin.get();
|
||||
}
|
||||
}
|
6
NothinFancy/src/include/nf.h
Normal file
6
NothinFancy/src/include/nf.h
Normal file
@ -0,0 +1,6 @@
|
||||
// NF main public header
|
||||
#pragma once
|
||||
|
||||
namespace nf {
|
||||
void test();
|
||||
}
|
9
TestGame/CMakeLists.txt
Normal file
9
TestGame/CMakeLists.txt
Normal 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")
|
7
TestGame/src/TestGame.cpp
Normal file
7
TestGame/src/TestGame.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
// TestGame main file
|
||||
#include "nf.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
nf::test();
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user