vcpkg/ports/salome-configuration/portfile.cmake
Alexander Neumann a109b7ccb2
[salome-medcoupling] Add new port (#32916)
* [salome-configuration|medcoupling] new ports

* format manifest

* v db

* remove trace

* v db

* fix dep

* v db

* Apply suggestions from code review

Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>

* v db

* adjust SALOME_WITH_MPI depending on HDF5

* remove nuking of CMAKE_PREFIX_PATH from salome

* v db

* fix post build

* v db

* Fix med-fichier config on linux

* add supports

* format manifest

* v db

* don't want to investigate linux failure further

---------

Co-authored-by: jim wang <122244446+jimwang118@users.noreply.github.com>
2023-08-07 09:59:40 -07:00

21 lines
906 B
CMake

vcpkg_from_git(
OUT_SOURCE_PATH SOURCE_PATH_CONFIG
URL "https://git.salome-platform.org/gitpub/tools/configuration.git"
REF "25f724f7a6c0000330a40c3851dcd8bc2493e1fa"
)
file(COPY "${SOURCE_PATH_CONFIG}/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH_CONFIG}/copyright/CEA_EDF.txt")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-port-config.cmake" [[set(SALOME_CONFIGURATION_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}")]])
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/cmake/SalomeMacros.cmake" contents)
if(HDF5_WITH_PARALLEL)
string(PREPEND contents "set(SALOME_USE_MPI ON)\n")
endif()
string(REPLACE [[SET(CMAKE_PREFIX_PATH "${${_envvar}}")]] "" contents "${contents}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/cmake/SalomeMacros.cmake" "${contents}")