Commit f5e09c31 by Jessica Hawkwell

Adding resvg dependency

1 parent ab96fba1
...@@ -82,6 +82,7 @@ nbactions.xml ...@@ -82,6 +82,7 @@ nbactions.xml
bin/ bin/
obj/ obj/
generated-doc/ generated-doc/
*-prefix
# End of https://www.gitignore.io/api/codeblocks # End of https://www.gitignore.io/api/codeblocks
[submodule "deps/resvg"]
path = deps/resvg
url = https://github.com/RazrFalcon/resvg.git
...@@ -13,6 +13,10 @@ if (EXISTS /usr/local/include) ...@@ -13,6 +13,10 @@ if (EXISTS /usr/local/include)
include_directories(/usr/local/include) include_directories(/usr/local/include)
endif() endif()
include_directories(AFTER SYSTEM ${CMAKE_BINARY_DIR}/deps/resvg/capi/include/)
add_subdirectory(deps)
add_subdirectory(src/libnde) add_subdirectory(src/libnde)
add_subdirectory(src/libntk) add_subdirectory(src/libntk)
add_subdirectory(src/NitroWin) add_subdirectory(src/NitroWin)
...@@ -29,6 +29,7 @@ None yet. :crying_cat_face: ...@@ -29,6 +29,7 @@ None yet. :crying_cat_face:
+ [`x11/xproto`](https://www.freshports.org/x11/xproto/) + [`x11/xproto`](https://www.freshports.org/x11/xproto/)
+ [`devel/boehm-gc`](https://www.freshports.org/devel/boehm-gc/) + [`devel/boehm-gc`](https://www.freshports.org/devel/boehm-gc/)
+ [`devel/boehm-gc-threaded`](https://www.freshports.org/devel/boehm-gc-threaded/) + [`devel/boehm-gc-threaded`](https://www.freshports.org/devel/boehm-gc-threaded/)
+ [`lang/rust`](https://www.freshports.org/lang/rust/)
--- ---
## Tooling ## Tooling
......
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()
Subproject commit a135a5875b592e82adbcaa535915041030ff7b74
...@@ -26,6 +26,7 @@ nitrogen/nwt/GridLayout.cpp ...@@ -26,6 +26,7 @@ nitrogen/nwt/GridLayout.cpp
nitrogen/nwt/InputEvent.cpp nitrogen/nwt/InputEvent.cpp
nitrogen/nwt/Insets.cpp nitrogen/nwt/Insets.cpp
nitrogen/nwt/LayoutManager.cpp nitrogen/nwt/LayoutManager.cpp
nitrogen/nwt/NativeGraphics.cpp
nitrogen/nwt/MouseAdapter.cpp nitrogen/nwt/MouseAdapter.cpp
nitrogen/nwt/MouseEvent.cpp nitrogen/nwt/MouseEvent.cpp
nitrogen/nwt/MouseListener.cpp nitrogen/nwt/MouseListener.cpp
...@@ -35,7 +36,9 @@ nitrogen/nwt/Rectangle.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}) target_include_directories (ntk PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
install(FILES ${PROJECT_NAME}.h DESTINATION include) install(FILES ${PROJECT_NAME}.h DESTINATION include)
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <nitrogen/nwt/Graphics.h> #include <nitrogen/nwt/Graphics.h>
#include <nitrogen/nwt/Rectangle.h> #include <nitrogen/nwt/Rectangle.h>
#include <resvg.h>
namespace nitrogen { namespace nitrogen {
namespace nwt { namespace nwt {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!