-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
cmake_minimum_required(VERSION 3.17) | ||
project(serd C) | ||
|
||
add_library(serd | ||
src/byte_source.c | ||
src/env.c | ||
src/n3.c | ||
src/node.c | ||
src/reader.c | ||
src/string.c | ||
src/uri.c | ||
src/writer.c | ||
) | ||
|
||
file(WRITE "${CMAKE_BINARY_DIR}/serd_config.h" "") | ||
|
||
target_include_directories(serd | ||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" | ||
) | ||
|
||
set_target_properties(serd PROPERTIES | ||
C_STANDARD 99 | ||
C_STANDARD_REQUIRED ON | ||
) | ||
|
||
target_compile_definitions(serd PRIVATE SERD_INTERNAL _CRT_SECURE_NO_WARNINGS) | ||
|
||
if(BUILD_SHARED_LIBS) | ||
target_compile_definitions(serd PUBLIC SERD_SHARED) | ||
endif() | ||
|
||
install( | ||
TARGETS serd | ||
EXPORT serd-config | ||
INCLUDES DESTINATION include | ||
) | ||
|
||
if(NOT DISABLE_INSTALL_HEADERS) | ||
install(DIRECTORY serd DESTINATION include) | ||
endif() | ||
|
||
install( | ||
EXPORT serd-config | ||
NAMESPACE serd:: | ||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/serd" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
vcpkg_from_gitlab( | ||
GITLAB_URL https://gitlab.com | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO drobilla/serd | ||
REF v0.30.4 | ||
SHA512 59b4f67dfa8a2c01119b1c69609030d851339ba6d85c5c559b7c2454492ef40498ce710e5cf5f7a698a292db81e6bffacb86f9dafa5d7f3fe0c60d53d6e2281f | ||
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 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"name": "serd", | ||
"version-string": "0.30.4", | ||
"description": "Serd is a lightweight C library for RDF syntax which supports reading and writing Turtle, TRiG, NTriples, and NQuads.", | ||
"homepage": "https://drobilla.net/software/serd", | ||
"license": "ISC" | ||
} |