nix: set CMake version to 3.30.4
This commit is contained in:
parent
a42efe2c82
commit
1b49477c4e
6 changed files with 36 additions and 15 deletions
4
game/CMakeLists.txt
Normal file
4
game/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
cmake_minimum_required(VERSION 3.28)
|
||||
|
||||
add_library(game)
|
||||
target_sources(game PUBLIC FILE_SET CXX_MODULES FILES src/game.cxx)
|
||||
22
game/src/game.cxx
Normal file
22
game/src/game.cxx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
// Global module fragment, where #includes can happen
|
||||
module;
|
||||
|
||||
import std;
|
||||
|
||||
export module game;
|
||||
|
||||
export class lib
|
||||
{
|
||||
public:
|
||||
lib();
|
||||
~lib();
|
||||
void helloworld();
|
||||
};
|
||||
|
||||
lib::lib() = default;
|
||||
lib::~lib() = default;
|
||||
|
||||
void lib::helloworld()
|
||||
{
|
||||
std::print("Hello world!\n");
|
||||
}
|
||||
Reference in a new issue