mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-02 15:41:36 +02:00
Poco 1.9.0: Additional fixes for PDF and Encodings (#2169)
* Update gradle for the Encodings module Signed-off-by: Francis ANDRE <francis.andre.kampbell@orange.fr> * Add new PDF c++ files to VS projects * Update gradle build
This commit is contained in:
parent
488d8e05c2
commit
d993fb09b7
46
Encodings/build.gradle
Normal file
46
Encodings/build.gradle
Normal file
@ -0,0 +1,46 @@
|
||||
model {
|
||||
components {
|
||||
Encodings(NativeLibrarySpec) {
|
||||
sources {
|
||||
rc {
|
||||
source {
|
||||
srcDir '..'
|
||||
include 'DLLVersion.rc'
|
||||
}
|
||||
}
|
||||
c {
|
||||
source {
|
||||
srcDir 'src'
|
||||
include '**/*.c'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDir 'include'
|
||||
}
|
||||
lib project: ':Foundation', library: 'Foundation'
|
||||
}
|
||||
cpp {
|
||||
source {
|
||||
srcDir 'src'
|
||||
include '**/*.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDir 'include'
|
||||
}
|
||||
lib project: ':Foundation', library: 'Foundation'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
binaries {
|
||||
withType(SharedLibraryBinarySpec) {
|
||||
if (toolChain in VisualCpp) {
|
||||
cCompiler.define "Encodings_EXPORTS"
|
||||
cppCompiler.define "Encodings_EXPORTS"
|
||||
}
|
||||
}
|
||||
withType(StaticLibraryBinarySpec) {
|
||||
}
|
||||
}
|
||||
}
|
||||
task poco { dependsOn "assemble" }
|
||||
|
30
Encodings/samples/build.gradle
Normal file
30
Encodings/samples/build.gradle
Normal file
@ -0,0 +1,30 @@
|
||||
model {
|
||||
components {
|
||||
TextConverter(NativeExecutableSpec) {
|
||||
sources {
|
||||
cpp.source { srcDir 'TextConverter/src' include '**/*.cpp' }
|
||||
cpp.lib project: ':Encodings', library: 'Encodings'
|
||||
cpp.lib project: ':Foundation', library: 'Foundation'
|
||||
}
|
||||
}
|
||||
}
|
||||
binaries {
|
||||
all {
|
||||
}
|
||||
withType(SharedLibraryBinarySpec) {
|
||||
lib project: ':Encodings', library: 'Encodings', linkage: 'shared'
|
||||
lib project: ':Foundation', library: 'Foundation', linkage: 'shared'
|
||||
}
|
||||
withType(StaticLibraryBinarySpec) {
|
||||
lib project: ':Encodings', library: 'Encodings', linkage: 'static'
|
||||
lib project: ':Foundation', library: 'Foundation', linkage: 'static'
|
||||
}
|
||||
withType(NativeExecutableSpec) {
|
||||
lib project: ':Encodings', library: 'Encodings', linkage: 'static'
|
||||
lib project: ':Foundation', library: 'Foundation', linkage: 'static'
|
||||
}
|
||||
}
|
||||
}
|
||||
task samples { dependsOn "assemble" }
|
||||
|
||||
|
81
Encodings/testsuite/build.gradle
Normal file
81
Encodings/testsuite/build.gradle
Normal file
@ -0,0 +1,81 @@
|
||||
import org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteSpec
|
||||
|
||||
model {
|
||||
components {
|
||||
withType(NativeComponentSpec) {
|
||||
binaries.withType(NativeBinarySpec) {
|
||||
if (buildType == buildTypes.debug) {
|
||||
if (it instanceof NativeExecutableBinarySpec) {
|
||||
executable.file = toLocalBin(appendDebugSuffix(executable.file), targetPlatform)
|
||||
}
|
||||
} else
|
||||
if (buildType == buildTypes.release) {
|
||||
if (it instanceof NativeExecutableBinarySpec) {
|
||||
executable.file = toLocalBin(executable.file, targetPlatform)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
TestSuite(NativeLibrarySpec) { m ->
|
||||
sources {
|
||||
cpp {
|
||||
source {
|
||||
srcDir 'src'
|
||||
include '**/*.cpp'
|
||||
exclude 'Win*.cpp'
|
||||
exclude 'Driver.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDir 'src'
|
||||
}
|
||||
lib project: ':CppUnit', library: 'CppUnit', linkage: 'shared'
|
||||
lib project: ':Encodings', library: 'Encodings', linkage: 'shared'
|
||||
lib project: ':Foundation', library: 'Foundation', linkage: 'shared'
|
||||
}
|
||||
}
|
||||
binaries.all {
|
||||
if (targetPlatform.operatingSystem.windows) {
|
||||
sources {
|
||||
platformWindows(CppSourceSet) {
|
||||
lib m.sources.cpp
|
||||
source {
|
||||
srcDir 'src'
|
||||
include 'Win*.cpp'
|
||||
exclude '*Driver.cpp'
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDir 'src'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
testSuites {
|
||||
UtilTestSuite(org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteSpec) {
|
||||
testing $.components.TestSuite
|
||||
}
|
||||
}
|
||||
binaries {
|
||||
withType(org.gradle.nativeplatform.test.cppunit.CppUnitTestSuiteBinarySpec) {
|
||||
lib project: ':CppUnit', library: 'CppUnit', linkage: 'shared'
|
||||
if (toolChain in VisualCpp) {
|
||||
if (buildType == buildTypes.debug) {
|
||||
cCompiler.args "/MDd"
|
||||
cppCompiler.args "/MDd"
|
||||
} else
|
||||
if (buildType == buildTypes.release) {
|
||||
cCompiler.args "/MD"
|
||||
cppCompiler.args "/MD"
|
||||
} else {
|
||||
throw new GradleException("Unknown buildType" + buildType)
|
||||
}
|
||||
}
|
||||
if (toolChain in Gcc) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
task testsuite { dependsOn "assemble" }
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="debug_shared|Win32">
|
||||
@ -277,6 +277,8 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\adler32.c" />
|
||||
<ClCompile Include="src\AttributedString.cpp" />
|
||||
<ClCompile Include="src\Cell.cpp" />
|
||||
<ClCompile Include="src\compress.c" />
|
||||
<ClCompile Include="src\crc32.c" />
|
||||
<ClCompile Include="src\deflate.c" />
|
||||
@ -369,8 +371,10 @@
|
||||
<ClCompile Include="src\pngwrite.c" />
|
||||
<ClCompile Include="src\pngwtran.c" />
|
||||
<ClCompile Include="src\pngwutil.c" />
|
||||
<ClCompile Include="src\Table.cpp" />
|
||||
<ClCompile Include="src\TextAnnotation.cpp" />
|
||||
<ClCompile Include="src\trees.c" />
|
||||
<ClCompile Include="src\XMLTemplate.cpp" />
|
||||
<ClCompile Include="src\zutil.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
@ -327,6 +327,12 @@
|
||||
<ClCompile Include="src\hpdf_xref.c">
|
||||
<Filter>3rd Party\HARU\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLTemplate.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\AttributedString.cpp" />
|
||||
<ClCompile Include="src\Cell.cpp" />
|
||||
<ClCompile Include="src\Table.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\PDF\Destination.h">
|
||||
|
@ -390,6 +390,10 @@
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\AttributedString.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Cell.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Destination.cpp"/>
|
||||
<File
|
||||
@ -408,8 +412,12 @@
|
||||
RelativePath=".\src\Page.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PDFException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Table.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TextAnnotation.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLTemplate.cpp"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
|
@ -21,6 +21,7 @@ project(":PDF") {
|
||||
srcDirs 'include', 'include/Poco/PDF'
|
||||
}
|
||||
lib project: ':Util', library: 'Util'
|
||||
lib project: ':XML', library: 'XML'
|
||||
lib project: ':Foundation', library: 'Foundation'
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
rootProject.name = 'Poco'
|
||||
|
||||
include ':CppUnit'
|
||||
include ':Encodings'
|
||||
include ':Foundation'
|
||||
include ':XML'
|
||||
include ':JSON'
|
||||
@ -12,12 +13,12 @@ include ':NetSSL_OpenSSL'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win'
|
||||
}
|
||||
include ':Data'
|
||||
include ':SQL'
|
||||
if (os.windows) {
|
||||
include ':Data:ODBC'
|
||||
include ':Data:SQLite'
|
||||
include ':Data:MySQL'
|
||||
include ':Data:PostgreSQL'
|
||||
include ':SQL:ODBC'
|
||||
include ':SQL:SQLite'
|
||||
include ':SQL:MySQL'
|
||||
include ':SQL:PostgreSQL'
|
||||
}
|
||||
include ':Zip'
|
||||
include ':PageCompiler'
|
||||
@ -29,38 +30,40 @@ include ':Redis'
|
||||
include ':PocoDoc'
|
||||
include ':ProGen'
|
||||
|
||||
include ':Encodings:testsuite'
|
||||
include ':Foundation:testsuite'
|
||||
include ':XML:testsuite'
|
||||
include ':JSON:testsuite'
|
||||
include ':Util:testsuite'
|
||||
include ':Net:testsuite'
|
||||
include ':Crypto:testsuite'
|
||||
//include ':Crypto:testsuite'
|
||||
include ':NetSSL_OpenSSL:testsuite'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win:testsuite'
|
||||
}
|
||||
include ':Data:testsuite'
|
||||
include ':SQL:testsuite'
|
||||
if (os.windows) {
|
||||
include ':Data:ODBC:testsuite'
|
||||
include ':Data:SQLite:testsuite'
|
||||
include ':Data:MySQL:testsuite'
|
||||
include ':Data:PostgreSQL:testsuite'
|
||||
include ':SQL:ODBC:testsuite'
|
||||
include ':SQL:SQLite:testsuite'
|
||||
include ':SQL:MySQL:testsuite'
|
||||
include ':SQL:PostgreSQL:testsuite'
|
||||
}
|
||||
//include ':MongoDB:testsuite'
|
||||
include ':Redis:testsuite'
|
||||
include ':CppParser:testsuite'
|
||||
include ':Zip:testsuite'
|
||||
|
||||
include ':Encodings:samples'
|
||||
include ':Foundation:samples'
|
||||
if (os.windows) {
|
||||
include ':Data:samples'
|
||||
include ':SQL:samples'
|
||||
}
|
||||
include ':NetSSL_OpenSSL:samples'
|
||||
if (os.windows) {
|
||||
include ':NetSSL_Win:samples'
|
||||
}
|
||||
include ':JSON:samples'
|
||||
include ':MongoDB:samples'
|
||||
//include ':MongoDB:samples'
|
||||
include ':Net:samples'
|
||||
include ':PageCompiler:samples'
|
||||
include ':PDF:samples'
|
||||
|
Loading…
x
Reference in New Issue
Block a user