2018-06-16 11:20:05 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
|
|
|
|
message("tinyobjloader doesn't support dynamic linkage on Windows. Building static instead.")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
include(vcpkg_common_functions)
|
2019-01-23 15:58:10 +08:00
|
|
|
|
2018-06-16 11:20:05 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO syoyo/tinyobjloader
|
2019-01-23 15:58:10 +08:00
|
|
|
REF v1.4.1
|
|
|
|
SHA512 5b18fed89435a95fb3fc89829ea6904b4cc4508b0907642b39194e3e3c55678ddc1c07687e4b7ea171f270f7188ca593ed53b828c022667e54a889c36c60373e
|
2018-06-16 11:20:05 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DCMAKE_INSTALL_DOCDIR:STRING=share/tinyobjloader
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
2019-01-23 15:58:10 +08:00
|
|
|
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/tinyobjloader/cmake")
|
2018-06-16 11:20:05 +08:00
|
|
|
|
|
|
|
file(
|
|
|
|
REMOVE_RECURSE
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/include
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/share
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib/tinyobjloader
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib/tinyobjloader
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
# Put the licence file where vcpkg expects it
|
|
|
|
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyobjloader/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinyobjloader/copyright)
|