2019-05-03 13:57:43 +08:00
|
|
|
include(vcpkg_common_functions)
|
|
|
|
|
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
2017-05-17 18:05:54 +08:00
|
|
|
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
|
|
message(FATAL_ERROR "Sciter only supports Windows Desktop")
|
2017-05-12 02:33:52 +08:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# header-only library
|
2017-04-19 05:03:31 +08:00
|
|
|
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
|
|
|
|
|
2019-01-15 04:09:51 +08:00
|
|
|
set(SCITER_REVISION c926703b2cce972875e7f6379c525eef66c95986)
|
|
|
|
set(SCITER_SHA 9a87ce12db9b2ef1e3abce3e475a9413a8a9301bab3d17341c94d4281e3bf616347ba8a4089f756ec38fed311bb4ee9045c8f85d0c40039ed3c0b96413aceeb4)
|
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-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}
|
2019-10-08 01:35:13 +08:00
|
|
|
PATCHES
|
|
|
|
0001_patch_stdafx.patch
|
2017-05-12 02:33:52 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# 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 "*.cpp"
|
2018-05-21 21:00:12 +08:00
|
|
|
PATTERN "*.mm"
|
2017-05-12 02:33:52 +08:00
|
|
|
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)
|
2018-05-21 21:00:12 +08:00
|
|
|
set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
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
|
2018-05-21 21:00:12 +08:00
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
|
|
set(SCITER_BIN ${SOURCE_PATH}/bin.gtk/x64)
|
|
|
|
|
|
|
|
file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS})
|
|
|
|
|
|
|
|
file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
|
|
|
|
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
|
|
|
set(SCITER_BIN ${SOURCE_PATH}/bin.osx)
|
|
|
|
|
|
|
|
file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${SCITER_TOOLS})
|
2017-04-19 05:03:31 +08:00
|
|
|
|
2018-05-21 21:00:12 +08:00
|
|
|
file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
2017-04-19 05:03:31 +08:00
|
|
|
|
2018-05-21 21:00:12 +08:00
|
|
|
else()
|
|
|
|
set(SCITER_BIN ${SOURCE_PATH}/bin/${SCITER_ARCH})
|
|
|
|
|
|
|
|
file(INSTALL ${SOURCE_PATH}/bin/packfolder.exe DESTINATION ${SCITER_TOOLS})
|
|
|
|
file(INSTALL ${SOURCE_PATH}/bin/tiscript.exe DESTINATION ${SCITER_TOOLS})
|
|
|
|
|
|
|
|
file(INSTALL ${SCITER_BIN}/sciter.exe DESTINATION ${SCITER_TOOLS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/inspector.exe DESTINATION ${SCITER_TOOLS})
|
|
|
|
file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${SCITER_TOOLS})
|
|
|
|
|
|
|
|
file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
|
|
|
file(INSTALL ${SCITER_BIN}/tiscript-sqlite.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
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.")
|