aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Romero <romerosanchezv@gmail.com>2019-10-15 21:55:32 -0700
committerGitHub <noreply@github.com>2019-10-15 21:55:32 -0700
commit585b9272d4ceba551620a6c79652cca4bb228135 (patch)
treeda811bd092253d2daa4085760d9203ff0ad64922
parent7fe358bba19a469af911473577e46af03572b7b5 (diff)
parent14fa259ebfb997a1d4f1458a2b29f1d07f27d3e2 (diff)
downloadvcpkg-585b9272d4ceba551620a6c79652cca4bb228135.tar.gz
vcpkg-585b9272d4ceba551620a6c79652cca4bb228135.zip
Merge pull request #8591 from AlvinZhangH/dev/alvin/8531
[embree3]Fix EMBREE_ROOT_DIR path setting,EMBREE_LIBRARY Debug/Release path setting.
-rw-r--r--ports/embree3/fix-embree-path.patch26
-rw-r--r--ports/embree3/portfile.cmake1
2 files changed, 27 insertions, 0 deletions
diff --git a/ports/embree3/fix-embree-path.patch b/ports/embree3/fix-embree-path.patch
new file mode 100644
index 000000000..316112755
--- /dev/null
+++ b/ports/embree3/fix-embree-path.patch
@@ -0,0 +1,26 @@
+diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake
+index cab4d41..da84d3d 100644
+--- a/common/cmake/embree-config.cmake
++++ b/common/cmake/embree-config.cmake
+@@ -14,11 +14,19 @@
+ ## limitations under the License. ##
+ ## ======================================================================== ##
+
+-SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/@EMBREE_RELATIV_ROOT_DIR@)
++SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/../../@EMBREE_RELATIV_ROOT_DIR@)
+ GET_FILENAME_COMPONENT(EMBREE_ROOT_DIR "${EMBREE_ROOT_DIR}" ABSOLUTE)
+
+ SET(EMBREE_INCLUDE_DIRS ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_INCLUDEDIR@)
+-SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@)
++
++IF (CMAKE_BUILD_TYPE STREQUAL Debug)
++ SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/debug/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@)
++ENDIF ()
++
++IF (CMAKE_BUILD_TYPE STREQUAL Release)
++ SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@)
++ENDIF ()
++
+ SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
+
+ MARK_AS_ADVANCED(embree_DIR)
diff --git a/ports/embree3/portfile.cmake b/ports/embree3/portfile.cmake
index a24fb44ae..32deef693 100644
--- a/ports/embree3/portfile.cmake
+++ b/ports/embree3/portfile.cmake
@@ -9,6 +9,7 @@ vcpkg_from_github(
PATCHES
fix-InstallPath.patch
fix-cmake-path.patch
+ fix-embree-path.patch
)
file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake)