mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-30 20:59:12 +08:00
050e71d01d
* [various ports] remove references to CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [alac,benchmark,capnproto] Fix check_linkage call * [fastlz] Fix SHA512 * [coroutine] Fix dynamic build * [folly] Find double-conversion * [gamma] Use vcpkg_from_github * [librsync] Enable static builds * [netcdf-cxx4] Fix SHA512 * [octomap] Fix static build * [tidy-html5] Fix static build * [various ports] remove custom messages for shared/static builds, modernize some scripts in the meantime * [folly] Use ras0219's fix for link paths * [octomap] Fix exported targets * [uvatlas] Set tool download SHA512 * [duktape+python2] fix portfile to call configure with correct python version, manage python2 also outside win32 * [suitesparse] osx fix * [gtkmm] Call vcpkg_check_linkage after including vcpkg functions * [duktape] Resolve conflicts * [duktape] FIxed typo in Python paths * [wangle] Find zlib * [openssl-uwp] Fix SHA512 * [glib] Allow static builds on non-Windows * [suitesparse] Fix build on Windows * [multiple ports] Bump CONTROL version * [multiple ports] Fix description indent * [directxtk] Fix CONTROL file * [bde,duktape,qpid-proton] Build packages with python2 installed * [binn] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS * [gdal,live555,uriparser] Fix regressions * [live555] Update to 2019.04.24
100 lines
3.9 KiB
CMake
100 lines
3.9 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|
|
|
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
|
message(FATAL_ERROR "Sciter only supports Windows Desktop")
|
|
endif()
|
|
|
|
|
|
# header-only library
|
|
set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled)
|
|
|
|
set(SCITER_REVISION c926703b2cce972875e7f6379c525eef66c95986)
|
|
set(SCITER_SHA 9a87ce12db9b2ef1e3abce3e475a9413a8a9301bab3d17341c94d4281e3bf616347ba8a4089f756ec38fed311bb4ee9045c8f85d0c40039ed3c0b96413aceeb4)
|
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64)
|
|
set(SCITER_ARCH 64)
|
|
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
|
|
set(SCITER_ARCH 32)
|
|
endif()
|
|
|
|
|
|
# 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`
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO c-smile/sciter-sdk
|
|
REF ${SCITER_REVISION}
|
|
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 "*.cpp"
|
|
PATTERN "*.mm"
|
|
PATTERN "*.h"
|
|
PATTERN "*.hpp"
|
|
)
|
|
|
|
set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter)
|
|
set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter)
|
|
set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
|
|
# license
|
|
file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE})
|
|
file(COPY ${SOURCE_PATH}/license.htm DESTINATION ${SCITER_SHARE})
|
|
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})
|
|
|
|
# tools
|
|
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})
|
|
|
|
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)
|
|
|
|
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()
|
|
|
|
message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.")
|