diff options
Diffstat (limited to 'libxerces-c/xercesc/buildfile')
-rw-r--r-- | libxerces-c/xercesc/buildfile | 73 |
1 files changed, 60 insertions, 13 deletions
diff --git a/libxerces-c/xercesc/buildfile b/libxerces-c/xercesc/buildfile index 7124293..88cf9b1 100644 --- a/libxerces-c/xercesc/buildfile +++ b/libxerces-c/xercesc/buildfile @@ -1,29 +1,54 @@ # file : xercesc/buildfile # license : Apache License 2.0; see accompanying LICENSE file +network = $config.libxerces_c.network +transcoder_icu = $config.libxerces_c.transcoder_icu + +intf_libs = # Interface dependencies. +impl_libs = # Implementation dependencies. + # Note that the installed util/NetAccessors/Curl/CurlURLInputStream.hpp # includes the libcurl headers. # -import int_libs = libcurl%lib{curl} +if $network + import intf_libs += libcurl%lib{curl} -import imp_libs = libicuuc%lib{icuuc} -import imp_libs += libicui18n%lib{icui18n} +if $transcoder_icu +{ + import impl_libs += libicuuc%lib{icuuc} + import impl_libs += libicui18n%lib{icui18n} +} -lib{xerces-c}: {h }{config } \ - {hxx txx cxx}{*/** -util/FileManagers/** -util/XercesVersion} \ - {hxx }{ util/XercesVersion} \ - $int_libs $imp_libs +lib{xerces-c}: {h }{config} \ + {hxx txx cxx}{*/** -util/FileManagers/** \ + -util/NetAccessors/** \ + -util/Transcoders/** \ + -util/XercesVersion} \ + {hxx }{ util/XercesVersion} tclass = $cxx.target.class tsys = $cxx.target.system -windows = ($tclass == 'windows') +macos = ($tclass == 'macos') +windows = ($tclass == 'windows') lib{xerces-c}: {h c}{stricmp strnicmp} \ util/FileManagers/{hxx cxx}{PosixFileMgr }: include = (!$windows) lib{xerces-c}: util/FileManagers/{hxx cxx}{WindowsFileMgr}: include = $windows +lib{xerces-c}: util/NetAccessors/Curl/{hxx cxx}{*}: include = $network + +lib{xerces-c}: util/Transcoders/ICU/{hxx cxx}{*}: include = $transcoder_icu + +lib{xerces-c}: util/Transcoders/MacOSUnicodeConverter/{hxx cxx}{*}: \ +include = (!$transcoder_icu && $macos) + +lib{xerces-c}: util/Transcoders/Win32/{hxx cxx}{*}: \ +include = (!$transcoder_icu && $windows) + +lib{xerces-c}: $intf_libs $impl_libs + # Include the generated version header into the distribution (so that we # don't pick up an installed one) and don't remove it when cleaning in src (so # that clean results in a state identical to distributed). @@ -44,6 +69,16 @@ util/hxx{XercesVersion}: util/in{XercesVersion} $src_root/manifest # Build options. # +if $network + cc.poptions += -DXERCES_USE_NETACCESSOR_CURL=1 + +if $transcoder_icu + cc.poptions += -DXERCES_USE_TRANSCODER_ICU=1 +elif $macos + cc.poptions += -DXERCES_USE_TRANSCODER_MACOSUNICODECONVERTER=1 +elif $windows + cc.poptions += -DXERCES_USE_TRANSCODER_WINDOWS=1 + cc.poptions += -DXERCES_BUILDING_LIBRARY -DHAVE_CONFIG_H -D_THREAD_SAFE if $windows @@ -91,7 +126,8 @@ switch $tclass, $tsys # cxx.loptions += -Wl,--no-undefined - cxx.libs += -lws2_32 + if $network + cxx.libs += -lws2_32 } case 'windows' { @@ -99,7 +135,11 @@ switch $tclass, $tsys # cxx.aoptions += /IGNORE:4221 - cxx.libs += ws2_32.lib + if! $transcoder_icu + cxx.libs += advapi32.lib + + if $network + cxx.libs += ws2_32.lib } case 'linux' { @@ -107,11 +147,18 @@ switch $tclass, $tsys # cxx.loptions += -Wl,--no-undefined - cxx.libs += -lm -lpthread + cxx.libs += -lm -pthread + } + case 'macos' + { + if! $transcoder_icu + cxx.libs += -framework CoreServices + + cxx.libs += -pthread } default { - cxx.libs += -lpthread + cxx.libs += -pthread } } @@ -120,7 +167,7 @@ switch $tclass, $tsys lib{xerces-c}: { cxx.export.poptions = "-I$out_root" "-I$src_root" - cxx.export.libs = $int_libs + cxx.export.libs = $intf_libs } liba{xerces-c}: cxx.export.poptions += -DLIBXERCES_C_STATIC |