Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Jessica Hawkwell
/
nitrogen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f5e09c31
authored
Mar 25, 2018
by
Jessica Hawkwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding resvg dependency
1 parent
ab96fba1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
40 additions
and
1 deletions
.gitignore
.gitmodules
CMakeLists.txt
README.md
deps/CMakeLists.txt
deps/resvg
src/libntk/CMakeLists.txt
src/libntk/nitrogen/nwt/NativeGraphics.h
.gitignore
View file @
f5e09c3
...
...
@@ -82,6 +82,7 @@ nbactions.xml
bin/
obj/
generated-doc/
*-prefix
# End of https://www.gitignore.io/api/codeblocks
.gitmodules
0 → 100644
View file @
f5e09c3
[submodule "deps/resvg"]
path = deps/resvg
url = https://github.com/RazrFalcon/resvg.git
CMakeLists.txt
View file @
f5e09c3
...
...
@@ -13,6 +13,10 @@ if (EXISTS /usr/local/include)
include_directories
(
/usr/local/include
)
endif
()
include_directories
(
AFTER SYSTEM
${
CMAKE_BINARY_DIR
}
/deps/resvg/capi/include/
)
add_subdirectory
(
deps
)
add_subdirectory
(
src/libnde
)
add_subdirectory
(
src/libntk
)
add_subdirectory
(
src/NitroWin
)
README.md
View file @
f5e09c3
...
...
@@ -29,6 +29,7 @@ None yet. :crying_cat_face:
+
[
`x11/xproto`
](
https://www.freshports.org/x11/xproto/
)
+
[
`devel/boehm-gc`
](
https://www.freshports.org/devel/boehm-gc/
)
+
[
`devel/boehm-gc-threaded`
](
https://www.freshports.org/devel/boehm-gc-threaded/
)
+
[
`lang/rust`
](
https://www.freshports.org/lang/rust/
)
---
## Tooling
...
...
deps/CMakeLists.txt
0 → 100644
View file @
f5e09c3
cmake_minimum_required
(
VERSION 3.10
)
find_library
(
RESVG resvg
)
message
(
"resvg "
${
RESVG
}
)
if
(
NOT
${
RESVG
}
OR NOT EXISTS {$RESVG}
)
find_program
(
CARGO cargo
)
include
(
ExternalProject
)
ExternalProject_Add
(
resvg-build
GIT_SUBMODULES resvg
SOURCE_DIR resvg/capi
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND
${
CARGO
}
update
BUILD_COMMAND
${
CARGO
}
build --release --features=cairo-backend
INSTALL_COMMAND
""
)
find_library
(
RESVG resvg
PATHS
${
CMAKE_BINARY_DIR
}
/deps/resvg/capi/target/release/
)
install
(
FILES resvg/capi/include/resvg.h DESTINATION include
)
install
(
FILES resvg/capi/target/release/libresvg.so DESTINATION lib
)
endif
()
resvg
@
a135a587
Subproject commit a135a5875b592e82adbcaa535915041030ff7b74
src/libntk/CMakeLists.txt
View file @
f5e09c3
...
...
@@ -26,6 +26,7 @@ nitrogen/nwt/GridLayout.cpp
nitrogen/nwt/InputEvent.cpp
nitrogen/nwt/Insets.cpp
nitrogen/nwt/LayoutManager.cpp
nitrogen/nwt/NativeGraphics.cpp
nitrogen/nwt/MouseAdapter.cpp
nitrogen/nwt/MouseEvent.cpp
nitrogen/nwt/MouseListener.cpp
...
...
@@ -35,7 +36,9 @@ nitrogen/nwt/Rectangle.cpp
)
target_link_libraries
(
${
PROJECT_NAME
}
LINK_PUBLIC nde
${
BoehmGC
}
)
message
(
"BoehmGC "
${
BoehmGC
}
)
target_link_libraries
(
${
PROJECT_NAME
}
LINK_PUBLIC nde
${
BoehmGC
}
${
RESVG
}
)
target_include_directories
(
ntk PUBLIC
${
CMAKE_CURRENT_SOURCE_DIR
}
)
install
(
FILES
${
PROJECT_NAME
}
.h DESTINATION include
)
...
...
src/libntk/nitrogen/nwt/NativeGraphics.h
View file @
f5e09c3
...
...
@@ -39,6 +39,8 @@
#include <nitrogen/nwt/Graphics.h>
#include <nitrogen/nwt/Rectangle.h>
#include <resvg.h>
namespace
nitrogen
{
namespace
nwt
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment