🎉 meson cpp project.
parent
8f2e087250
commit
5fec2c0045
|
@ -0,0 +1,4 @@
|
|||
*~*
|
||||
*\#*
|
||||
build
|
||||
.cache
|
|
@ -0,0 +1,14 @@
|
|||
.PHONY: build
|
||||
|
||||
build:
|
||||
meson setup build
|
||||
meson compile -C build
|
||||
|
||||
install: build
|
||||
meson install -C build
|
||||
|
||||
check:
|
||||
@cppcheck --language=c++ --enable=all -q \
|
||||
--suppress=missingInclude \
|
||||
--suppress=missingIncludeSystem \
|
||||
src
|
|
@ -0,0 +1,26 @@
|
|||
project('duck2d',
|
||||
'cpp',
|
||||
version: '0.0.0',
|
||||
default_options: [
|
||||
'prefix=/usr',
|
||||
'warning_level=3',
|
||||
'cpp_std=c++17',
|
||||
])
|
||||
|
||||
conf = configuration_data()
|
||||
conf.set('version', meson.project_version())
|
||||
|
||||
|
||||
configure_file(
|
||||
input: 'src/conf.in.hpp',
|
||||
output: 'conf.hpp',
|
||||
configuration: conf
|
||||
)
|
||||
|
||||
executable('d2d',
|
||||
sources: [
|
||||
'src/main.cpp',
|
||||
],
|
||||
dependencies: [
|
||||
],
|
||||
install: true)
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef d2_CONF_HPP
|
||||
#define d2_CONF_HPP
|
||||
|
||||
#define DUCK_VERSION std::string("@version@")
|
||||
|
||||
#endif
|
|
@ -0,0 +1,8 @@
|
|||
#include <iostream>
|
||||
#include "conf.hpp"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
std::cout << "Duck2D " << DUCK_VERSION << std::endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue