mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-23 23:49:06 +08:00
[embree3] Update to 3.11.0 (#12555)
* Update embree to 3.11.0 * Update portfile.cmake Remove unused function include(vcpkg_common_functions) * Update ports/embree3/portfile.cmake Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com> Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com>
This commit is contained in:
parent
4b1950f798
commit
c7a2f021f2
2
ports/embree3/CONTROL
Normal file → Executable file
2
ports/embree3/CONTROL
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
Source: embree3
|
||||
Version: 3.8.0
|
||||
Version: 3.11.0
|
||||
Homepage: https://github.com/embree/embree
|
||||
Description: High Performance Ray Tracing Kernels.
|
||||
Build-Depends: tbb
|
||||
|
@ -1,15 +0,0 @@
|
||||
diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake
|
||||
index 3c3980d..0c365ac 100644
|
||||
--- a/common/cmake/package.cmake
|
||||
+++ b/common/cmake/package.cmake
|
||||
@@ -124,8 +124,8 @@ CONFIGURE_FILE(common/cmake/embree-config-version.cmake embree-config-version.cm
|
||||
# create a config file for the build directory
|
||||
CONFIGURE_FILE(common/cmake/embree-config-builddir.cmake embree-config.cmake @ONLY)
|
||||
|
||||
-INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-install.cmake" DESTINATION ${EMBREE_CMAKECONFIG_DIR} RENAME "embree-config.cmake" COMPONENT devel)
|
||||
-INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-install.cmake" DESTINATION ${EMBREE_CMAKECONFIG_DIR}/share/embree3 RENAME "embree-config.cmake" COMPONENT devel)
|
||||
+INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION ${EMBREE_CMAKECONFIG_DIR}/share/embree3 COMPONENT devel)
|
||||
|
||||
##############################################################
|
||||
# CPack specific stuff
|
@ -1,163 +0,0 @@
|
||||
diff --git a/common/lexers/CMakeLists.txt b/common/lexers/CMakeLists.txt
|
||||
index 10c8caf..95d96dc 100644
|
||||
--- a/common/lexers/CMakeLists.txt
|
||||
+++ b/common/lexers/CMakeLists.txt
|
||||
@@ -23,7 +23,7 @@ SET_PROPERTY(TARGET lexers PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET lexers APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS lexers EXPORT lexers-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT lexers-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS lexers EXPORT lexers-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT lexers-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
SIGN_TARGET(lexers)
|
||||
ENDIF()
|
||||
diff --git a/common/math/CMakeLists.txt b/common/math/CMakeLists.txt
|
||||
index e7ed3b1..13247ca 100644
|
||||
--- a/common/math/CMakeLists.txt
|
||||
+++ b/common/math/CMakeLists.txt
|
||||
@@ -19,8 +19,8 @@ SET_PROPERTY(TARGET math PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET math APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS math EXPORT math-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT math-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS math EXPORT math-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT math-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
SIGN_TARGET(math)
|
||||
ENDIF()
|
||||
|
||||
diff --git a/common/simd/CMakeLists.txt b/common/simd/CMakeLists.txt
|
||||
index 5b1658c..81d7c80 100644
|
||||
--- a/common/simd/CMakeLists.txt
|
||||
+++ b/common/simd/CMakeLists.txt
|
||||
@@ -19,7 +19,7 @@ SET_PROPERTY(TARGET simd PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET simd APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS simd EXPORT simd-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT simd-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS simd EXPORT simd-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT simd-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
SIGN_TARGET(simd)
|
||||
ENDIF()
|
||||
diff --git a/common/sys/CMakeLists.txt b/common/sys/CMakeLists.txt
|
||||
index e0e0848..b57e6be 100644
|
||||
--- a/common/sys/CMakeLists.txt
|
||||
+++ b/common/sys/CMakeLists.txt
|
||||
@@ -35,7 +35,7 @@ SET_PROPERTY(TARGET sys PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET sys APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS sys EXPORT sys-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT sys-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS sys EXPORT sys-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT sys-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
SIGN_TARGET(sys)
|
||||
ENDIF()
|
||||
diff --git a/common/tasking/CMakeLists.txt b/common/tasking/CMakeLists.txt
|
||||
index f5db33f..b96671a 100644
|
||||
--- a/common/tasking/CMakeLists.txt
|
||||
+++ b/common/tasking/CMakeLists.txt
|
||||
@@ -28,7 +28,7 @@ SET_PROPERTY(TARGET tasking PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET tasking APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS tasking EXPORT tasking-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT tasking-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS tasking EXPORT tasking-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT tasking-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
SIGN_TARGET(tasking)
|
||||
ENDIF()
|
||||
diff --git a/kernels/CMakeLists.txt b/kernels/CMakeLists.txt
|
||||
index a5774d2..b637321 100644
|
||||
--- a/kernels/CMakeLists.txt
|
||||
+++ b/kernels/CMakeLists.txt
|
||||
@@ -255,8 +255,8 @@ IF (EMBREE_ISA_SSE42 AND EMBREE_LIBRARY_FILES_SSE42)
|
||||
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARIES} embree_sse42)
|
||||
CheckGlobals(embree_sse42)
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS embree_sse42 EXPORT embree_sse42-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT embree_sse42-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS embree_sse42 EXPORT embree_sse42-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT embree_sse42-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
ENDIF()
|
||||
ENDIF ()
|
||||
|
||||
@@ -268,8 +268,8 @@ IF (EMBREE_ISA_AVX AND EMBREE_LIBRARY_FILES_AVX)
|
||||
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARIES} embree_avx)
|
||||
CheckGlobals(embree_avx)
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS embree_avx EXPORT embree_avx-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT embree_avx-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS embree_avx EXPORT embree_avx-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT embree_avx-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
@@ -281,8 +281,8 @@ IF (EMBREE_ISA_AVX2 AND EMBREE_LIBRARY_FILES_AVX2)
|
||||
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARIES} embree_avx2)
|
||||
CheckGlobals(embree_avx2)
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS embree_avx2 EXPORT embree_avx2-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT embree_avx2-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS embree_avx2 EXPORT embree_avx2-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT embree_avx2-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
@@ -294,8 +294,8 @@ IF (EMBREE_ISA_AVX512KNL AND EMBREE_LIBRARY_FILES_AVX512KNL)
|
||||
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARIES} embree_avx512knl)
|
||||
CheckGlobals(embree_avx512knl)
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS embree_avx512knl EXPORT embree_avx512knl-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT embree_avx512knl-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS embree_avx512knl EXPORT embree_avx512knl-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT embree_avx512knl-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
@@ -307,8 +307,8 @@ IF (EMBREE_ISA_AVX512SKX AND EMBREE_LIBRARY_FILES_AVX512SKX)
|
||||
SET(EMBREE_LIBRARIES ${EMBREE_LIBRARIES} embree_avx512skx)
|
||||
CheckGlobals(embree_avx512skx)
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(TARGETS embree_avx512skx EXPORT embree_avx512skx-targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
- INSTALL(EXPORT embree_avx512skx-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(TARGETS embree_avx512skx EXPORT embree_avx512skx-targets DESTINATION share/embree3 ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT embree_avx512skx-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
@@ -331,7 +331,7 @@ ELSE()
|
||||
SET_TARGET_PROPERTIES(embree PROPERTIES VERSION ${EMBREE_VERSION} SOVERSION ${EMBREE_VERSION_MAJOR})
|
||||
ENDIF()
|
||||
|
||||
-INSTALL(TARGETS embree EXPORT embree-targets
|
||||
+INSTALL(TARGETS embree EXPORT embree-targets DESTINATION share/embree3
|
||||
LIBRARY NAMELINK_SKIP DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib
|
||||
# on Windows put the dlls into bin
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples
|
||||
@@ -340,7 +340,7 @@ INSTALL(TARGETS embree EXPORT embree-targets
|
||||
)
|
||||
|
||||
IF (EMBREE_STATIC_LIB)
|
||||
- INSTALL(EXPORT embree-targets DESTINATION ${EMBREE_CMAKECONFIG_DIR} COMPONENT devel)
|
||||
+ INSTALL(EXPORT embree-targets DESTINATION share/embree3 COMPONENT devel)
|
||||
ENDIF()
|
||||
|
||||
IF (NOT EMBREE_STATIC_LIB)
|
||||
diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake
|
||||
index 0c365ac..7b140a5 100644
|
||||
--- a/common/cmake/package.cmake
|
||||
+++ b/common/cmake/package.cmake
|
||||
@@ -124,8 +124,8 @@ CONFIGURE_FILE(common/cmake/embree-config-version.cmake embree-config-version.cm
|
||||
# create a config file for the build directory
|
||||
CONFIGURE_FILE(common/cmake/embree-config-builddir.cmake embree-config.cmake @ONLY)
|
||||
|
||||
-INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-install.cmake" DESTINATION ${EMBREE_CMAKECONFIG_DIR}/share/embree3 RENAME "embree-config.cmake" COMPONENT devel)
|
||||
-INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION ${EMBREE_CMAKECONFIG_DIR}/share/embree3 COMPONENT devel)
|
||||
+INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-install.cmake" DESTINATION share/embree3 RENAME "embree-config.cmake" COMPONENT devel)
|
||||
+INSTALL(FILES "${PROJECT_BINARY_DIR}/embree-config-version.cmake" DESTINATION share/embree3 COMPONENT devel)
|
||||
|
||||
##############################################################
|
||||
# CPack specific stuff
|
@ -1,26 +0,0 @@
|
||||
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)
|
117
ports/embree3/fix-path.patch
Executable file
117
ports/embree3/fix-path.patch
Executable file
@ -0,0 +1,117 @@
|
||||
diff --git a/common/algorithms/CMakeLists.txt b/common/algorithms/CMakeLists.txt
|
||||
index 5667d2bd3..cb26776a4 100644
|
||||
--- a/common/algorithms/CMakeLists.txt
|
||||
+++ b/common/algorithms/CMakeLists.txt
|
||||
@@ -17,11 +17,4 @@ ADD_LIBRARY(algorithms OBJECT
|
||||
SET_PROPERTY(TARGET algorithms PROPERTY FOLDER common)
|
||||
SET_PROPERTY(TARGET algorithms APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}")
|
||||
|
||||
-# ideally we would use target_link_libraries to provide the algorithms target
|
||||
-# with the TBB include directory information. Howeve, this is only possible in
|
||||
-# very recent versions of TBB and therefore we use the target property instead
|
||||
-GET_TARGET_PROPERTY(tasking_include_dirs tasking INCLUDE_DIRECTORIES)
|
||||
-if (tasking_include_dirs)
|
||||
- TARGET_INCLUDE_DIRECTORIES(algorithms PUBLIC "${tasking_include_dirs}")
|
||||
- GET_TARGET_PROPERTY(algorithms_include_dirs algorithms INCLUDE_DIRECTORIES)
|
||||
-endif()
|
||||
+TARGET_LINK_LIBRARIES(algorithms PUBLIC tasking)
|
||||
diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake
|
||||
index 9b7370ccd..14ce929d6 100644
|
||||
--- a/common/cmake/embree-config.cmake
|
||||
+++ b/common/cmake/embree-config.cmake
|
||||
@@ -5,8 +5,6 @@ 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@)
|
||||
-SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
|
||||
|
||||
SET(EMBREE_VERSION @EMBREE_VERSION@)
|
||||
SET(EMBREE_VERSION_MAJOR @EMBREE_VERSION_MAJOR@)
|
||||
@@ -22,7 +20,6 @@ SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@)
|
||||
SET(EMBREE_ISA_AVX512KNL @EMBREE_ISA_AVX512KNL@)
|
||||
SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512SKX@)
|
||||
|
||||
-SET(EMBREE_BUILD_TYPE @CMAKE_BUILD_TYPE@)
|
||||
SET(EMBREE_ISPC_SUPPORT @EMBREE_ISPC_SUPPORT@)
|
||||
SET(EMBREE_STATIC_LIB @EMBREE_STATIC_LIB@)
|
||||
SET(EMBREE_TUTORIALS @EMBREE_TUTORIALS@)
|
||||
@@ -53,10 +50,6 @@ IF (EMBREE_STATIC_LIB)
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/simd-targets.cmake")
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/lexers-targets.cmake")
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake")
|
||||
-
|
||||
- add_library(TBB::tbb SHARED IMPORTED)
|
||||
- set_target_properties(TBB::tbb PROPERTIES IMPORTED_LOCATION "${EMBREE_ROOT_DIR}/@EMBREE_INSTALLED_TBB@")
|
||||
-
|
||||
ENDIF()
|
||||
|
||||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake")
|
||||
diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake
|
||||
index a4da0001a..b6f82e981 100644
|
||||
--- a/common/cmake/package.cmake
|
||||
+++ b/common/cmake/package.cmake
|
||||
@@ -20,16 +20,6 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
-##############################################################
|
||||
-# Install MSVC runtime
|
||||
-##############################################################
|
||||
-
|
||||
-IF (WIN32)
|
||||
- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
|
||||
- INCLUDE(InstallRequiredSystemLibraries)
|
||||
- LIST(FILTER CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS INCLUDE REGEX ".*msvcp[0-9]+\.dll|.*vcruntime[0-9]+\.dll|.*vcruntime[0-9]+_[0-9]+\.dll")
|
||||
- INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT lib)
|
||||
-ENDIF()
|
||||
|
||||
##############################################################
|
||||
# Install Headers
|
||||
@@ -106,18 +96,9 @@ ELSE()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
-IF (WIN32 OR EMBREE_ZIP_MODE)
|
||||
- # for local "installs" and on Windows we want the cmake config files placed
|
||||
- # in the install root, such that users can point the CMake variable
|
||||
- # embree_DIR just to the install folder
|
||||
- SET(EMBREE_CMAKECONFIG_DIR ".")
|
||||
- SET(EMBREE_CMAKEEXPORT_DIR "cmake")
|
||||
- SET(EMBREE_RELATIV_ROOT_DIR ".")
|
||||
-ELSE()
|
||||
- SET(EMBREE_CMAKECONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}")
|
||||
- SET(EMBREE_CMAKEEXPORT_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}")
|
||||
- FILE(RELATIVE_PATH EMBREE_RELATIV_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/")
|
||||
-ENDIF()
|
||||
+SET(EMBREE_CMAKECONFIG_DIR "share/embree")
|
||||
+SET(EMBREE_CMAKEEXPORT_DIR "share/embree3")
|
||||
+SET(EMBREE_RELATIV_ROOT_DIR "../..")
|
||||
|
||||
CONFIGURE_FILE(common/cmake/embree-config.cmake embree-config-install.cmake @ONLY)
|
||||
CONFIGURE_FILE(common/cmake/embree-config-version.cmake embree-config-version.cmake @ONLY)
|
||||
diff --git a/common/tasking/CMakeLists.txt b/common/tasking/CMakeLists.txt
|
||||
index 71ef29612..c846004e3 100644
|
||||
--- a/common/tasking/CMakeLists.txt
|
||||
+++ b/common/tasking/CMakeLists.txt
|
||||
@@ -10,7 +10,7 @@ ELSEIF (TASKING_TBB)
|
||||
if (NOT ${EMBREE_TBB_ROOT} STREQUAL "")
|
||||
set(TBB_ROOT ${EMBREE_TBB_ROOT})
|
||||
endif()
|
||||
- FIND_PACKAGE(TBB REQUIRED tbb)
|
||||
+ FIND_PACKAGE(TBB CONFIG REQUIRED tbb)
|
||||
|
||||
##############################################################
|
||||
# Create tasking target and link against TBB. Also set include directory
|
||||
@@ -18,10 +18,7 @@ ELSEIF (TASKING_TBB)
|
||||
# with the TBB header files
|
||||
##############################################################
|
||||
ADD_LIBRARY(tasking STATIC taskschedulertbb.cpp)
|
||||
- TARGET_LINK_LIBRARIES(tasking PUBLIC TBB)
|
||||
- TARGET_INCLUDE_DIRECTORIES(tasking PUBLIC "${TBB_INCLUDE_DIRS}")
|
||||
-
|
||||
- include(installTBB)
|
||||
+ TARGET_LINK_LIBRARIES(tasking PUBLIC TBB::tbb)
|
||||
|
||||
ELSEIF (TASKING_PPL)
|
||||
ADD_LIBRARY(tasking STATIC taskschedulerppl.cpp)
|
48
ports/embree3/portfile.cmake
Normal file → Executable file
48
ports/embree3/portfile.cmake
Normal file → Executable file
@ -1,64 +1,40 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO embree/embree
|
||||
REF 539d4eec716085484f957d7b0d697b1891dafec4 # v3.8.0
|
||||
SHA512 77ab07cc7283f1a0c50d7cec07d1cbe4a24a41482b8b043f79a045953fccfa41a854bbc29a76beb67385d1bbb6d43097287ccfd3e1d2c84c1a5d55a2696d0815
|
||||
REF v3.11.0
|
||||
SHA512 a20acb07103d322eebc85d41152210466f8d9b97e7a332589c692f649ee02079465f89561748ddc8448fb40bc63f2595d728cc31a927f7b95bea13446c5c775d
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-InstallPath.patch
|
||||
fix-cmake-path.patch
|
||||
fix-embree-path.patch
|
||||
fix-path.patch
|
||||
)
|
||||
|
||||
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()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
set(EMBREE_STATIC_LIB ON)
|
||||
else()
|
||||
set(EMBREE_STATIC_LIB 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}
|
||||
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_RUNTIME=${EMBREE_STATIC_RUNTIME}
|
||||
-DEMBREE_STATIC_LIB=${EMBREE_STATIC_LIB}
|
||||
"-DTBB_LIBRARIES=TBB::tbb"
|
||||
"-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include"
|
||||
)
|
||||
|
||||
# just wait, the release build of embree is insanely slow in MSVC
|
||||
# a single file will took about 2-10 min
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/embree3 TARGET_PATH share/embree)
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
if (EXISTS ${CURRENT_PACKAGES_DIR}/uninstall.command)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/uninstall.command)
|
||||
endif()
|
||||
if (EXISTS ${CURRENT_PACKAGES_DIR}/debug/uninstall.command)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/uninstall.command)
|
||||
if(APPLE)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/uninstall.command ${CURRENT_PACKAGES_DIR}/debug/uninstall.command)
|
||||
endif()
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/${PORT}/doc)
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree/doc)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
4
ports/embree3/usage
Executable file
4
ports/embree3/usage
Executable file
@ -0,0 +1,4 @@
|
||||
The package embree3 provides CMake targets:
|
||||
|
||||
find_package(embree 3 CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE embree)
|
Loading…
Reference in New Issue
Block a user