-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1259 from UniStuttgart-VISUS/vcpkg
Vcpkg update
- Loading branch information
Showing
28 changed files
with
664 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 06f49a8..fdaaee7 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -69,6 +69,9 @@ IF(COMMAND cmake_policy) | ||
if(POLICY CMP0074) | ||
cmake_policy(SET CMP0074 NEW) | ||
endif() | ||
+ if (POLICY CMP0001) | ||
+ cmake_policy(SET CMP0001 OLD) | ||
+ endif() | ||
ENDIF(COMMAND cmake_policy) | ||
|
||
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake | ||
index b4fc24e8c..92d147b2a 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_RELATIVE_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@) | ||
diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake | ||
index 9d4d6572a..7b9f96c12 100644 | ||
--- a/common/cmake/package.cmake | ||
+++ b/common/cmake/package.cmake | ||
@@ -23,7 +23,7 @@ ENDIF() | ||
# Install MSVC runtime | ||
############################################################## | ||
|
||
-IF (WIN32) | ||
+IF (0) | ||
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake | ||
index 5087ca0..fdf8135 100644 | ||
--- a/common/cmake/embree-config.cmake | ||
+++ b/common/cmake/embree-config.cmake | ||
@@ -52,6 +52,21 @@ IF (EMBREE_STATIC_LIB) | ||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake") | ||
|
||
|
||
+ IF(EMBREE_ISA_SSE42) | ||
+ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_sse42-targets.cmake") | ||
+ ENDIF() | ||
+ IF(EMBREE_ISA_AVX) | ||
+ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx-targets.cmake") | ||
+ ENDIF() | ||
+ IF(EMBREE_ISA_AVX2) | ||
+ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx2-targets.cmake") | ||
+ ENDIF() | ||
+ IF(EMBREE_ISA_AVX512KNL) | ||
+ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx512knl-targets.cmake") | ||
+ ENDIF() | ||
+ IF(EMBREE_ISA_AVX512SKX) | ||
+ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx512skx-targets.cmake") | ||
+ ENDIF() | ||
ENDIF() | ||
|
||
INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake | ||
index 8c89f5b..55cb2af 100644 | ||
--- a/common/cmake/package.cmake | ||
+++ b/common/cmake/package.cmake | ||
@@ -114,10 +114,10 @@ ENDIF() | ||
# SET(EMBREE_CMAKEEXPORT_DIR "cmake") | ||
# SET(EMBREE_RELATIVE_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}") | ||
+SET(EMBREE_CMAKECONFIG_DIR "share/embree") | ||
+SET(EMBREE_CMAKEEXPORT_DIR "share/embree") | ||
IF (WIN32) | ||
- SET(EMBREE_RELATIVE_ROOT_DIR "../../../") | ||
+ SET(EMBREE_RELATIVE_ROOT_DIR "../..") | ||
ELSE() | ||
FILE(RELATIVE_PATH EMBREE_RELATIVE_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/") | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# stole the embree3 port and added ispc | ||
set(EMBREE3_VERSION 3.13.4) | ||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO embree/embree | ||
REF v${EMBREE3_VERSION} | ||
SHA512 685c3935fabe1bfa7260ef148df26b686b085b75011d72011461471cbcef786a5ce7a0e85c57b2df05798489a2d4e80a8d3ee5df986029edad7df7511d99c0ca | ||
HEAD_REF master | ||
PATCHES | ||
fix-path.patch | ||
cmake_policy.patch | ||
fix-targets-file-not-found.patch | ||
) | ||
|
||
list(LENGTH FEATURES FEATURE_COUNT) | ||
#message("FEATURE_COUNT=${FEATURE_COUNT}") | ||
|
||
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static EMBREE_STATIC_LIB) | ||
string(COMPARE EQUAL ${VCPKG_CRT_LINKAGE} static EMBREE_STATIC_RUNTIME) | ||
|
||
if (NOT VCPKG_TARGET_IS_OSX) | ||
if ("avx512" IN_LIST FEATURES) | ||
message(FATAL_ERROR "Microsoft Visual C++ Compiler does not support feature avx512 officially.") | ||
endif() | ||
|
||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
FEATURES | ||
avx EMBREE_ISA_AVX | ||
avx2 EMBREE_ISA_AVX2 | ||
avx512 EMBREE_ISA_AVX512 | ||
sse2 EMBREE_ISA_SSE2 | ||
sse42 EMBREE_ISA_SSE42 | ||
) | ||
elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) | ||
list(LENGTH FEATURES FEATURE_COUNT) | ||
if (FEATURE_COUNT GREATER 2) | ||
message(WARNING [[ | ||
Using Embree as static library is not supported with AppleClang >= 9.0 when multiple ISAs are selected. | ||
Please install embree3 with only one feature using command "./vcpkg install embree3[core,FEATURE_NAME]" | ||
Only set feature avx automaticlly. | ||
]]) | ||
set(FEATURE_OPTIONS | ||
-DEMBREE_ISA_AVX=ON | ||
-DEMBREE_ISA_AVX2=OFF | ||
-DEMBREE_ISA_AVX512=OFF | ||
-DEMBREE_ISA_SSE2=OFF | ||
-DEMBREE_ISA_SSE42=OFF | ||
) | ||
endif() | ||
endif() | ||
|
||
set(WIN32_OPTIONS "") | ||
if (WIN32) | ||
set(WIN32_OPTIONS -DEMBREE_STATIC_RUNTIME=OFF) | ||
endif () | ||
|
||
if (FEATURE_COUNT LESS 2) | ||
message(FATAL_ERROR "You have to select at least one ISA feature!") | ||
endif() | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH ${SOURCE_PATH} | ||
DISABLE_PARALLEL_CONFIGURE | ||
OPTIONS ${FEATURE_OPTIONS} | ||
-DEMBREE_TUTORIALS=OFF | ||
-DEMBREE_STATIC_LIB=OFF | ||
${WIN32_OPTIONS} | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_copy_pdbs() | ||
vcpkg_cmake_config_fixup() | ||
|
||
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") | ||
endif() | ||
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}/") | ||
|
||
#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) | ||
|
||
# simple mode which does not work | ||
# vcpkg_from_github( | ||
# OUT_SOURCE_PATH SOURCE_PATH | ||
# REPO embree/embree | ||
# REF 489b746c0d5010e0da10345e9dc96768bec9a037 | ||
# SHA512 502d6ed12678df20e773da057c234e7f44b5dd0e6b8c488a9a7d2117f7c1ee8fa84aba1b8d3668caf8ebbd51337812bbb2678e71fbb76b7d311ffb723bc4f5da | ||
# HEAD_REF master | ||
# ) | ||
|
||
# # TODO ISA options here | ||
# # TODO openimageIO and libpng? | ||
|
||
# vcpkg_cmake_configure( | ||
# SOURCE_PATH "${SOURCE_PATH}" | ||
# OPTIONS | ||
# -DEMBREE_TUTORIALS=false | ||
# ) | ||
# vcpkg_cmake_install() | ||
|
||
# vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/embree-3.13.4) | ||
|
||
# file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
# file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
# file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "embree", | ||
"version": "3.13.4", | ||
"description": "High Performance Ray Tracing Kernels", | ||
"homepage": "https://www.embree.org/", | ||
"license": "Apache-2.0", | ||
"dependencies": [ | ||
"ispc", | ||
"tbb", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
], | ||
"features": { | ||
"avx": { | ||
"description": "avx ISA support" | ||
}, | ||
"avx2": { | ||
"description": "avx2 ISA support" | ||
}, | ||
"avx512": { | ||
"description": "avx512 ISA support" | ||
}, | ||
"sse2": { | ||
"description": "sse2 ISA support" | ||
}, | ||
"sse42": { | ||
"description": "sse4.2 ISA support" | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.