mirror of
https://github.com/supleed2/svd2cpp.git
synced 2024-12-22 13:45:50 +00:00
Added CMakeLists
This commit is contained in:
parent
0e3317d397
commit
341e63ef2d
15
CMakeLists.txt
Normal file
15
CMakeLists.txt
Normal file
|
@ -0,0 +1,15 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
project(svd2cpp)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
include_directories(Src)
|
||||
include_directories(cxxopts/include)
|
||||
include_directories(tinyxml2)
|
||||
|
||||
add_library(ClassBuilder Src/ClassBuilder.cpp)
|
||||
add_library(XmlParser Src/XmlParser.cpp)
|
||||
add_library(tinyxml2 tinyxml2/tinyxml2.cpp)
|
||||
|
||||
add_executable(svd2cpp Src/main.cpp)
|
||||
target_link_libraries(svd2cpp ClassBuilder XmlParser tinyxml2)
|
25
Makefile
25
Makefile
|
@ -1,25 +0,0 @@
|
|||
OBJS = Build/main.o Build/XmlParser.o tinyxml2/libtinyxml2.a
|
||||
SOURCE = Src/main.cpp tinyxml2/tinyxml2.cpp
|
||||
INCLUDE = -I tinyxml2 -I cxxopts/include -I Src
|
||||
OUT = svd2cpp
|
||||
CC = g++
|
||||
FLAGS = -g -c -Wall -std=c++17
|
||||
|
||||
all: $(OBJS)
|
||||
$(CC) -g $(OBJS) -o $(OUT) $(LFLAGS)
|
||||
|
||||
Build/main.o: Src/main.cpp
|
||||
mkdir -p Build
|
||||
$(CC) $(FLAGS) Src/main.cpp $(INCLUDE) -o Build/main.o
|
||||
|
||||
Build/XmlParser.o: Src/XmlParser.cpp
|
||||
mkdir -p Build
|
||||
$(CC) $(FLAGS) Src/XmlParser.cpp $(INCLUDE) -o Build/XmlParser.o
|
||||
|
||||
tinyxml2/libtinyxml2.a:
|
||||
$(MAKE) -C tinyxml2/ staticlib
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(OUT)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#include <ClassPrinter.hpp>
|
||||
#include <ClassBuilder.hpp>
|
||||
|
||||
ClassPrinter::ClassPrinter(const cxxopts::ParseResult& results,
|
||||
ClassBuilder::ClassBuilder(const cxxopts::ParseResult& results,
|
||||
const DeviceInfo& deviceInfo,
|
||||
const std::vector<Peripheral>& peripherals) :
|
||||
results(results),
|
|
@ -6,9 +6,9 @@
|
|||
#include <Peripheral.hpp>
|
||||
#include <vector>
|
||||
|
||||
struct ClassPrinter
|
||||
struct ClassBuilder
|
||||
{
|
||||
ClassPrinter(const cxxopts::ParseResult& results,
|
||||
ClassBuilder(const cxxopts::ParseResult& results,
|
||||
const DeviceInfo& deviceInfo,
|
||||
const std::vector<Peripheral>& peripherals);
|
||||
|
11
Src/ItemPrinter.hpp
Normal file
11
Src/ItemPrinter.hpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef ITEM_PRINTER
|
||||
#define ITEM_PRINTER
|
||||
|
||||
#include <vector>
|
||||
#include <Peripheral.hpp>
|
||||
|
||||
|
||||
struct ItemPrinter{
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue