aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilly O'Neal <bion@microsoft.com>2021-07-19 19:29:59 -0700
committerGitHub <noreply@github.com>2021-07-19 19:29:59 -0700
commitce3caf4515054aa08e8a1068d2cf08bcfebf678b (patch)
treee11d72f75866080684fecb1fed4e86f9e3958d08
parent637ab6863dd3b93a8b6fe9d5761a347621d72f5d (diff)
downloadvcpkg-ce3caf4515054aa08e8a1068d2cf08bcfebf678b.tar.gz
vcpkg-ce3caf4515054aa08e8a1068d2cf08bcfebf678b.zip
[embree2] Fix static linking (#18985)
* [embree2] Fix static linking Recently attempting to build embree2 is causing our osx workers to die. Example recent CIs: https://dev.azure.com/vcpkg/public/_build/results?buildId=56146 https://dev.azure.com/vcpkg/public/_build/results?buildId=55886 https://dev.azure.com/vcpkg/public/_build/results?buildId=55802 Notably, we don't see this problem in PRs because it is marked "fail" in ci.baseline.txt. Initially, I was going to change it to skip, but observed that the project uses an ordinary cmake build and all the failing triplets were static ones. If this PR passes, the hope is that CI with this change will pass too. * Disable embree2 more directly for mac and linux because the portfile isn't prepared for it. * Small changes * Update the baseline version * Use string(COMPARE EQUAL for EMBREE_STATIC_RUNTIME as well. Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
-rw-r--r--ports/embree2/portfile.cmake48
-rw-r--r--ports/embree2/vcpkg.json3
-rw-r--r--scripts/ci.baseline.txt4
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/e-/embree2.json5
5 files changed, 32 insertions, 30 deletions
diff --git a/ports/embree2/portfile.cmake b/ports/embree2/portfile.cmake
index 1cb9b6bab..3c38547f8 100644
--- a/ports/embree2/portfile.cmake
+++ b/ports/embree2/portfile.cmake
@@ -8,21 +8,19 @@ vcpkg_from_github(
cmake_policy.patch
)
-file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake)
+file(REMOVE "${SOURCE_PATH}/common/cmake/FindTBB.cmake")
-if(VCPKG_CRT_LINKAGE STREQUAL static)
- set(EMBREE_STATIC_RUNTIME ON)
-else()
- set(EMBREE_STATIC_RUNTIME OFF)
-endif()
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" EMBREE_STATIC_LIB)
+string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" EMBREE_STATIC_RUNTIME)
vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
+ SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
- PREFER_NINJA # Disable this option if project cannot be built with Ninja
+ PREFER_NINJA
OPTIONS
-DEMBREE_ISPC_SUPPORT=OFF
-DEMBREE_TUTORIALS=OFF
+ -DEMBREE_STATIC_LIB=${EMBREE_STATIC_LIB}
-DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME}
"-DTBB_LIBRARIES=TBB::tbb"
"-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include"
@@ -34,19 +32,21 @@ vcpkg_install_cmake()
vcpkg_copy_pdbs()
# these cmake files do not seem to contain helpful configuration for find libs, just remove them
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config.cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config-version.cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake)
-
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models)
-
-file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree2)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree2/doc)
-
-# Handle copyright
-file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree2)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree2/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree2/copyright)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/embree-config.cmake")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/embree-config-version.cmake")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake")
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin/models")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/models")
+
+if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/embree2")
+file(RENAME "${CURRENT_PACKAGES_DIR}/share/doc" "${CURRENT_PACKAGES_DIR}/share/embree2/doc")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/ports/embree2/vcpkg.json b/ports/embree2/vcpkg.json
index 683e2eabb..2ca350964 100644
--- a/ports/embree2/vcpkg.json
+++ b/ports/embree2/vcpkg.json
@@ -1,9 +1,10 @@
{
"name": "embree2",
"version-semver": "2.17.7",
- "port-version": 1,
+ "port-version": 2,
"description": "High Performance Ray Tracing Kernels.",
"homepage": "https://github.com/embree/embree",
+ "supports": "windows",
"dependencies": [
"tbb"
]
diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt
index 12292644f..24f685e1c 100644
--- a/scripts/ci.baseline.txt
+++ b/scripts/ci.baseline.txt
@@ -268,10 +268,6 @@ ecsutil:x64-osx=fail
ecsutil:x64-uwp=fail
# Checks for gnu extension so only works with gcc.
elfutils:x64-osx=fail
-embree2:x64-linux=fail
-embree2:x64-osx=fail
-embree2:x64-windows-static=fail
-embree2:x64-windows-static-md=fail
enet:arm-uwp=fail
enet:x64-uwp=fail
epsilon:arm-uwp=fail
diff --git a/versions/baseline.json b/versions/baseline.json
index a068e8be6..cef33e4de 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -1862,7 +1862,7 @@
},
"embree2": {
"baseline": "2.17.7",
- "port-version": 1
+ "port-version": 2
},
"embree3": {
"baseline": "3.12.2",
diff --git a/versions/e-/embree2.json b/versions/e-/embree2.json
index c586f06ec..2502c3c01 100644
--- a/versions/e-/embree2.json
+++ b/versions/e-/embree2.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "cc259bcc8185631761c55b23d95afba48e8bae70",
+ "version-semver": "2.17.7",
+ "port-version": 2
+ },
+ {
"git-tree": "234d3da49438399d5df9e1a105401bc930ae22fe",
"version-semver": "2.17.7",
"port-version": 1