vcpkg/ports/cgns/portfile.cmake

92 lines
3.0 KiB
CMake
Raw Normal View History

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO CGNS/CGNS
REF ec538ac11dbaff510464a831ef094b0d6bf7216c # v4.3.0
SHA512 3c04829ff99c0f4f1cd705f0807fda0a65f970c7eecd23ec624cf09fb6fa2a566c63fc94d46c1d0754910bbff8f98c3723e4f32ef66c3e7e41930313454fa10b
HEAD_REF develop
PATCHES
hdf5.patch
linux_lfs.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"fortran" CGNS_ENABLE_FORTRAN
"tests" CGNS_ENABLE_TESTS
"hdf5" CGNS_ENABLE_HDF5
"lfs" CGNS_ENABLE_LFS
"legacy" CGNS_ENABLE_LEGACY
)
set(CGNS_BUILD_OPTS "")
if(VCPKG_TARGET_ARCHITECTURE MATCHES "64")
list(APPEND CGNS_BUILD_OPTS "-DCGNS_ENABLE_64BIT=ON")
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=ON;-DCGNS_USE_SHARED=ON")
else()
list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=OFF;-DCGNS_USE_SHARED=OFF")
endif()
# By default, when possible, vcpkg_cmake_configure uses ninja-build as its build system
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
${CGNS_BUILD_OPTS}
[seacas/vtkm/vtk/paraview] Add/update ports. (#27928) * [cgns] update to 4.2.0 * [vtk-m] update to 1.6.0 * [vtk] Update to 9.0.1-pv5.9.1 - VTK update to match release version of ParaView * [ParaView] Update to 5.9.1 * version stuff * fix automatic svg linkage in static builds * update qt5-svg * revisit vtk - fix build with vtk-m 1.6 - remove unused patches - remove comments * bump version * remove two commented lines * version stuff * remove old PR version * commit stuff * commit stuff * update notes * wip commit * update paraview * fix hdf5 patch * fix patch * fix patch * fix portfile * add mpi feature * format manifest * use relativ path * trace * retry * move qml files again * try with host triplet * - use VCPKG_CRT_LINKAGE - use METIS not metis * fix casing Zlib * hopefully more fixes on other platforms. * fix patch * fix missing ws * fix typos * scale down to warning * revert jsoncpp change fix zoltan on osx? * move trace option to failing port * move trace option to failing port * Revert "trilinos vcpkg.json changes" * verdict fix osx build ? * fix patch * fix internal find_package call * also apply correct case for metis * disable METIS on osx * vtk-m don't support arm. * force more features in Ci * fix missing , * more fixes * more vtk python try and error. * - paraview python setup same as vtk - remove openvr from platforms not supporting it - trace openimageio * fix case and remove fmt for openimageio. * trying to fix stuff * set hash to 0 * [skip actions] add missing module * WebCore module moved to paraview&python * fixes * remove patch in vtk-dicom * add var to maybe unused * use correct 5.11 ref instead of the one in release * Patch cleanup round 1 * remove empty patch parts * fix vtkm configs * reintegrate jsoncpp.patch * fix patch * add single seacas/kokkos/zoltan ports * throw out trilinos, zoltan, kokkos replace trilinos with seacas make seacas work for dynamic windows * fix mpi feature * fix dependency * retry dep fix * rename target * remove double line * fix target * fix patch * retry * remove cgns config * fix cgns * no seacas trace * lowercase hdf5 target * fix case of metis * disable Fortran * add iotr patch * add additional config folder * handel case sensitive Seacas again * get trace again and force jsoncpp * update cmake to 3.25.0 * bump port-version * add patch from vtk upstream * cleanup, format-manifest * fix port version * v db * opencv4 always inject deps. * fix test port to not require stuff which is not supported on x86 * Fix HDF5 lookup in opencv4 * only delete bin folder in static builds * add license field * v db * add missing " * v db * trace again * fix rtabmap python dep * fix openimageio by deleting the find module * v db * cr cleanup * v db * opencv4 v db due to merge with master. Had to bump port version * v db * v db * v db * CR comments * v db for cr comments * trace theia output * revert theia trace * v db * try without patch * revert rtabmap changes * v db after merge * v db for all
2023-01-20 09:55:56 +08:00
-DCGNS_ENABLE_SCOPING:BOOL=ON
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
# Moves all *.cmake files from /debug/lib/cmake/cgns/ to /share/cgns/
# See /docs/maintainers/ports/vcpkg-cmake-config/vcpkg_cmake_config_fixup.md for more details
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/cgns")
vcpkg_copy_tools(
TOOL_NAMES
cgnscheck
cgnscompress
cgnsconvert
cgnsdiff
cgnslist
cgnsnames
AUTO_CLEAN
)
if(VCPKG_TARGET_IS_WINDOWS)
set(TOOLS "adf2hdf.bat" "hdf2adf.bat" "cgnsupdate.bat")
elseif(VCPKG_TARGET_IS_LINUX)
2023-06-22 08:56:55 +08:00
set(TOOLS "cgnsupdate")
if("hdf5" IN_LIST FEATURES)
list(APPEND TOOLS "adf2hdf" "hdf2adf")
endif()
endif()
foreach(TOOL ${TOOLS})
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${TOOL}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${TOOL}")
endforeach()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin" "${CURRENT_PACKAGES_DIR}/bin")
endif()
if (EXISTS "${CURRENT_PACKAGES_DIR}/debug")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
endif()
file(REMOVE "${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs" "${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h")
file(INSTALL "${CURRENT_PORT_DIR}/cgnsconfig.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") # the include is all that is needed
[seacas/vtkm/vtk/paraview] Add/update ports. (#27928) * [cgns] update to 4.2.0 * [vtk-m] update to 1.6.0 * [vtk] Update to 9.0.1-pv5.9.1 - VTK update to match release version of ParaView * [ParaView] Update to 5.9.1 * version stuff * fix automatic svg linkage in static builds * update qt5-svg * revisit vtk - fix build with vtk-m 1.6 - remove unused patches - remove comments * bump version * remove two commented lines * version stuff * remove old PR version * commit stuff * commit stuff * update notes * wip commit * update paraview * fix hdf5 patch * fix patch * fix patch * fix portfile * add mpi feature * format manifest * use relativ path * trace * retry * move qml files again * try with host triplet * - use VCPKG_CRT_LINKAGE - use METIS not metis * fix casing Zlib * hopefully more fixes on other platforms. * fix patch * fix missing ws * fix typos * scale down to warning * revert jsoncpp change fix zoltan on osx? * move trace option to failing port * move trace option to failing port * Revert "trilinos vcpkg.json changes" * verdict fix osx build ? * fix patch * fix internal find_package call * also apply correct case for metis * disable METIS on osx * vtk-m don't support arm. * force more features in Ci * fix missing , * more fixes * more vtk python try and error. * - paraview python setup same as vtk - remove openvr from platforms not supporting it - trace openimageio * fix case and remove fmt for openimageio. * trying to fix stuff * set hash to 0 * [skip actions] add missing module * WebCore module moved to paraview&python * fixes * remove patch in vtk-dicom * add var to maybe unused * use correct 5.11 ref instead of the one in release * Patch cleanup round 1 * remove empty patch parts * fix vtkm configs * reintegrate jsoncpp.patch * fix patch * add single seacas/kokkos/zoltan ports * throw out trilinos, zoltan, kokkos replace trilinos with seacas make seacas work for dynamic windows * fix mpi feature * fix dependency * retry dep fix * rename target * remove double line * fix target * fix patch * retry * remove cgns config * fix cgns * no seacas trace * lowercase hdf5 target * fix case of metis * disable Fortran * add iotr patch * add additional config folder * handel case sensitive Seacas again * get trace again and force jsoncpp * update cmake to 3.25.0 * bump port-version * add patch from vtk upstream * cleanup, format-manifest * fix port version * v db * opencv4 always inject deps. * fix test port to not require stuff which is not supported on x86 * Fix HDF5 lookup in opencv4 * only delete bin folder in static builds * add license field * v db * add missing " * v db * trace again * fix rtabmap python dep * fix openimageio by deleting the find module * v db * cr cleanup * v db * opencv4 v db due to merge with master. Had to bump port version * v db * v db * v db * CR comments * v db for cr comments * trace theia output * revert theia trace * v db * try without patch * revert rtabmap changes * v db after merge * v db for all
2023-01-20 09:55:56 +08:00
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/cgnslib.h" "defined(USE_DLL)" "1")
endif()
# Handle copyright
configure_file("${SOURCE_PATH}/license.txt" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)