vcpkg/ports/flecs/portfile.cmake
Javier Peletier 272edfa75b
[flecs] update to 3.2.9 (#35122)
* [flecs] update to 3.2.9

* [flecs] update version database
2023-11-16 12:50:03 -08:00

39 lines
1.2 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO SanderMertens/flecs
REF "v${VERSION}"
SHA512 9573e57432ea6117b59e8dff9470e71ed2283d9ab0a16affbef2c3f73cc8dad3d00243482c9bb34b9ddc936ac2d7941eb35fd68443431fc9feb825d57beae1ba
HEAD_REF master
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FLECS_STATIC_LIBS)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FLECS_SHARED_LIBS)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DFLECS_STATIC=${FLECS_STATIC_LIBS}
-DFLECS_SHARED=${FLECS_SHARED_LIBS}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
if(FLECS_STATIC_LIBS)
vcpkg_replace_string(
"${CURRENT_PACKAGES_DIR}/include/${PORT}/bake_config.h"
"#ifndef flecs_STATIC"
"#if 0 // #ifndef flecs_STATIC"
)
endif()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")