Skip to content

Commit

Permalink
lunasvg: add version 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
toge committed Aug 24, 2024
1 parent c73ad78 commit f837475
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions recipes/lunasvg/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.4.1":
url: "https://github.com/sammycage/lunasvg/archive/v2.4.1.tar.gz"
sha256: "db9d2134c8c2545694e71e62fb0772a7d089fe53e1ace1e08c2279a89e450534"
"2.4.0":
url: "https://github.com/sammycage/lunasvg/archive/v2.4.0.tar.gz"
sha256: "0682c60501c91d75f4261d9c1a5cd44c2c9da8dba76f8402eab628448c9a4591"
Expand All @@ -21,6 +24,10 @@ sources:
url: "https://github.com/sammycage/lunasvg/archive/refs/tags/v2.3.1.tar.gz"
sha256: "6492bf0f51982f5382f83f1a42f247bb1bbcbaef4a15963bbd53073cd4944a25"
patches:
"2.4.1":
- patch_file: "patches/2.4.1-0001-fix-cmake.patch"
patch_description: "use external plutovg and fix installation path for conan"
patch_type: "conan"
"2.4.0":
- patch_file: "patches/2.3.9-0001-fix-cmake.patch"
patch_description: "use external plutovg and fix installation path for conan"
Expand Down
38 changes: 38 additions & 0 deletions recipes/lunasvg/all/patches/2.4.1-0001-fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3565911..e33555e 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,8 +12,8 @@ add_library(lunasvg)

add_subdirectory(include)
add_subdirectory(source)
-add_subdirectory(3rdparty/plutovg)
-
+find_package(plutovg CONFIG REQUIRED)
+target_link_libraries(lunasvg plutovg::plutovg)
target_compile_definitions(lunasvg PRIVATE LUNASVG_BUILD)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(lunasvg PRIVATE LUNASVG_BUILD_STATIC)
@@ -25,16 +25,16 @@ if(LUNASVG_BUILD_EXAMPLES)
target_include_directories(svg2png PRIVATE 3rdparty/stb)
endif()

-set(LUNASVG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
-set(LUNASVG_INCDIR ${CMAKE_INSTALL_PREFIX}/include)
+# set(LUNASVG_LIBDIR ${CMAKE_INSTALL_PREFIX}/lib)
+# set(LUNASVG_INCDIR ${CMAKE_INSTALL_PREFIX}/include)

install(FILES
include/lunasvg.h
- DESTINATION ${LUNASVG_INCDIR}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(TARGETS lunasvg
- LIBRARY DESTINATION ${LUNASVG_LIBDIR}
- ARCHIVE DESTINATION ${LUNASVG_LIBDIR}
- INCLUDES DESTINATION ${LUNASVG_INCDIR}
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)
2 changes: 2 additions & 0 deletions recipes/lunasvg/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.4.1":
folder: all
"2.4.0":
folder: all
"2.3.9":
Expand Down

0 comments on commit f837475

Please sign in to comment.