vcpkg/ports/usd/portfile.cmake

92 lines
3.5 KiB
CMake
Raw Normal View History

# Don't file if the bin folder exists. We need exe and custom files.
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
[tbb, pagmo2] Update TBB to 2021.5 and update pagmo2 to 2.18.0 (#26284) * [tbb] Update to 2021.3.0 * [tbb] Add Threads dependency * [pagmo2] Update to support new TBB * [openvdb] Update to 8.1.0 * [embree2] Remove from baseline -- it is no longer receiving support from upstream * [usd] Mark as unsupported * [usd] Disable USD in CI due to policy https://github.com/PixarAnimationStudios/USD/issues/1600 * [openvdb] Bump port-version * Update version database * [pagmo2] Fix vcpkg.json * update version * wip update * versions * [embree2] deprecate, [openvdb,usd] resolve conflicts, [tbb] update * Added libxml port. * Remove port version as it's initial port. * Added baseline version * Support only for windows and static * Allowed building debug version * update versions * Update ports/libxpm/portfile.cmake Co-authored-by: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> * Added new lines * Update ports/libxpm/vcpkg.json Co-authored-by: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> * Update ports/libxpm/portfile.cmake Co-authored-by: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> * Update ports/libxpm/vcpkg.json Co-authored-by: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> * Regenerated versions * Update ports/libxpm/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Libxpm is taken from gitlab now. * Dropped changes against master in original repo for libxpm. * Dropped libxpm from baseline * Dropped version for libxpm * Update cpuinfo * Updated date of version * Update version database * Removed support for arm32 & uwp as library is not supporting it. * Version regenerated * Update ports/cpuinfo/vcpkg.json Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> * Updated versions * Initial commit WIP * Fixed compilation of latest stable version * Dropped comments * Switch from version-string to version * Added versions * Fixed path of cmake files for other projects * Updated versions * Various modernization. * Fully mark embree2 as deprecated. * [pagmo2] Disable -Werror * [cctag] Fix finding and use of TBB. * [openvdb] Baseline the static versions because they exceed FFFFFFFF in size, and I'm not sure if that's fixable.... * [gazebo] Apply https://github.com/osrf/gazebo/pull/3174 patch to fix TBB. * Respond to failures in https://dev.azure.com/vcpkg/public/_build/results?buildId=76586 * [pagmo2] Add license. See https://github.com/esa/pagmo2/blob/19d774fbb6128124305225803f8c1ad9e2f95c8c/src/bfe.cpp#L5-L27 * [tbb] Add license. * [embree2] Add "license". * [tbb] Use vcpkg_cmake_config_fixup and fix version as requested by @LilyWangLL * [usd] Add usd is known broken message. * [embree2] Remove completely. * Fix version database. * Fix usd version database. * Fix wrong case on Linux. * Lowercase the tbb directory to get to their configs. * [cctag] minimize patches * [tbb] Apply supports expression fix suggested in https://github.com/microsoft/vcpkg/pull/26284#discussion_r967427833 * [usd] Add note about upstream issue. * [pagmo2] Minimize patch. Co-authored-by: Robert Schumacher <roschuma@microsoft.com> Co-authored-by: Jonliu1993 <13720414433@163.com> Co-authored-by: Mathis Logemann <mathisloge@gmail.com> Co-authored-by: Victor Romero <viromer@microsoft.com> Co-authored-by: Vladimír Aubrecht <vladimir.aubrecht@me.com> Co-authored-by: Thomas1664 <46387399+Thomas1664@users.noreply.github.com> Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com>
2022-09-24 03:03:33 +08:00
message(STATUS [=[
The usd port does not work the the version of Threading Building Blocks (tbb) currently chosen by vcpkg's baselines,
and does not expect to be updated to work with current versions soon. See
https://github.com/PixarAnimationStudios/USD/issues/1600
If you must use this port in your project, pin a version of tbb of 2020_U3 or older via a manifest file.
See https://vcpkg.io/en/docs/examples/versioning.getting-started.html for instructions.
]=])
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO PixarAnimationStudios/USD
REF 71b4baace2044ea4400ba802e91667f9ebe342f0 # v20.08
SHA512 0f23b84d314d88d3524f22ebc344e2b506cb7e8ac064726df432a968a4bae0fd2249e968bd10845de9067290eaaa3f8c9e2a483551ffc06b826f3eba816061a9
HEAD_REF master
PATCHES
fix_build-location.patch
)
vcpkg_find_acquire_program(PYTHON2)
get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY)
vcpkg_add_to_path("${PYTHON2_DIR}")
IF (VCPKG_TARGET_IS_WINDOWS)
ELSE()
file(REMOVE ${SOURCE_PATH}/cmake/modules/FindTBB.cmake)
ENDIF()
2022-10-06 05:59:14 +08:00
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DPXR_BUILD_ALEMBIC_PLUGIN:BOOL=OFF
-DPXR_BUILD_EMBREE_PLUGIN:BOOL=OFF
-DPXR_BUILD_IMAGING:BOOL=OFF
-DPXR_BUILD_MAYA_PLUGIN:BOOL=OFF
-DPXR_BUILD_MONOLITHIC:BOOL=OFF
-DPXR_BUILD_TESTS:BOOL=OFF
-DPXR_BUILD_USD_IMAGING:BOOL=OFF
-DPXR_ENABLE_PYTHON_SUPPORT:BOOL=OFF
-DPXR_BUILD_EXAMPLES:BOOL=OFF
-DPXR_BUILD_TUTORIALS:BOOL=OFF
-DPXR_BUILD_USD_TOOLS:BOOL=OFF
)
2022-10-06 05:59:14 +08:00
vcpkg_cmake_install()
file(
RENAME
"${CURRENT_PACKAGES_DIR}/pxrConfig.cmake"
"${CURRENT_PACKAGES_DIR}/cmake/pxrConfig.cmake")
2022-10-06 05:59:14 +08:00
vcpkg_cmake_config_fixup(CONFIG_PATH cmake PACKAGE_NAME pxr)
vcpkg_copy_pdbs()
# Remove duplicates in debug folder
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
# Move all dlls to bin
file(GLOB RELEASE_DLL ${CURRENT_PACKAGES_DIR}/lib/*.dll)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
file(GLOB DEBUG_DLL ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
foreach(CURRENT_FROM ${RELEASE_DLL} ${DEBUG_DLL})
string(REPLACE "/lib/" "/bin/" CURRENT_TO ${CURRENT_FROM})
file(RENAME ${CURRENT_FROM} ${CURRENT_TO})
endforeach()
function(file_replace_regex filename match_string replace_string)
file(READ ${filename} _contents)
string(REGEX REPLACE "${match_string}" "${replace_string}" _contents "${_contents}")
file(WRITE ${filename} "${_contents}")
endfunction()
# fix dll path for cmake
file_replace_regex(${CURRENT_PACKAGES_DIR}/share/pxr/pxrConfig.cmake "/cmake/pxrTargets.cmake" "/pxrTargets.cmake")
file_replace_regex(${CURRENT_PACKAGES_DIR}/share/pxr/pxrTargets-debug.cmake "debug/lib/([a-zA-Z0-9_]+)\\.dll" "debug/bin/\\1.dll")
file_replace_regex(${CURRENT_PACKAGES_DIR}/share/pxr/pxrTargets-release.cmake "lib/([a-zA-Z0-9_]+)\\.dll" "bin/\\1.dll")
# fix plugInfo.json for runtime
file(GLOB_RECURSE PLUGINFO_FILES ${CURRENT_PACKAGES_DIR}/lib/usd/*/resources/plugInfo.json)
file(GLOB_RECURSE PLUGINFO_FILES_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/usd/*/resources/plugInfo.json)
foreach(PLUGINFO ${PLUGINFO_FILES} ${PLUGINFO_FILES_DEBUG})
file_replace_regex(${PLUGINFO} [=["LibraryPath": "../../([a-zA-Z0-9_]+).dll"]=] [=["LibraryPath": "../../../bin/\1.dll"]=])
endforeach()