mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-14 08:09:18 +08:00
a65248c5f9
* Update to 3.1.0. Options no longer have `_LIBS`. * Removed explicit non-support of UWP.
38 lines
1.2 KiB
CMake
38 lines
1.2 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO SanderMertens/flecs
|
|
REF v3.1.0
|
|
SHA512 422458818e4696359a2e0a3cf52b6d47b4fcfe792b483903cba9d0aad2beee574d1040b0d6286e158145226c8bb9ad897dd74cb87c9e3def0d89cb33e218b20d
|
|
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(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|