vcpkg/ports/sciter/portfile.cmake

75 lines
2.7 KiB
CMake
Raw Normal View History

if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
message(STATUS "Warning: Sciter is only available under a free license as DLLs.")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "Sciter only supports Windows Desktop")
endif()
2017-04-19 05:03:31 +08:00
include(vcpkg_common_functions)
# header-only library
2017-04-19 05:03:31 +08:00
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
2017-06-12 15:07:31 +08:00
set(SCITER_VERSION 4.0.1.1)
set(SCITER_REVISION 5caaf6f5bd408fd45c30deb873ce76ae7af53819)
set(SCITER_SHA 88d332891a98fd80200ae04a7b5cc72a6edcbc123abe8147a17ac8e4189fbc4b7ed58f7acc06a6683ec3f1ed74e133115c35599751f6a31358b911e07b602ec4)
2017-04-19 05:03:31 +08:00
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
set(SCITER_ARCH 64)
2017-04-19 05:03:31 +08:00
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
set(SCITER_ARCH 32)
2017-04-19 05:03:31 +08:00
endif()
# check out
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO c-smile/sciter-sdk
REF ${SCITER_REVISION}
2017-04-19 05:03:31 +08:00
SHA512 ${SCITER_SHA}
)
# disable stdafx.h
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_patch_stdafx.patch
)
# install include directory
file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter
FILES_MATCHING
PATTERN "sciter-gtk-main.cpp" EXCLUDE
PATTERN "sciter-osx-main.mm" EXCLUDE
PATTERN "*.cpp"
PATTERN "*.h"
PATTERN "*.hpp"
)
2017-04-19 05:03:31 +08:00
set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter)
set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter)
2017-04-19 05:03:31 +08:00
# license
file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE})
file(COPY ${SOURCE_PATH}/license.htm DESTINATION ${SCITER_SHARE})
2017-04-19 05:03:31 +08:00
file(RENAME ${SCITER_SHARE}/license.htm ${SCITER_SHARE}/copyright)
# samples & widgets
file(COPY ${SOURCE_PATH}/samples DESTINATION ${SCITER_SHARE})
file(COPY ${SOURCE_PATH}/widgets DESTINATION ${SCITER_SHARE})
2017-04-19 05:03:31 +08:00
# tools
file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS})
2017-04-19 05:03:31 +08:00
file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/inspector.exe DESTINATION ${SCITER_TOOLS})
file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${SCITER_TOOLS})
2017-04-19 05:03:31 +08:00
file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
file(INSTALL ${SOURCE_PATH}/bin/${SCITER_ARCH}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
2017-04-19 05:03:31 +08:00
message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.")