-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add sord port * Fix include directories
- Loading branch information
Showing
3 changed files
with
91 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,55 @@ | ||
cmake_minimum_required(VERSION 3.17) | ||
project(sord C) | ||
|
||
find_package(serd CONFIG REQUIRED) | ||
|
||
add_library(sord | ||
src/sord.c | ||
src/syntax.c | ||
) | ||
|
||
file(WRITE "${CMAKE_BINARY_DIR}/sord_config.h" "") | ||
|
||
target_include_directories(sord | ||
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}" | ||
) | ||
|
||
target_link_libraries(sord PUBLIC serd::serd) | ||
|
||
set_target_properties(sord PROPERTIES | ||
C_STANDARD 99 | ||
C_STANDARD_REQUIRED ON | ||
) | ||
|
||
target_compile_definitions(sord PRIVATE SORD_INTERNAL _CRT_SECURE_NO_WARNINGS) | ||
|
||
if(BUILD_SHARED_LIBS) | ||
target_compile_definitions(sord PUBLIC SORD_SHARED) | ||
endif() | ||
|
||
install( | ||
TARGETS sord | ||
EXPORT sord-targets | ||
INCLUDES DESTINATION include | ||
) | ||
|
||
if(NOT DISABLE_INSTALL_HEADERS) | ||
install(DIRECTORY sord DESTINATION include) | ||
endif() | ||
|
||
install( | ||
EXPORT sord-targets | ||
NAMESPACE sord:: | ||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sord" | ||
) | ||
|
||
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sord-config.cmake" [[ | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(serd CONFIG) | ||
include("${CMAKE_CURRENT_LIST_DIR}/sord-targets.cmake") | ||
]]) | ||
|
||
install( | ||
FILES "${CMAKE_CURRENT_BINARY_DIR}/sord-config.cmake" | ||
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sord" | ||
) |
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/sord | ||
REF v0.16.4 | ||
SHA512 cad8f8fd07afb5075938fce247d95f9d666f61f4d913ff0c3fde335384177de066a5c0f2620c76e098178aeded0412b3e76ef63a1ae65aba7eb99e3e8ce15896 | ||
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,10 @@ | ||
{ | ||
"name": "sord", | ||
"version-string": "0.16.4", | ||
"description": "Sord is a lightweight C library for storing RDF statements in memory.", | ||
"homepage": "https://drobilla.net/software/sord", | ||
"license": "ISC", | ||
"dependencies": [ | ||
"serd" | ||
] | ||
} |