Compare commits

...

2 Commits

Author SHA1 Message Date
Mike Nolan de1dc0dfe6 First commit 2023-09-02 13:21:00 -05:00
Mike Nolan e499f16ef7 First commit 2023-09-02 13:20:23 -05:00
5 changed files with 18 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)

View File

@ -0,0 +1,2 @@
# cmake library template
## Please edit CMakeLists.txt

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;
}