diff options
| author | Dominic Clark <mrdomclark@gmail.com> | 2020-10-14 22:21:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-14 14:21:15 -0700 |
| commit | f18ed8584b1d32626dc765424339d8e0a4d98262 (patch) | |
| tree | 23c8c76c4d67ddd5acced1e9732740496dbed46a | |
| parent | 790910f79f653978f90aadd958abf3c407215552 (diff) | |
| download | vcpkg-f18ed8584b1d32626dc765424339d8e0a4d98262.tar.gz vcpkg-f18ed8584b1d32626dc765424339d8e0a4d98262.zip | |
Add sratom port (#13771)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
| -rw-r--r-- | ports/sratom/CMakeLists.txt | 54 | ||||
| -rw-r--r-- | ports/sratom/portfile.cmake | 26 | ||||
| -rw-r--r-- | ports/sratom/vcpkg.json | 12 |
3 files changed, 92 insertions, 0 deletions
diff --git a/ports/sratom/CMakeLists.txt b/ports/sratom/CMakeLists.txt new file mode 100644 index 000000000..040f151d5 --- /dev/null +++ b/ports/sratom/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.17)
+project(sratom C)
+
+find_package(lv2 CONFIG REQUIRED)
+find_package(serd CONFIG REQUIRED)
+find_package(sord CONFIG REQUIRED)
+
+add_library(sratom
+ src/sratom.c
+)
+
+target_include_directories(sratom PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
+
+target_link_libraries(sratom PUBLIC lv2::lv2 serd::serd sord::sord)
+
+set_target_properties(sratom PROPERTIES
+ C_STANDARD 99
+ C_STANDARD_REQUIRED ON
+)
+
+target_compile_definitions(sratom PRIVATE SRATOM_INTERNAL _CRT_SECURE_NO_WARNINGS)
+
+if(BUILD_SHARED_LIBS)
+ target_compile_definitions(sratom PUBLIC SRATOM_SHARED)
+endif()
+
+install(
+ TARGETS sratom
+ EXPORT sratom-targets
+ INCLUDES DESTINATION include
+)
+
+if(NOT DISABLE_INSTALL_HEADERS)
+ install(DIRECTORY sratom DESTINATION include)
+endif()
+
+install(
+ EXPORT sratom-targets
+ NAMESPACE sratom::
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sratom"
+)
+
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sratom-config.cmake" [[
+include(CMakeFindDependencyMacro)
+find_dependency(lv2 CONFIG)
+find_dependency(serd CONFIG)
+find_dependency(sord CONFIG)
+include("${CMAKE_CURRENT_LIST_DIR}/sratom-targets.cmake")
+]])
+
+install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/sratom-config.cmake"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sratom"
+)
diff --git a/ports/sratom/portfile.cmake b/ports/sratom/portfile.cmake new file mode 100644 index 000000000..a0446c3be --- /dev/null +++ b/ports/sratom/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_gitlab(
+ GITLAB_URL https://gitlab.com
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO lv2/sratom
+ REF v0.6.4
+ SHA512 c155694365e9efe2f108135cccafd6369e896bd27ec816ac8bb429785d9218b1b30e8532188cfb39485d4b163a920ddb47466a461dcd6958d754ed0698d31081
+ HEAD_REF master
+)
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
+
+vcpkg_configure_cmake(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PREFER_NINJA
+ OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+vcpkg_fixup_cmake_targets()
+file(
+ INSTALL "${SOURCE_PATH}/COPYING"
+ DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
+ RENAME copyright
+)
diff --git a/ports/sratom/vcpkg.json b/ports/sratom/vcpkg.json new file mode 100644 index 000000000..013a4b436 --- /dev/null +++ b/ports/sratom/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "sratom", + "version-string": "0.6.4", + "description": "Sratom is a library for serialising LV2 atoms to and from RDF, particularly the Turtle syntax.", + "homepage": "https://drobilla.net/software/sratom", + "license": "ISC", + "dependencies": [ + "lv2", + "serd", + "sord" + ] +} |
