2017-05-12 02:33:52 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
2017-05-17 18:05:54 +08:00
|
|
|
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")
|
2017-05-12 02:33:52 +08:00
|
|
|
endif()
|
|
|
|
|
2017-04-19 05:03:31 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
2017-05-12 02:33:52 +08:00
|
|
|
# header-only library
|
2017-04-19 05:03:31 +08:00
|
|
|
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
|
|
|
|
|
2018-04-24 12:37:05 +08:00
|
|
|
set(SCITER_REVISION 1f6f9afc6bf3c4f60ea510fc75f89634f282d15d)
|
|
|
|
set(SCITER_SHA 53be8007c22349e9801c413483d70cad437bc3399686f2c503da9b7aa96bf212e7563b13fff8e62942b0991fa775e87e542b5ff9c3dbc4aff1fd5291200b2c8e)
|
2017-04-19 05:03:31 +08:00
|
|
|
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
2017-05-12 02:33:52 +08:00
|
|
|
set(SCITER_ARCH 64)
|
2017-04-19 05:03:31 +08:00
|
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
|
2017-05-12 02:33:52 +08:00
|
|
|
set(SCITER_ARCH 32)
|
2017-04-19 05:03:31 +08:00
|
|
|
endif()
|
|
|
|
|
2017-12-20 13:56:32 +08:00
|
|
|
# check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz`
|
|
|
|
# hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz`
|
2017-05-12 02:33:52 +08:00
|
|
|
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}
|
|
|
|
)
|
|
|
|
|
2017-05-12 02:33:52 +08:00
|
|
|
# disable stdafx.h
|
|
|
|
vcpkg_apply_patches(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_patch_stdafx.patch
|
|
|
|
)
|
|
|
|
|
|
|
|
# install include directory
|
2017-05-17 18:05:54 +08:00
|
|
|
file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter
|
2017-05-12 02:33:52 +08:00
|
|
|
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)
|
2017-05-12 02:33:52 +08:00
|
|
|
set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter)
|
2017-04-19 05:03:31 +08:00
|
|
|
|
|
|
|
# license
|
2017-05-17 18:05:54 +08:00
|
|
|
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
|
2017-05-17 18:05:54 +08:00
|
|
|
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
|
2017-05-17 18:05:54 +08:00
|
|
|
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
|
|
|
|
2017-05-17 18:05:54 +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
|
|
|
|
2017-05-17 18:05:54 +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
|
|
|
|
2017-05-17 18:05:54 +08:00
|
|
|
message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.")
|