2018-01-04 12:02:59 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2019-05-24 12:54:24 +08:00
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
message("unicorn-lib is a static library, now build with static.")
|
|
|
|
set(VCPKG_LIBRARY_LINKAGE static)
|
|
|
|
endif()
|
|
|
|
|
2018-01-04 12:02:59 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO CaptainCrowbar/unicorn-lib
|
2019-05-09 08:51:44 +08:00
|
|
|
REF 3e4e014bbf6fe24721a14c63f2a4f7ebfa401e7c
|
|
|
|
SHA512 f73f288fb50f9f727edfc84810a15f1fdde76df9030c4b0d5292351e84ec8cd6c8a7e670b2a62301a77521bf60ebcf1bf7c8c9d97ddb77385ed945b55075c927
|
2018-01-04 12:02:59 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-06-16 16:54:01 +08:00
|
|
|
PREFER_NINJA
|
2018-02-26 03:37:23 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DUNICORN_LIB_SKIP_HEADERS=ON
|
2018-01-04 12:02:59 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2019-05-24 12:54:24 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
2018-01-04 12:02:59 +08:00
|
|
|
# Handle copyright
|
2019-06-02 08:04:47 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/unicorn-lib RENAME copyright)
|