mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-05 03:17:52 +08:00
ba5cf5bba6
* add usage * update version * remove vcpkg-cmake-wrapper.cmake * update version * undo remove vcpkg-cmake-wrapper.cmake * update version --------- Co-authored-by: Monica <v-liumonica@microsoft.com>
39 lines
1.2 KiB
CMake
39 lines
1.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO SanderMertens/flecs
|
|
REF "v${VERSION}"
|
|
SHA512 18d55e58187840170d7ec11aea7711e854c53dd3d2bdcf458661c92178f5091231f97d869c8719f2b4713db53fd7e25917508288038f2be9edb91ff17606f62b
|
|
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")
|