[scintilla] Use out of source builds. Detect static builds for fast fail.

This commit is contained in:
Robert Schumacher 2018-02-24 02:32:50 -08:00
parent 9bf1809e28
commit d90b38c122
2 changed files with 15 additions and 19 deletions

View File

@ -1,3 +1,3 @@
Source: scintilla
Version: 3.7.6
Version: 3.7.6-1
Description: A free source code editing component for Win32, GTK+, and OS X

View File

@ -1,23 +1,19 @@
# Common Ambient Variables:
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
# PORT = current port name (zlib, etc)
# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
#
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
message(FATAL_ERROR "scintilla only supports dynamic linkage")
endif()
if(VCPKG_CRT_LINKAGE STREQUAL "static")
message(FATAL_ERROR "scintilla only supports dynamic crt")
endif()
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/scintilla)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/scintilla)
vcpkg_download_distfile(ARCHIVE
URLS "http://www.scintilla.org/scintilla376.zip"
FILENAME "scintilla376.zip"
SHA512 618a50405eede3277d7696ac58122aeeb490d10ae392c60c7f78baaa96c965a8e1a599948e0ebd61bed7f75894b01bdf4574a0e5d0e20996bfdfb2e1bdb33203
URLS "http://www.scintilla.org/scintilla376.zip"
FILENAME "scintilla376.zip"
SHA512 618a50405eede3277d7696ac58122aeeb490d10ae392c60c7f78baaa96c965a8e1a599948e0ebd61bed7f75894b01bdf4574a0e5d0e20996bfdfb2e1bdb33203
)
vcpkg_extract_source_archive(${ARCHIVE})
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
if(TRIPLET_SYSTEM_ARCH MATCHES "x86")
set(BUILD_ARCH "Win32")
@ -26,8 +22,8 @@ else()
endif()
vcpkg_build_msbuild(
PROJECT_PATH ${SOURCE_PATH}/Win32/SciLexer.vcxproj
PLATFORM ${MSBUILD_PLATFORM}
PROJECT_PATH ${SOURCE_PATH}/Win32/SciLexer.vcxproj
PLATFORM ${MSBUILD_PLATFORM}
)
# Handle headers