🎉 meson c++ project.
parent
1ceb7db908
commit
e16b406e6e
|
@ -1,34 +1,4 @@
|
||||||
# ---> C++
|
build
|
||||||
# Prerequisites
|
.cache
|
||||||
*.d
|
*~*
|
||||||
|
*\#*
|
||||||
# Compiled Object files
|
|
||||||
*.slo
|
|
||||||
*.lo
|
|
||||||
*.o
|
|
||||||
*.obj
|
|
||||||
|
|
||||||
# Precompiled Headers
|
|
||||||
*.gch
|
|
||||||
*.pch
|
|
||||||
|
|
||||||
# Compiled Dynamic libraries
|
|
||||||
*.so
|
|
||||||
*.dylib
|
|
||||||
*.dll
|
|
||||||
|
|
||||||
# Fortran module files
|
|
||||||
*.mod
|
|
||||||
*.smod
|
|
||||||
|
|
||||||
# Compiled Static libraries
|
|
||||||
*.lai
|
|
||||||
*.la
|
|
||||||
*.a
|
|
||||||
*.lib
|
|
||||||
|
|
||||||
# Executables
|
|
||||||
*.exe
|
|
||||||
*.out
|
|
||||||
*.app
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
.PHONY: build
|
||||||
|
|
||||||
|
build:
|
||||||
|
meson setup build
|
||||||
|
meson compile -C build
|
||||||
|
|
||||||
|
install: build
|
||||||
|
meson install -C build
|
|
@ -0,0 +1,27 @@
|
||||||
|
project('mornelune',
|
||||||
|
'cpp',
|
||||||
|
version: '0.0.0',
|
||||||
|
default_options: [
|
||||||
|
'prefix=/usr',
|
||||||
|
'warning_level=3',
|
||||||
|
'cpp_stdd=c++17'
|
||||||
|
])
|
||||||
|
|
||||||
|
conf = configuration_data()
|
||||||
|
conf.set('version', meson.project_version())
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
input: 'src/conf.in.hpp',
|
||||||
|
output: 'conf.hpp',
|
||||||
|
configuration: conf
|
||||||
|
)
|
||||||
|
|
||||||
|
executable(
|
||||||
|
'mornelune',
|
||||||
|
sources: [
|
||||||
|
'src/main.cpp',
|
||||||
|
],
|
||||||
|
dependencies: [
|
||||||
|
],
|
||||||
|
install: true
|
||||||
|
)
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef ml_CONF_HPP
|
||||||
|
#define ml_CONF_HPP
|
||||||
|
|
||||||
|
#define ML_VERSION std::string("@version@")
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include <iostream>
|
||||||
|
#include "conf.hpp"
|
||||||
|
|
||||||
|
int main(int, char**)
|
||||||
|
{
|
||||||
|
std::cout << "Mornelune v" << ML_VERSION << std::endl;
|
||||||
|
return 0;
|
||||||
|
}
|
Reference in New Issue