C++ Header Library
This is a console application that has a single header library dependency.
library/recipe.sml
The Recipe file that defines the header library "Samples.Cpp.HeaderLibrary.Library".
Name: 'Samples.Cpp.HeaderLibrary.Library'
Language: 'C++|0'
Version: 1.0.0
PublicHeaders: [
{
Root: './'
Files: [
'Library.h'
]
}
]
library/library.h
The header file.
#include <string>
namespace Samples::Cpp::HeaderLibrary::Library
{
class Helper
{
public:
static std::string GetName()
{
return "Soup";
}
};
}
application/recipe.sml
The Recipe file that defines the executable "Samples.Cpp.HeaderLibrary.Application".
Name: 'Samples.Cpp.HeaderLibrary.Application'
Language: 'C++|0'
Type: 'Executable'
Version: 1.0.0
Dependencies: {
Runtime: [
'../library/'
]
}
application/package-lock.sml
The package lock that was generated to capture the unique dependencies required to build this project and the dynamic library dependency.
application/main.cpp
A simple main method that prints our "Hello World, Soup Style!" by using the header from the library.
#include <iostream>
#include <library.h>
using namespace Samples::Cpp::HeaderLibrary::Library;
int main()
{
std::cout << "Hello World, " << Helper::GetName() << " Style!" << std::endl;
return 0;
}
.gitignore
A simple git ignore file to exclude all Soup build output.