First commit

This commit is contained in:
Mike Nolan 2023-09-02 13:21:00 -05:00
parent e499f16ef7
commit de1dc0dfe6
4 changed files with 16 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build

7
CMakeLists.txt Normal file
View File

@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.10)
project(MyNewLibrary VERSION 1.0
DESCRIPTION "CHOOSE YOUR DESCRIPTION")
#add_subdirectory(project2)
add_library(${PROJECT_NAME} src/add.c)
target_include_directories(${PROJECT_NAME} PUBLIC include)
#target_link_libraries(${PROJECT_NAME} PUBLIC yourlibrary)

3
include/add.h Normal file
View File

@ -0,0 +1,3 @@
#pragma once
int add(int a,int b);

5
src/add.c Normal file
View File

@ -0,0 +1,5 @@
#include <add.h>
int add(int a,int b)
{
return a + b;
}