diff options
| -rw-r--r-- | ports/sfsexp/CMakeLists.txt | 20 | ||||
| -rw-r--r-- | ports/sfsexp/CONTROL | 4 | ||||
| -rw-r--r-- | ports/sfsexp/portfile.cmake | 23 |
3 files changed, 47 insertions, 0 deletions
diff --git a/ports/sfsexp/CMakeLists.txt b/ports/sfsexp/CMakeLists.txt new file mode 100644 index 000000000..e770b9d6d --- /dev/null +++ b/ports/sfsexp/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.13) +project(sexp) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) +endif() + +file(GLOB sources src/*.c src/*.h) +include_directories(src/) + +add_library(sexp ${sources}) + +set_target_properties(sexp PROPERTIES PUBLIC_HEADER "src/cstring.h;src/faststack.h;src/sexp.h;src/sexp_errors.h;src/sexp_memory.h;src/sexp_ops.h;src/sexp_vis.h") + +install(TARGETS sexp + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION include +)
\ No newline at end of file diff --git a/ports/sfsexp/CONTROL b/ports/sfsexp/CONTROL new file mode 100644 index 000000000..bb6d25a6a --- /dev/null +++ b/ports/sfsexp/CONTROL @@ -0,0 +1,4 @@ +Source: sfsexp +Version: 1.3 +Homepage: https://github.com/mjsottile/sfsexp +Description: Small Fast S-Expression Library diff --git a/ports/sfsexp/portfile.cmake b/ports/sfsexp/portfile.cmake new file mode 100644 index 000000000..6bc6f2c9d --- /dev/null +++ b/ports/sfsexp/portfile.cmake @@ -0,0 +1,23 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mjsottile/sfsexp + REF ad589f9e6e0eca20345320e9c82a3aecc0a5c8aa #v1.3 + SHA512 cdd469e23de48a5d6cd633b7b97b394cbfcba330ac2c3ae549811d856f2eec0c8558f99313e56a9f1cc9d72d4f17077584b6cf15c87814b91fe44ddd76895a8c + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
\ No newline at end of file |
