diff options
| author | Alek <25618925+alek-d@users.noreply.github.com> | 2020-09-23 01:28:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-22 16:28:25 -0700 |
| commit | 9a7b70b1a2bbc5bc9522566885a5adb674dc7ec7 (patch) | |
| tree | 13c91dee203dd9678b387e1110717ec593ab89f1 | |
| parent | 03d760cfda1b92b4c1d8a97e7417ad28c8150a52 (diff) | |
| download | vcpkg-9a7b70b1a2bbc5bc9522566885a5adb674dc7ec7.tar.gz vcpkg-9a7b70b1a2bbc5bc9522566885a5adb674dc7ec7.zip | |
[scintilla] Add static linking to Scintilla (#13529)
* Add static linking to Scintilla
* Add Port-Version to CONTROL
* Split library linkage from crt linkage
* Update CI baseline
* Remove vcpkg_copy_pdbs()
| -rw-r--r-- | ports/scintilla/0001-static-lib.patch | 14 | ||||
| -rw-r--r-- | ports/scintilla/0002-static-crt.patch | 37 | ||||
| -rw-r--r-- | ports/scintilla/CONTROL | 1 | ||||
| -rw-r--r-- | ports/scintilla/portfile.cmake | 12 | ||||
| -rw-r--r-- | scripts/ci.baseline.txt | 1 |
5 files changed, 62 insertions, 3 deletions
diff --git a/ports/scintilla/0001-static-lib.patch b/ports/scintilla/0001-static-lib.patch new file mode 100644 index 000000000..2661b0f2d --- /dev/null +++ b/ports/scintilla/0001-static-lib.patch @@ -0,0 +1,14 @@ +diff --git a/win32/SciLexer.vcxproj b/win32/SciLexer.vcxproj
+index b2e993c..c8774f1 100644
+--- a/win32/SciLexer.vcxproj
++++ b/win32/SciLexer.vcxproj
+@@ -33,7 +33,7 @@
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+--
diff --git a/ports/scintilla/0002-static-crt.patch b/ports/scintilla/0002-static-crt.patch new file mode 100644 index 000000000..20268d7d9 --- /dev/null +++ b/ports/scintilla/0002-static-crt.patch @@ -0,0 +1,37 @@ +diff --git a/win32/SciLexer.vcxproj b/win32/SciLexer.vcxproj
+index b2e993c..c8774f1 100644
+--- a/win32/SciLexer.vcxproj
++++ b/win32/SciLexer.vcxproj
+@@ -88,6 +88,7 @@
+ <ClCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <LanguageStandard>stdcpp17</LanguageStandard>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+@@ -97,6 +98,7 @@
+ <ClCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <LanguageStandard>stdcpp17</LanguageStandard>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+@@ -117,6 +119,7 @@
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <LanguageStandard>stdcpp17</LanguageStandard>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+@@ -129,6 +132,7 @@
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <LanguageStandard>stdcpp17</LanguageStandard>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+--
diff --git a/ports/scintilla/CONTROL b/ports/scintilla/CONTROL index 901697cc5..76065f659 100644 --- a/ports/scintilla/CONTROL +++ b/ports/scintilla/CONTROL @@ -1,4 +1,5 @@ Source: scintilla Version: 4.2.3 +Port-Version: 1 Homepage: https://www.scintilla.org/ Description: A free source code editing component for Win32, GTK+, and OS X diff --git a/ports/scintilla/portfile.cmake b/ports/scintilla/portfile.cmake index 788896bda..cf11392d1 100644 --- a/ports/scintilla/portfile.cmake +++ b/ports/scintilla/portfile.cmake @@ -1,16 +1,24 @@ vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") -vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) - vcpkg_download_distfile(ARCHIVE URLS "http://www.scintilla.org/scintilla423.zip" FILENAME "scintilla423.zip" SHA512 82a595782119ce5bb48c39f4cb9b29605c4cdc276f605ebd3e3b3ecae003ef2132102e21be8943c8b36ec40957e2e50f4ebc0086a5096901fa0e8e5e178db750 ) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND PATCHES 0001-static-lib.patch) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND PATCHES 0002-static-crt.patch) +endif() + vcpkg_extract_source_archive_ex( OUT_SOURCE_PATH SOURCE_PATH ARCHIVE ${ARCHIVE} REF 4.2.3 + PATCHES ${PATCHES} ) vcpkg_install_msbuild( diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 0c1833ee5..c0ea44810 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1516,7 +1516,6 @@ scintilla:arm-uwp=fail scintilla:x64-linux=fail scintilla:x64-osx=fail scintilla:x64-uwp=fail -scintilla:x64-windows-static=fail sciter:arm64-windows=fail sciter:arm-uwp=fail sciter:x64-uwp=fail |
