initial project setup
This commit is contained in:
commit
6be9e2af46
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
cmake-build-*/
|
||||
build/
|
||||
.idea/
|
||||
.vs/
|
20
CMakeLists.txt
Normal file
20
CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(library)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
file(GLOB_RECURSE SOURCES src/*.cpp)
|
||||
file(GLOB_RECURSE HEADERS src/*.h)
|
||||
include_directories(src)
|
||||
add_library(library ${SOURCES} ${HEADERS})
|
||||
|
||||
file(COPY "${CMAKE_SOURCE_DIR}/src/"
|
||||
DESTINATION "${CMAKE_SOURCE_DIR}/build/include"
|
||||
FILES_MATCHING
|
||||
PATTERN *.h
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_BINARY_DIR}/"
|
||||
DESTINATION "${CMAKE_SOURCE_DIR}/build/lib"
|
||||
FILES_MATCHING
|
||||
PATTERN *.a
|
||||
)
|
9
src/add.cpp
Normal file
9
src/add.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
//
|
||||
// Copyright (c) 2019 Julian Hinxlage. All rights reserved.
|
||||
//
|
||||
|
||||
#include "add.h"
|
||||
|
||||
int add(int a, int b){
|
||||
return a + b;
|
||||
}
|
Loading…
Reference in New Issue
Block a user