Skip to content
34 changes: 34 additions & 0 deletions ports/opennurbs/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
set(VERSION v7.11.21285.13001)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO aminya/opennurbs
Comment thread
aminya marked this conversation as resolved.
REF tags/${VERSION}_cmake
SHA512 0f2c336463b4b7ba41ea480e964be47f7927ff93b97bdd4f241bab21e5bc99b893c4d24fd64cc768f056ce29076bb7a19ceccf7c3ffb8b84d370fc8186047249
HEAD_REF master
)

if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
# shared libraries are only supported on Windows
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OPENNURBS_SHARED)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DOPENNURBS_SHARED=${OPENNURBS_SHARED}
-DCMAKE_FIND_FRAMEWORK=LAST
)

vcpkg_cmake_build(TARGET opennurbs)

# copy header files
file(GLOB HEADER_FILES "${SOURCE_PATH}/*.h")
foreach(HEADER_FILE ${HEADER_FILES})
file(INSTALL "${HEADER_FILE}" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
endforeach()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
4 changes: 4 additions & 0 deletions ports/opennurbs/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package opennurbs provides CMake targets:

find_package(opennurbs REQUIRED)
target_link_libraries(main PRIVATE opennurbs::opennurbs)
13 changes: 13 additions & 0 deletions ports/opennurbs/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "opennurbs",
"version-string": "v7.11.21285.13001",
"description": "The openNURBS Initiative provides CAD, CAM, CAE, and computer graphics software developers the tools to accurately transfer 3D geometry between applications.",
"supports": "!uwp",
"dependencies": [
"dirent",
{
"name": "vcpkg-cmake",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4972,6 +4972,10 @@
"baseline": "2.2.0.33",
"port-version": 13
},
"opennurbs": {
"baseline": "v7.11.21285.13001",
"port-version": 0
},
"openscap": {
"baseline": "1.3.1",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/o-/opennurbs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "4f9bfd1fccd54ec29d3060ed22259c9bc7a96fa9",
"version-string": "v7.11.21285.13001",
"port-version": 0
}
]
}