Comments (3)
Hello @gdorion, I use CMake
to compile svgren
on my Mac, here are the contents of my CMakeLists.txt
file:
cmake_minimum_required(VERSION 3.6)
project(code)
include_directories(./
./svgren/
./svgdom/
./svgdom/elements/
./utki/
./papki/
/usr/local/Cellar/cairo/1.14.10/include
/usr/local/Cellar/cairo/1.14.10/include/cairo)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lcairo")
# Papki code
set(PAPKI_SOURCES
papki/BufferFile.cpp
papki/FSFile.cpp
papki/File.cpp
papki/MemoryFile.cpp)
# Mikroxml sources
set(MIKROXML_SOURCES
mikroxml/mikroxml.cpp)
# Unikod source files
set(UNIKOD_SOURCES
unikod/utf8.cpp)
# Svgren files
set(SVGREN_SOURCES
svgren/render.cpp
svgren/Renderer.cpp
svgren/util.cpp
svgren/FilterApplyer.cpp
svgren/Surface.cpp
svgren/CanvasRegion.cpp)
# Svgdom source files
set(SVGDOM_SOURCES
svgdom/Length.cpp
svgdom/Parser.cpp
svgdom/StreamWriter.cpp
svgdom/Visitor.cpp
svgdom/dom.cpp
svgdom/util.cpp
svgdom/Finder.cpp
svgdom/StyleStack.cpp
svgdom/Cloner.cpp
svgdom/elements/AspectRatioed.cpp
svgdom/elements/ImageElement.cpp
svgdom/elements/Element.cpp
svgdom/elements/Gradients.cpp
svgdom/elements/Rectangle.cpp
svgdom/elements/Referencing.cpp
svgdom/elements/Shapes.cpp
svgdom/elements/Structurals.cpp
svgdom/elements/Styleable.cpp
svgdom/elements/Transformable.cpp
svgdom/elements/ViewBoxed.cpp
svgdom/elements/Filter.cpp)
# My main source file
set(MAIN_SOURCES
main.cpp)
add_executable(code
${PAPKI_SOURCES}
${MIKROXML_SOURCES}
${UNIKOD_SOURCES}
${SVGREN_SOURCES}
${SVGDOM_SOURCES}
${MAIN_SOURCES})
As you can see, the only real dependency is cairo
, all the other dependencies (utki
, papki
, mikroxml
, unikod
, and of course svgdom
) are found on @igagis github repositories. I use this file only for debugging/testing, and have something more complicated for production, but you can easily adapt this to your requirements.
from svgren.
Hi!
I don't use CMake and I'm not really familiar with it, so I can't create CMake scripts. But I accept patches ;)
from svgren.
Just FYI, svgren
is now available as conan
package for linux and macos, this might be easier to use along with CMake
.
from svgren.
Related Issues (20)
- Image element not rendered HOT 5
- add <defs><style></style></defs> support HOT 8
- rgb(%) support HOT 6
- xi:include in svg HOT 1
- fatal error: rasterimage/image.hpp: No such file or directory HOT 4
- cocoapods svgren not found HOT 4
- utki cocoapod doesn't have a lib HOT 5
- Support for stroke-dasharray and stroke-dashoffset HOT 4
- Unresolved external symbol HOT 6
- Not correctly displaying shapes. HOT 8
- Pixel layout & console output HOT 5
- division by 0
- compiling errors after update to the latest version HOT 5
- add <pattern> support
- No Images loaded since last Update HOT 46
- VS2017 v141 toolset link failed HOT 6
- Problem rendering Instagram logo HOT 5
- XCFramework support HOT 10
- Tutorial needs update: requires C++/17 standard, not C++/11 HOT 2
- Artifact when drawing SVG with `circle` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svgren.