2018-03-02 04:47:03 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
2018-10-19 17:55:52 +08:00
|
|
|
set(PLATFORM x86)
|
2018-03-02 04:47:03 +08:00
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
2018-10-19 17:55:52 +08:00
|
|
|
set(PLATFORM x64)
|
2018-03-02 04:47:03 +08:00
|
|
|
else()
|
2018-10-19 17:55:52 +08:00
|
|
|
message(FATAL_ERROR "Unsupported architecture")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME)
|
|
|
|
message(FATAL_ERROR "Unsupported platform. ECSUTIL currently only supports windows desktop.")
|
2018-03-02 04:47:03 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
set(ECSUtil_CONFIGURATION_RELEASE Release)
|
|
|
|
set(ECSUtil_CONFIGURATION_DEBUG Debug)
|
|
|
|
else()
|
2018-10-19 17:55:52 +08:00
|
|
|
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
|
|
set(ECSUtil_CONFIGURATION_RELEASE "Release Lib")
|
|
|
|
set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib")
|
|
|
|
else()
|
|
|
|
set(ECSUtil_CONFIGURATION_RELEASE "Release Lib Static")
|
|
|
|
set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib Static")
|
|
|
|
endif()
|
2018-03-02 04:47:03 +08:00
|
|
|
endif()
|
|
|
|
|
2018-10-19 17:55:52 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO EMCECS/ecs-object-client-windows-cpp
|
2019-01-08 07:56:15 +08:00
|
|
|
REF v1.0.2.1
|
|
|
|
SHA512 4bb6c223ed562bdb239dc923ea0cfa7b78c1d61c7927017466c08207bffe638ecf3355d581c0a42d8bd966c38420e368b4762fc46a85c14bf071a1136e382451
|
2018-10-19 17:55:52 +08:00
|
|
|
HEAD_REF master
|
2018-12-04 01:24:45 +08:00
|
|
|
PATCHES NoLibSyms.patch
|
2018-03-02 04:47:03 +08:00
|
|
|
)
|
|
|
|
|
2018-10-19 17:55:52 +08:00
|
|
|
vcpkg_install_msbuild(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PROJECT_SUBPATH ECSUtil.sln
|
|
|
|
PLATFORM ${PLATFORM}
|
|
|
|
LICENSE_SUBPATH license.txt
|
|
|
|
TARGET ECSUtil
|
2018-03-02 04:47:03 +08:00
|
|
|
RELEASE_CONFIGURATION ${ECSUtil_CONFIGURATION_RELEASE}
|
|
|
|
DEBUG_CONFIGURATION ${ECSUtil_CONFIGURATION_DEBUG}
|
|
|
|
)
|
|
|
|
|
2018-10-23 21:06:58 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
2018-03-02 04:47:03 +08:00
|
|
|
endif()
|
|
|
|
|
2018-10-19 17:34:26 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/ECSUtil DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h)
|
2018-10-19 17:55:52 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/ECSUtil/res ${CURRENT_PACKAGES_DIR}/tools)
|
|
|
|
file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/NatvisAddIn.dll ${CURRENT_PACKAGES_DIR}/debug/bin/NatvisAddIn.dll)
|
2018-10-25 03:41:19 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|