2020-01-18 08:12:40 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO winsoft666/teemo
|
2022-05-11 02:36:17 +08:00
|
|
|
REF 03f40f92bfbf3b83dc597a60ba36582505adfa54
|
|
|
|
SHA512 86962883dfe09f90c4892deb0235e4f71fc295fb837e2b33a9bcf240b4f91d0e191157968d28a6ec02dfe3f8cb9a3869c6bb5986b8a0ea96250fce6c27fe1172
|
2020-01-18 08:12:40 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" TEEMO_STATIC)
|
2021-11-26 16:57:55 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_STATIC_CRT)
|
2020-01-18 08:12:40 +08:00
|
|
|
|
2021-11-17 08:25:28 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-01-18 08:12:40 +08:00
|
|
|
OPTIONS
|
|
|
|
-DTEEMO_STATIC:BOOL=${TEEMO_STATIC}
|
2021-11-26 16:57:55 +08:00
|
|
|
-DUSE_STATIC_CRT:BOOL=${USE_STATIC_CRT}
|
2020-01-18 08:12:40 +08:00
|
|
|
-DBUILD_TESTS:BOOL=OFF
|
|
|
|
)
|
|
|
|
|
2021-11-17 08:25:28 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-01-18 08:12:40 +08:00
|
|
|
|
2021-11-17 08:25:28 +08:00
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/teemo")
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/teemo)
|
|
|
|
elseif(EXISTS "${CURRENT_PACKAGES_DIR}/share/teemo")
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/teemo)
|
2020-01-18 08:12:40 +08:00
|
|
|
endif()
|
|
|
|
|
2021-12-31 01:52:00 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h" "#ifdef TEEMO_STATIC" "#if 1")
|
|
|
|
else()
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h" "#ifdef TEEMO_STATIC" "#if 0")
|
|
|
|
endif()
|
2020-01-18 08:12:40 +08:00
|
|
|
|
2021-11-17 08:25:28 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-01-18 08:12:40 +08:00
|
|
|
|
2021-11-17 08:25:28 +08:00
|
|
|
vcpkg_copy_pdbs()
|