CalPhorus

ICU4C_59.1-CMakeLists.txt

Jul 24th, 2017
7,854
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 22.86 KB | None | 0 0
  1. CMAKE_MINIMUM_REQUIRED( VERSION 3.8 )
  2. PROJECT( ICU4C CXX C )
  3. INCLUDE( CMakeDependentOption )
  4. INCLUDE( FindDoxygen )
  5. INCLUDE( ${CMAKE_CURRENT_SOURCE_DIR}/../../../../CMake/CheckAtomic.cmake )
  6. INCLUDE( ${CMAKE_CURRENT_SOURCE_DIR}/../../../../CMake/CheckHeader.cmake )
  7. INCLUDE( ${CMAKE_CURRENT_SOURCE_DIR}/../../../../CMake/CheckFunction.cmake )
  8.  
  9.  
  10. ###
  11. # Options
  12. ###
  13.  
  14. OPTION( ICU_BUILD_SHARED "Build ICU as a set of shared libraries?" ON )
  15. OPTION( ICU_BUILD_STATIC "Build ICU as a set of static libraries?" ON )
  16. OPTION( ICU_BUILD_MONOLITH "Build all ICU components into a shared or static library?" OFF )
  17. OPTION( ICU_BUILD_IO "Build the IO component of ICU?" ON )
  18. OPTION( ICU_BUILD_STUBDATA "Build the data used to bootstrap the tools?" ON )
  19. OPTION( ICU_BUILD_EXTRAS "Build ICU extras." ON )
  20. OPTION( ICU_BUILD_DATA "Build the default data used by ICU?" ON )
  21. OPTION( ICU_BUILD_TOOLS "Build the tools associated with generating data for ICU?" ON )
  22.  
  23. # Extras
  24. CMAKE_DEPENDENT_OPTION( ICU_BUILD_UCONV "Build uconv?" ON "ICU_BUILD_EXTRAS" OFF )
  25.  
  26. # Tools
  27. CMAKE_DEPENDENT_OPTION( ICU_BUILD_CTESTFW "Build ctestfw?" ON "ICU_BUILD_TOOLS" OFF )
  28. CMAKE_DEPENDENT_OPTION( ICU_BUILD_ESCAPESRC "Build escapesrc?" ON "ICU_BUILD_TOOLS" OFF )
  29. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENBRK "Build genbrk?" ON "ICU_BUILD_TOOLS" OFF )
  30. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENCCODE "Build genccode?" ON "ICU_BUILD_TOOLS" OFF )
  31. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENCFU "Build gencfu?" ON "ICU_BUILD_TOOLS" OFF )
  32. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENCMN "Build gencmn?" ON "ICU_BUILD_TOOLS" OFF )
  33. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENCNVAL "Build gencnval?" ON "ICU_BUILD_TOOLS" OFF )
  34. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENCOLUSB "Build gencolusb?" ON "ICU_BUILD_TOOLS" OFF )
  35. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENDICT "Build gendict?" ON "ICU_BUILD_TOOLS" OFF )
  36. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENNORM2 "Build gennorm2?" ON "ICU_BUILD_TOOLS" OFF )
  37. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENRB "Build genrb?" ON "ICU_BUILD_TOOLS" OFF )
  38. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENREN "Build genren?" ON "ICU_BUILD_TOOLS" OFF )
  39. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENSPREP "Build gensprep?" ON "ICU_BUILD_TOOLS" OFF )
  40. CMAKE_DEPENDENT_OPTION( ICU_BUILD_GENTEST "Build gentest?" ON "ICU_BUILD_TOOLS" OFF )
  41. CMAKE_DEPENDENT_OPTION( ICU_BUILD_ICUINFO "Build icuinfo?" ON "ICU_BUILD_TOOLS" OFF )
  42. CMAKE_DEPENDENT_OPTION( ICU_BUILD_ICUPKG "Build icupkg?" ON "ICU_BUILD_TOOLS" OFF )
  43. CMAKE_DEPENDENT_OPTION( ICU_BUILD_ICUSWAP "Build icuswap?" ON "ICU_BUILD_TOOLS" OFF )
  44. CMAKE_DEPENDENT_OPTION( ICU_BUILD_MAKECONV "Build makeconv?" ON "ICU_BUILD_TOOLS" OFF )
  45. CMAKE_DEPENDENT_OPTION( ICU_BUILD_PKGDATA "Build pkgdata?" ON "ICU_BUILD_TOOLS" OFF )
  46. CMAKE_DEPENDENT_OPTION( ICU_BUILD_TZCODE "Build tzcode?" ON "ICU_BUILD_TOOLS" OFF )
  47.  
  48. ###
  49. # Sanity check
  50. ###
  51.  
  52. IF( NOT ${ICU_BUILD_SHARED} AND NOT ${ICU_BUILD_STATIC} )
  53.     MESSAGE( FATAL_ERROR "At least one type of build must be selected (static, shared)." )
  54. ENDIF( NOT ${ICU_BUILD_SHARED} AND NOT ${ICU_BUILD_STATIC} )
  55.  
  56. IF( ICU_BUILD_TOOLS AND NOT ICU_BUILD_STUBDATA )
  57.     MESSAGE( WARNING "Building ICU stubdata, as it is required to bootstrap the tools." )
  58.     SET( ICU_BUILD_STUBDATA TRUE FORCE )
  59. ENDIF( ICU_BUILD_TOOLS AND NOT ICU_BUILD_STUBDATA )
  60.  
  61. ###
  62. # Requirements
  63. ###
  64.  
  65. SET( CMAKE_C_STANDARD 99 )
  66. SET( CMAKE_C_STANDARD_REQUIRED TRUE )
  67.  
  68. ###
  69. # Check values
  70. ###
  71.  
  72. CheckHeaderExists( "<linux/elf.h>" HAVE_ELF )
  73. CheckFunctionExists( "strtod_l( (char*)0, (char**)0, locale_t() )" "<cstdlib>" HAVE_STRTOD_L )
  74.  
  75. ###
  76. # Variables
  77. ###
  78.  
  79. SET( ICU_PATH ${CMAKE_CURRENT_SOURCE_DIR}/icu )
  80. SET( ICU_SOURCE_PATH ${ICU_PATH}/source )
  81. SET( ICU_EXTRAS_PATH ${ICU_SOURCE_PATH}/extra )
  82. SET( ICU_STUBDATA_PATH ${ICU_SOURCE_PATH}/stubdata )
  83. SET( ICU_CMN_PATH ${ICU_SOURCE_PATH}/common )
  84. SET( ICU_I18N_PATH ${ICU_SOURCE_PATH}/i18n )
  85. SET( ICU_UCONV_PATH ${ICU_EXTRAS_PATH}/uconv )
  86. SET( ICU_GLOBAL_DEFS "_REENTRANT" "U_ATTRIBUTE_DEPRECATED=" )
  87.  
  88. IF( HAVE_ATOMIC )
  89.     LIST( APPEND ICU_GLOBAL_DEFS "U_HAVE_ATOMIC=1" )
  90. ELSE( HAVE_ATOMIC )
  91.     LIST( APPEND ICU_GLOBAL_DEFS "U_HAVE_ATOMIC=0" )
  92. ENDIF( HAVE_ATOMIC )
  93.  
  94. IF( ${HAVE_ELF} )
  95.     LIST( APPEND ICU_GLOBAL_DEFS "U_HAVE_ELF_H=1" )
  96. ELSE( ${HAVE_ELF} )
  97.     LIST( APPEND ICU_GLOBAL_DEFS "U_HAVE_ELF_H=0" )
  98. ENDIF( ${HAVE_ELF} )
  99.  
  100. IF( ${HAVE_STRTOD_L} )
  101.     LIST( APPEND ICU_GLOBAL_DEFS "U_HAVE_STRTOD_L=1" )
  102. ELSE( ${HAVE_STRTOD_L} )
  103.     LIST( APPEND ICU_GLOBAL_DEFS "U_HAVE_STRTOD_L=0" )
  104. ENDIF( ${HAVE_STRTOD_L} )
  105.  
  106. ###
  107. # ICU Sources
  108. ###
  109.  
  110. SET( ICU_STUBDATA_SRC
  111.     "${ICU_STUBDATA_PATH}/stubdata.cpp"
  112. )
  113. SET( ICU_STUBDATA_INC_DIR "${ICU_STUBDATA_PATH}" )
  114.  
  115.  
  116. SET( ICU_CMN_SRC
  117.     "${ICU_CMN_PATH}/errorcode.cpp"
  118.     "${ICU_CMN_PATH}/putil.cpp"
  119.     "${ICU_CMN_PATH}/umath.cpp"
  120.     "${ICU_CMN_PATH}/utypes.cpp"
  121.     "${ICU_CMN_PATH}/uinvchar.cpp"
  122.     "${ICU_CMN_PATH}/umutex.cpp"
  123.     "${ICU_CMN_PATH}/ucln_cmn.cpp"
  124.     "${ICU_CMN_PATH}/uinit.cpp"
  125.     "${ICU_CMN_PATH}/uobject.cpp"
  126.     "${ICU_CMN_PATH}/cmemory.cpp"
  127.     "${ICU_CMN_PATH}/charstr.cpp"
  128.     "${ICU_CMN_PATH}/cstr.cpp"
  129.     "${ICU_CMN_PATH}/udata.cpp"
  130.     "${ICU_CMN_PATH}/ucmndata.cpp"
  131.     "${ICU_CMN_PATH}/udatamem.cpp"
  132.     "${ICU_CMN_PATH}/umapfile.cpp"
  133.     "${ICU_CMN_PATH}/udataswp.cpp"
  134.     "${ICU_CMN_PATH}/ucol_swp.cpp"
  135.     "${ICU_CMN_PATH}/utrace.cpp"
  136.     "${ICU_CMN_PATH}/uhash.cpp"
  137.     "${ICU_CMN_PATH}/uhash_us.cpp"
  138.     "${ICU_CMN_PATH}/uenum.cpp"
  139.     "${ICU_CMN_PATH}/ustrenum.cpp"
  140.     "${ICU_CMN_PATH}/uvector.cpp"
  141.     "${ICU_CMN_PATH}/ustack.cpp"
  142.     "${ICU_CMN_PATH}/uvectr32.cpp"
  143.     "${ICU_CMN_PATH}/uvectr64.cpp"
  144.     "${ICU_CMN_PATH}/ucnv.cpp"
  145.     "${ICU_CMN_PATH}/ucnv_bld.cpp"
  146.     "${ICU_CMN_PATH}/ucnv_cnv.cpp"
  147.     "${ICU_CMN_PATH}/ucnv_io.cpp"
  148.     "${ICU_CMN_PATH}/ucnv_cb.cpp"
  149.     "${ICU_CMN_PATH}/ucnv_err.cpp"
  150.     "${ICU_CMN_PATH}/ucnvlat1.cpp"
  151.     "${ICU_CMN_PATH}/ucnv_u7.cpp"
  152.     "${ICU_CMN_PATH}/ucnv_u8.cpp"
  153.     "${ICU_CMN_PATH}/ucnv_u16.cpp"
  154.     "${ICU_CMN_PATH}/ucnv_u32.cpp"
  155.     "${ICU_CMN_PATH}/ucnvscsu.cpp"
  156.     "${ICU_CMN_PATH}/ucnvbocu.cpp"
  157.     "${ICU_CMN_PATH}/ucnv_ext.cpp"
  158.     "${ICU_CMN_PATH}/ucnvmbcs.cpp"
  159.     "${ICU_CMN_PATH}/ucnv2022.cpp"
  160.     "${ICU_CMN_PATH}/ucnvhz.cpp"
  161.     "${ICU_CMN_PATH}/ucnv_lmb.cpp"
  162.     "${ICU_CMN_PATH}/ucnvisci.cpp"
  163.     "${ICU_CMN_PATH}/ucnvdisp.cpp"
  164.     "${ICU_CMN_PATH}/ucnv_set.cpp"
  165.     "${ICU_CMN_PATH}/ucnv_ct.cpp"
  166.     "${ICU_CMN_PATH}/resource.cpp"
  167.     "${ICU_CMN_PATH}/uresbund.cpp"
  168.     "${ICU_CMN_PATH}/ures_cnv.cpp"
  169.     "${ICU_CMN_PATH}/uresdata.cpp"
  170.     "${ICU_CMN_PATH}/resbund.cpp"
  171.     "${ICU_CMN_PATH}/resbund_cnv.cpp"
  172.     "${ICU_CMN_PATH}/ucurr.cpp"
  173.     "${ICU_CMN_PATH}/messagepattern.cpp"
  174.     "${ICU_CMN_PATH}/ucat.cpp"
  175.     "${ICU_CMN_PATH}/locmap.cpp"
  176.     "${ICU_CMN_PATH}/uloc.cpp"
  177.     "${ICU_CMN_PATH}/locid.cpp"
  178.     "${ICU_CMN_PATH}/locutil.cpp"
  179.     "${ICU_CMN_PATH}/locavailable.cpp"
  180.     "${ICU_CMN_PATH}/locdispnames.cpp"
  181.     "${ICU_CMN_PATH}/locdspnm.cpp"
  182.     "${ICU_CMN_PATH}/loclikely.cpp"
  183.     "${ICU_CMN_PATH}/locresdata.cpp"
  184.     "${ICU_CMN_PATH}/bytestream.cpp"
  185.     "${ICU_CMN_PATH}/stringpiece.cpp"
  186.     "${ICU_CMN_PATH}/stringtriebuilder.cpp"
  187.     "${ICU_CMN_PATH}/bytestriebuilder.cpp"
  188.     "${ICU_CMN_PATH}/bytestrie.cpp"
  189.     "${ICU_CMN_PATH}/bytestrieiterator.cpp"
  190.     "${ICU_CMN_PATH}/ucharstrie.cpp"
  191.     "${ICU_CMN_PATH}/ucharstriebuilder.cpp"
  192.     "${ICU_CMN_PATH}/ucharstrieiterator.cpp"
  193.     "${ICU_CMN_PATH}/dictionarydata.cpp"
  194.     "${ICU_CMN_PATH}/edits.cpp"
  195.     "${ICU_CMN_PATH}/appendable.cpp"
  196.     "${ICU_CMN_PATH}/ustr_cnv.cpp"
  197.     "${ICU_CMN_PATH}/unistr_cnv.cpp"
  198.     "${ICU_CMN_PATH}/unistr.cpp"
  199.     "${ICU_CMN_PATH}/unistr_case.cpp"
  200.     "${ICU_CMN_PATH}/unistr_props.cpp"
  201.     "${ICU_CMN_PATH}/utf_impl.cpp"
  202.     "${ICU_CMN_PATH}/ustring.cpp"
  203.     "${ICU_CMN_PATH}/ustrcase.cpp"
  204.     "${ICU_CMN_PATH}/ucasemap.cpp"
  205.     "${ICU_CMN_PATH}/ucasemap_titlecase_brkiter.cpp"
  206.     "${ICU_CMN_PATH}/cstring.cpp"
  207.     "${ICU_CMN_PATH}/ustrfmt.cpp"
  208.     "${ICU_CMN_PATH}/ustrtrns.cpp"
  209.     "${ICU_CMN_PATH}/ustr_wcs.cpp"
  210.     "${ICU_CMN_PATH}/utext.cpp"
  211.     "${ICU_CMN_PATH}/unistr_case_locale.cpp"
  212.     "${ICU_CMN_PATH}/ustrcase_locale.cpp"
  213.     "${ICU_CMN_PATH}/unistr_titlecase_brkiter.cpp"
  214.     "${ICU_CMN_PATH}/ustr_titlecase_brkiter.cpp"
  215.     "${ICU_CMN_PATH}/normalizer2impl.cpp"
  216.     "${ICU_CMN_PATH}/normalizer2.cpp"
  217.     "${ICU_CMN_PATH}/filterednormalizer2.cpp"
  218.     "${ICU_CMN_PATH}/normlzr.cpp"
  219.     "${ICU_CMN_PATH}/unorm.cpp"
  220.     "${ICU_CMN_PATH}/unormcmp.cpp"
  221.     "${ICU_CMN_PATH}/loadednormalizer2impl.cpp"
  222.     "${ICU_CMN_PATH}/chariter.cpp"
  223.     "${ICU_CMN_PATH}/schriter.cpp"
  224.     "${ICU_CMN_PATH}/uchriter.cpp"
  225.     "${ICU_CMN_PATH}/uiter.cpp"
  226.     "${ICU_CMN_PATH}/patternprops.cpp"
  227.     "${ICU_CMN_PATH}/uchar.cpp"
  228.     "${ICU_CMN_PATH}/uprops.cpp"
  229.     "${ICU_CMN_PATH}/ucase.cpp"
  230.     "${ICU_CMN_PATH}/propname.cpp"
  231.     "${ICU_CMN_PATH}/ubidi_props.cpp"
  232.     "${ICU_CMN_PATH}/ubidi.cpp"
  233.     "${ICU_CMN_PATH}/ubidiwrt.cpp"
  234.     "${ICU_CMN_PATH}/ubidiln.cpp"
  235.     "${ICU_CMN_PATH}/ushape.cpp"
  236.     "${ICU_CMN_PATH}/uscript.cpp"
  237.     "${ICU_CMN_PATH}/uscript_props.cpp"
  238.     "${ICU_CMN_PATH}/usc_impl.cpp"
  239.     "${ICU_CMN_PATH}/unames.cpp"
  240.     "${ICU_CMN_PATH}/utrie.cpp"
  241.     "${ICU_CMN_PATH}/utrie2.cpp"
  242.     "${ICU_CMN_PATH}/utrie2_builder.cpp"
  243.     "${ICU_CMN_PATH}/bmpset.cpp"
  244.     "${ICU_CMN_PATH}/unisetspan.cpp"
  245.     "${ICU_CMN_PATH}/uset_props.cpp"
  246.     "${ICU_CMN_PATH}/uniset_props.cpp"
  247.     "${ICU_CMN_PATH}/uniset_closure.cpp"
  248.     "${ICU_CMN_PATH}/uset.cpp"
  249.     "${ICU_CMN_PATH}/uniset.cpp"
  250.     "${ICU_CMN_PATH}/usetiter.cpp"
  251.     "${ICU_CMN_PATH}/ruleiter.cpp"
  252.     "${ICU_CMN_PATH}/caniter.cpp"
  253.     "${ICU_CMN_PATH}/unifilt.cpp"
  254.     "${ICU_CMN_PATH}/unifunct.cpp"
  255.     "${ICU_CMN_PATH}/uarrsort.cpp"
  256.     "${ICU_CMN_PATH}/brkiter.cpp"
  257.     "${ICU_CMN_PATH}/ubrk.cpp"
  258.     "${ICU_CMN_PATH}/brkeng.cpp"
  259.     "${ICU_CMN_PATH}/dictbe.cpp"
  260.     "${ICU_CMN_PATH}/filteredbrk.cpp"
  261.     "${ICU_CMN_PATH}/rbbi.cpp"
  262.     "${ICU_CMN_PATH}/rbbidata.cpp"
  263.     "${ICU_CMN_PATH}/rbbinode.cpp"
  264.     "${ICU_CMN_PATH}/rbbirb.cpp"
  265.     "${ICU_CMN_PATH}/rbbiscan.cpp"
  266.     "${ICU_CMN_PATH}/rbbisetb.cpp"
  267.     "${ICU_CMN_PATH}/rbbistbl.cpp"
  268.     "${ICU_CMN_PATH}/rbbitblb.cpp"
  269.     "${ICU_CMN_PATH}/serv.cpp"
  270.     "${ICU_CMN_PATH}/servnotf.cpp"
  271.     "${ICU_CMN_PATH}/servls.cpp"
  272.     "${ICU_CMN_PATH}/servlk.cpp"
  273.     "${ICU_CMN_PATH}/servlkf.cpp"
  274.     "${ICU_CMN_PATH}/servrbf.cpp"
  275.     "${ICU_CMN_PATH}/servslkf.cpp"
  276.     "${ICU_CMN_PATH}/uidna.cpp"
  277.     "${ICU_CMN_PATH}/usprep.cpp"
  278.     "${ICU_CMN_PATH}/uts46.cpp"
  279.     "${ICU_CMN_PATH}/punycode.cpp"
  280.     "${ICU_CMN_PATH}/util.cpp"
  281.     "${ICU_CMN_PATH}/util_props.cpp"
  282.     "${ICU_CMN_PATH}/parsepos.cpp"
  283.     "${ICU_CMN_PATH}/locbased.cpp"
  284.     "${ICU_CMN_PATH}/cwchar.cpp"
  285.     "${ICU_CMN_PATH}/wintz.cpp"
  286.     "${ICU_CMN_PATH}/dtintrv.cpp"
  287.     "${ICU_CMN_PATH}/ucnvsel.cpp"
  288.     "${ICU_CMN_PATH}/propsvec.cpp"
  289.     "${ICU_CMN_PATH}/ulist.cpp"
  290.     "${ICU_CMN_PATH}/uloc_tag.cpp"
  291.     "${ICU_CMN_PATH}/icudataver.cpp"
  292.     "${ICU_CMN_PATH}/icuplug.cpp"
  293.     "${ICU_CMN_PATH}/listformatter.cpp"
  294.     "${ICU_CMN_PATH}/ulistformatter.cpp"
  295.     "${ICU_CMN_PATH}/sharedobject.cpp"
  296.     "${ICU_CMN_PATH}/simpleformatter.cpp"
  297.     "${ICU_CMN_PATH}/unifiedcache.cpp"
  298.     "${ICU_CMN_PATH}/uloc_keytype.cpp"
  299.     "${ICU_CMN_PATH}/ubiditransform.cpp"
  300.     "${ICU_CMN_PATH}/pluralmap.cpp"
  301. )
  302. SET( ICU_CMN_INST_DIR ${ICU_CMN_PATH}/unicode )
  303. SET( ICU_CMN_INC_DIR ${ICU_CMN_PATH} )
  304. SET( ICU_CMN_DEFS "U_COMMON_IMPLEMENTATION" "DEFAULT_ICU_PLUGINS=" )
  305.  
  306. SET( ICU_I18N_SRC
  307.     "${ICU_I18N_PATH}/fmtable.cpp"
  308.     "${ICU_I18N_PATH}/format.cpp"
  309.     "${ICU_I18N_PATH}/msgfmt.cpp"
  310.     "${ICU_I18N_PATH}/umsg.cpp"
  311.     "${ICU_I18N_PATH}/numfmt.cpp"
  312.     "${ICU_I18N_PATH}/unum.cpp"
  313.     "${ICU_I18N_PATH}/decimfmt.cpp"
  314.     "${ICU_I18N_PATH}/decimalformatpattern.cpp"
  315.     "${ICU_I18N_PATH}/dcfmtsym.cpp"
  316.     "${ICU_I18N_PATH}/digitlst.cpp"
  317.     "${ICU_I18N_PATH}/fmtable_cnv.cpp"
  318.     "${ICU_I18N_PATH}/choicfmt.cpp"
  319.     "${ICU_I18N_PATH}/datefmt.cpp"
  320.     "${ICU_I18N_PATH}/smpdtfmt.cpp"
  321.     "${ICU_I18N_PATH}/reldtfmt.cpp"
  322.     "${ICU_I18N_PATH}/dtfmtsym.cpp"
  323.     "${ICU_I18N_PATH}/udat.cpp"
  324.     "${ICU_I18N_PATH}/dtptngen.cpp"
  325.     "${ICU_I18N_PATH}/udatpg.cpp"
  326.     "${ICU_I18N_PATH}/nfrs.cpp"
  327.     "${ICU_I18N_PATH}/nfrule.cpp"
  328.     "${ICU_I18N_PATH}/nfsubs.cpp"
  329.     "${ICU_I18N_PATH}/rbnf.cpp"
  330.     "${ICU_I18N_PATH}/numsys.cpp"
  331.     "${ICU_I18N_PATH}/unumsys.cpp"
  332.     "${ICU_I18N_PATH}/ucsdet.cpp"
  333.     "${ICU_I18N_PATH}/ucal.cpp"
  334.     "${ICU_I18N_PATH}/calendar.cpp"
  335.     "${ICU_I18N_PATH}/gregocal.cpp"
  336.     "${ICU_I18N_PATH}/timezone.cpp"
  337.     "${ICU_I18N_PATH}/simpletz.cpp"
  338.     "${ICU_I18N_PATH}/olsontz.cpp"
  339.     "${ICU_I18N_PATH}/astro.cpp"
  340.     "${ICU_I18N_PATH}/taiwncal.cpp"
  341.     "${ICU_I18N_PATH}/buddhcal.cpp"
  342.     "${ICU_I18N_PATH}/persncal.cpp"
  343.     "${ICU_I18N_PATH}/islamcal.cpp"
  344.     "${ICU_I18N_PATH}/japancal.cpp"
  345.     "${ICU_I18N_PATH}/gregoimp.cpp"
  346.     "${ICU_I18N_PATH}/hebrwcal.cpp"
  347.     "${ICU_I18N_PATH}/indiancal.cpp"
  348.     "${ICU_I18N_PATH}/chnsecal.cpp"
  349.     "${ICU_I18N_PATH}/cecal.cpp"
  350.     "${ICU_I18N_PATH}/coptccal.cpp"
  351.     "${ICU_I18N_PATH}/dangical.cpp"
  352.     "${ICU_I18N_PATH}/ethpccal.cpp"
  353.     "${ICU_I18N_PATH}/coleitr.cpp"
  354.     "${ICU_I18N_PATH}/coll.cpp"
  355.     "${ICU_I18N_PATH}/sortkey.cpp"
  356.     "${ICU_I18N_PATH}/bocsu.cpp"
  357.     "${ICU_I18N_PATH}/ucoleitr.cpp"
  358.     "${ICU_I18N_PATH}/ucol.cpp"
  359.     "${ICU_I18N_PATH}/ucol_res.cpp"
  360.     "${ICU_I18N_PATH}/ucol_sit.cpp"
  361.     "${ICU_I18N_PATH}/collation.cpp"
  362.     "${ICU_I18N_PATH}/collationsettings.cpp"
  363.     "${ICU_I18N_PATH}/collationdata.cpp"
  364.     "${ICU_I18N_PATH}/collationtailoring.cpp"
  365.     "${ICU_I18N_PATH}/collationdatareader.cpp"
  366.     "${ICU_I18N_PATH}/collationdatawriter.cpp"
  367.     "${ICU_I18N_PATH}/collationfcd.cpp"
  368.     "${ICU_I18N_PATH}/collationiterator.cpp"
  369.     "${ICU_I18N_PATH}/utf16collationiterator.cpp"
  370.     "${ICU_I18N_PATH}/utf8collationiterator.cpp"
  371.     "${ICU_I18N_PATH}/uitercollationiterator.cpp"
  372.     "${ICU_I18N_PATH}/collationsets.cpp"
  373.     "${ICU_I18N_PATH}/collationcompare.cpp"
  374.     "${ICU_I18N_PATH}/collationfastlatin.cpp"
  375.     "${ICU_I18N_PATH}/collationkeys.cpp"
  376.     "${ICU_I18N_PATH}/rulebasedcollator.cpp"
  377.     "${ICU_I18N_PATH}/collationroot.cpp"
  378.     "${ICU_I18N_PATH}/collationrootelements.cpp"
  379.     "${ICU_I18N_PATH}/collationdatabuilder.cpp"
  380.     "${ICU_I18N_PATH}/collationweights.cpp"
  381.     "${ICU_I18N_PATH}/collationruleparser.cpp"
  382.     "${ICU_I18N_PATH}/collationbuilder.cpp"
  383.     "${ICU_I18N_PATH}/collationfastlatinbuilder.cpp"
  384.     "${ICU_I18N_PATH}/strmatch.cpp"
  385.     "${ICU_I18N_PATH}/usearch.cpp"
  386.     "${ICU_I18N_PATH}/search.cpp"
  387.     "${ICU_I18N_PATH}/stsearch.cpp"
  388.     "${ICU_I18N_PATH}/translit.cpp"
  389.     "${ICU_I18N_PATH}/utrans.cpp"
  390.     "${ICU_I18N_PATH}/esctrn.cpp"
  391.     "${ICU_I18N_PATH}/unesctrn.cpp"
  392.     "${ICU_I18N_PATH}/funcrepl.cpp"
  393.     "${ICU_I18N_PATH}/strrepl.cpp"
  394.     "${ICU_I18N_PATH}/tridpars.cpp"
  395.     "${ICU_I18N_PATH}/cpdtrans.cpp"
  396.     "${ICU_I18N_PATH}/rbt.cpp"
  397.     "${ICU_I18N_PATH}/rbt_data.cpp"
  398.     "${ICU_I18N_PATH}/rbt_pars.cpp"
  399.     "${ICU_I18N_PATH}/rbt_rule.cpp"
  400.     "${ICU_I18N_PATH}/rbt_set.cpp"
  401.     "${ICU_I18N_PATH}/nultrans.cpp"
  402.     "${ICU_I18N_PATH}/remtrans.cpp"
  403.     "${ICU_I18N_PATH}/casetrn.cpp"
  404.     "${ICU_I18N_PATH}/titletrn.cpp"
  405.     "${ICU_I18N_PATH}/tolowtrn.cpp"
  406.     "${ICU_I18N_PATH}/toupptrn.cpp"
  407.     "${ICU_I18N_PATH}/anytrans.cpp"
  408.     "${ICU_I18N_PATH}/name2uni.cpp"
  409.     "${ICU_I18N_PATH}/uni2name.cpp"
  410.     "${ICU_I18N_PATH}/nortrans.cpp"
  411.     "${ICU_I18N_PATH}/quant.cpp"
  412.     "${ICU_I18N_PATH}/transreg.cpp"
  413.     "${ICU_I18N_PATH}/brktrans.cpp"
  414.     "${ICU_I18N_PATH}/regexcmp.cpp"
  415.     "${ICU_I18N_PATH}/rematch.cpp"
  416.     "${ICU_I18N_PATH}/repattrn.cpp"
  417.     "${ICU_I18N_PATH}/regexst.cpp"
  418.     "${ICU_I18N_PATH}/regextxt.cpp"
  419.     "${ICU_I18N_PATH}/regeximp.cpp"
  420.     "${ICU_I18N_PATH}/uregex.cpp"
  421.     "${ICU_I18N_PATH}/uregexc.cpp"
  422.     "${ICU_I18N_PATH}/ulocdata.cpp"
  423.     "${ICU_I18N_PATH}/measfmt.cpp"
  424.     "${ICU_I18N_PATH}/currfmt.cpp"
  425.     "${ICU_I18N_PATH}/curramt.cpp"
  426.     "${ICU_I18N_PATH}/currunit.cpp"
  427.     "${ICU_I18N_PATH}/measure.cpp"
  428.     "${ICU_I18N_PATH}/utmscale.cpp"
  429.     "${ICU_I18N_PATH}/csdetect.cpp"
  430.     "${ICU_I18N_PATH}/csmatch.cpp"
  431.     "${ICU_I18N_PATH}/csr2022.cpp"
  432.     "${ICU_I18N_PATH}/csrecog.cpp"
  433.     "${ICU_I18N_PATH}/csrmbcs.cpp"
  434.     "${ICU_I18N_PATH}/csrsbcs.cpp"
  435.     "${ICU_I18N_PATH}/csrucode.cpp"
  436.     "${ICU_I18N_PATH}/csrutf8.cpp"
  437.     "${ICU_I18N_PATH}/inputext.cpp"
  438.     "${ICU_I18N_PATH}/wintzimpl.cpp"
  439.     "${ICU_I18N_PATH}/windtfmt.cpp"
  440.     "${ICU_I18N_PATH}/winnmfmt.cpp"
  441.     "${ICU_I18N_PATH}/basictz.cpp"
  442.     "${ICU_I18N_PATH}/dtrule.cpp"
  443.     "${ICU_I18N_PATH}/rbtz.cpp"
  444.     "${ICU_I18N_PATH}/tzrule.cpp"
  445.     "${ICU_I18N_PATH}/tztrans.cpp"
  446.     "${ICU_I18N_PATH}/vtzone.cpp"
  447.     "${ICU_I18N_PATH}/zonemeta.cpp"
  448.     "${ICU_I18N_PATH}/standardplural.cpp"
  449.     "${ICU_I18N_PATH}/upluralrules.cpp"
  450.     "${ICU_I18N_PATH}/plurrule.cpp"
  451.     "${ICU_I18N_PATH}/plurfmt.cpp"
  452.     "${ICU_I18N_PATH}/selfmt.cpp"
  453.     "${ICU_I18N_PATH}/dtitvfmt.cpp"
  454.     "${ICU_I18N_PATH}/dtitvinf.cpp"
  455.     "${ICU_I18N_PATH}/udateintervalformat.cpp"
  456.     "${ICU_I18N_PATH}/tmunit.cpp"
  457.     "${ICU_I18N_PATH}/tmutamt.cpp"
  458.     "${ICU_I18N_PATH}/tmutfmt.cpp"
  459.     "${ICU_I18N_PATH}/currpinf.cpp"
  460.     "${ICU_I18N_PATH}/uspoof.cpp"
  461.     "${ICU_I18N_PATH}/uspoof_impl.cpp"
  462.     "${ICU_I18N_PATH}/uspoof_build.cpp"
  463.     "${ICU_I18N_PATH}/uspoof_conf.cpp"
  464.     "${ICU_I18N_PATH}/decfmtst.cpp"
  465.     "${ICU_I18N_PATH}/smpdtfst.cpp"
  466.     "${ICU_I18N_PATH}/ztrans.cpp"
  467.     "${ICU_I18N_PATH}/zrule.cpp"
  468.     "${ICU_I18N_PATH}/vzone.cpp"
  469.     "${ICU_I18N_PATH}/fphdlimp.cpp"
  470.     "${ICU_I18N_PATH}/fpositer.cpp"
  471.     "${ICU_I18N_PATH}/ufieldpositer.cpp"
  472.     "${ICU_I18N_PATH}/decNumber.cpp"
  473.     "${ICU_I18N_PATH}/decContext.cpp"
  474.     "${ICU_I18N_PATH}/alphaindex.cpp"
  475.     "${ICU_I18N_PATH}/tznames.cpp"
  476.     "${ICU_I18N_PATH}/tznames_impl.cpp"
  477.     "${ICU_I18N_PATH}/tzgnames.cpp"
  478.     "${ICU_I18N_PATH}/tzfmt.cpp"
  479.     "${ICU_I18N_PATH}/compactdecimalformat.cpp"
  480.     "${ICU_I18N_PATH}/gender.cpp"
  481.     "${ICU_I18N_PATH}/region.cpp"
  482.     "${ICU_I18N_PATH}/scriptset.cpp"
  483.     "${ICU_I18N_PATH}/uregion.cpp"
  484.     "${ICU_I18N_PATH}/reldatefmt.cpp"
  485.     "${ICU_I18N_PATH}/quantityformatter.cpp"
  486.     "${ICU_I18N_PATH}/measunit.cpp"
  487.     "${ICU_I18N_PATH}/sharedbreakiterator.cpp"
  488.     "${ICU_I18N_PATH}/scientificnumberformatter.cpp"
  489.     "${ICU_I18N_PATH}/digitgrouping.cpp"
  490.     "${ICU_I18N_PATH}/digitinterval.cpp"
  491.     "${ICU_I18N_PATH}/digitformatter.cpp"
  492.     "${ICU_I18N_PATH}/digitaffix.cpp"
  493.     "${ICU_I18N_PATH}/valueformatter.cpp"
  494.     "${ICU_I18N_PATH}/digitaffixesandpadding.cpp"
  495.     "${ICU_I18N_PATH}/pluralaffix.cpp"
  496.     "${ICU_I18N_PATH}/precision.cpp"
  497.     "${ICU_I18N_PATH}/affixpatternparser.cpp"
  498.     "${ICU_I18N_PATH}/smallintformatter.cpp"
  499.     "${ICU_I18N_PATH}/decimfmtimpl.cpp"
  500.     "${ICU_I18N_PATH}/visibledigits.cpp"
  501.     "${ICU_I18N_PATH}/dayperiodrules.cpp"
  502. )
  503. SET( ICU_I18N_INST_DIR ${ICU_I18N_PATH}/unicode )
  504. SET( ICU_I18N_INC_DIR ${ICU_I18N_PATH} )
  505. SET( ICU_I18N_DEFS "U_I18N_IMPLEMENTATION" )
  506.  
  507. ###
  508. # Extras Sources
  509. ###
  510.  
  511. SET( UCONV_SRC
  512.     "${ICU_UCONV_PATH}/uconv.cpp"
  513.     "${ICU_UCONV_PATH}/uwmsg.c"
  514. )
  515.  
  516. ###
  517. # Setup Libraries
  518. ###
  519.  
  520. # Building a monolith library?
  521. IF( ${ICU_BUILD_MONOLITH} )
  522.     SET( ICU_SRC ${ICU_CMN_SRC} ${ICU_I18N_SRC} )
  523.     SET( ICU_DEFS ${ICU_GLOBAL_DEFS} ${ICU_CMN_DEFS} ${ICU_I18N_DEFS} U_COMBINED_IMPLEMENTATION )
  524.     SET( ICU_INC ${ICU_CMN_INC_DIR} ${ICU_I18N_INC_DIR} )
  525.  
  526.     IF( ${ICU_BUILD_SHARED} )
  527.         LIST( APPEND ICU_INSTALL_LIBS icu )
  528.         SET( ICU_MONOLITH_SHARED icu )
  529.         ADD_LIBRARY( ${ICU_MONOLITH_SHARED} SHARED ${ICU_SRC} )
  530.         TARGET_INCLUDE_DIRECTORIES( ${ICU_MONOLITH_SHARED} PRIVATE ${ICU_INC} )
  531.         TARGET_COMPILE_DEFINITIONS( ${ICU_MONOLITH_SHARED} PUBLIC ${ICU_DEFS} PIC )
  532.     ENDIF( ${ICU_BUILD_SHARED} )
  533.     IF( ${ICU_BUILD_STATIC} )
  534.         IF( "${ICU_MONOLITH_SHARED}" STREQUAL "" )
  535.             SET( ICU_MONOLITH_STATIC icu )
  536.         ELSE( )
  537.             SET( ICU_MONOLITH_STATIC icu_static )
  538.         ENDIF( )
  539.         LIST( APPEND ICU_INSTALL_LIBS ${ICU_MONOLITH_STATIC} )
  540.         ADD_LIBRARY( ${ICU_MONOLITH_STATIC} STATIC ${ICU_SRC} )
  541.         TARGET_INCLUDE_DIRECTORIES( ${ICU_MONOLITH_STATIC} PRIVATE ${ICU_INC} )
  542.         TARGET_COMPILE_DEFINITIONS( ${ICU_MONOLITH_STATIC} PUBLIC ${ICU_DEFS} U_STATIC_IMPLEMENTATION )
  543.     ENDIF( ${ICU_BUILD_STATIC} )
  544. ENDIF( ${ICU_BUILD_MONOLITH} )
  545.  
  546. # Building shared libraries?
  547. IF( ${ICU_BUILD_SHARED} )
  548.     ADD_LIBRARY( icuuc SHARED ${ICU_CMN_SRC} )
  549.     TARGET_INCLUDE_DIRECTORIES( icuuc PUBLIC ${ICU_CMN_INC_DIR} )
  550.     TARGET_COMPILE_DEFINITIONS( icuuc PUBLIC ${ICU_CMN_DEFS} ${ICU_GLOBAL_DEFS} PIC )
  551.     LIST( APPEND ICU_INSTALL_LIBS icuuc )
  552.     SET( ICU_CMN_LIB icuuc )
  553.  
  554.     ADD_LIBRARY( icui18n SHARED ${ICU_I18N_SRC} )
  555.     TARGET_INCLUDE_DIRECTORIES( icui18n PRIVATE ${ICU_CMN_INC_DIR} ${ICU_I18N_INC_DIR} )
  556.     TARGET_COMPILE_DEFINITIONS( icui18n PUBLIC ${ICU_I18N_DEFS} ${ICU_GLOBAL_DEFS} PIC )
  557.     TARGET_LINK_LIBRARIES( icui18n icuuc )
  558.     LIST( APPEND ICU_INSTALL_LIBS icui18n )
  559. ENDIF( ${ICU_BUILD_SHARED} )
  560.  
  561. # Building static libraries?
  562. IF( ${ICU_BUILD_STATIC} )
  563.     ADD_LIBRARY( icuuc_static STATIC ${ICU_CMN_SRC} )
  564.     TARGET_INCLUDE_DIRECTORIES( icuuc_static PRIVATE ${ICU_CMN_INC_DIR} )
  565.     TARGET_COMPILE_DEFINITIONS( icuuc_static PUBLIC ${ICU_CMN_DEFS} ${ICU_GLOBAL_DEFS} )
  566.     LIST( APPEND ICU_INSTALL_LIBS icuuc_static )
  567.     IF( "${ICU_CMN_LIB}" STREQUAL "" )
  568.         SET( ICU_CMN_LIB icuuc_static )
  569.     ENDIF( "${ICU_CMN_LIB}" STREQUAL "" )
  570.  
  571.     ADD_LIBRARY( icui18n_static STATIC ${ICU_I18N_SRC} )
  572.     TARGET_INCLUDE_DIRECTORIES( icui18n_static PRIVATE ${ICU_CMN_INC_DIR} ${ICU_I18N_INC_DIR} )
  573.     TARGET_COMPILE_DEFINITIONS( icui18n_static PUBLIC ${ICU_I18N_DEFS} ${ICU_GLOBAL_DEFS} )
  574.     LIST( APPEND ICU_INSTALL_LIBS icui18n_static )
  575. ENDIF( ${ICU_BUILD_STATIC} )
  576.  
  577. # Always build stubdata as a static library
  578. IF( ${ICU_BUILD_STUBDATA} )
  579.     ADD_LIBRARY( icustubdata_static STATIC ${ICU_STUBDATA_SRC} )
  580.     TARGET_INCLUDE_DIRECTORIES( icustubdata_static PRIVATE ${ICU_CMN_INC_DIR} )
  581.     TARGET_COMPILE_DEFINITIONS( icustubdata_static PUBLIC ${ICU_GLOBAL_DEFS} )
  582. ENDIF( ${ICU_BUILD_STUBDATA} )
  583.  
  584. ###
  585. # Setup Extras
  586. ###
  587.  
  588. IF( ${ICU_BUILD_SHARED} )
  589.     SET( UCONV_LIBS icui18n icuuc )
  590. ELSE( ${ICU_BUILD_SHARED} )
  591.     SET( UCONV_LIBS icui18n_static icuuc_static )
  592. ENDIF( ${ICU_BUILD_SHARED} )
  593.  
  594. IF( ${ICU_BUILD_EXTRAS} )
  595.     IF( ${ICU_BUILD_UCONV} )
  596.         ADD_EXECUTABLE( uconv ${UCONV_SRC} )
  597.         ADD_DEPENDENCIES( uconv ${UCONV_LIBS} )
  598.         TARGET_INCLUDE_DIRECTORIES( uconv PRIVATE ${ICU_CMN_INC_DIR} ${ICU_I18N_INC_DIR} )
  599.         TARGET_COMPILE_DEFINITIONS( uconv PUBLIC ${ICU_GLOBAL_DEFS} )
  600.         TARGET_LINK_LIBRARIES( uconv ${UCONV_LIBS} )
  601.         LIST( APPEND ICU_INSTALL_LIBS uconv )
  602.     ENDIF( ${ICU_BUILD_UCONV} )
  603. ENDIF( ${ICU_BUILD_EXTRAS} )
  604.  
  605. ###
  606. # Installation Options
  607. ###
  608.  
  609. INSTALL(TARGETS ${ICU_INSTALL_LIBS}
  610.     ARCHIVE DESTINATION lib
  611.     LIBRARY DESTINATION lib
  612.     RUNTIME DESTINATION bin
  613. )
  614.  
  615. INSTALL( DIRECTORY ${ICU_CMN_INST_DIR} DESTINATION include )
  616. INSTALL( DIRECTORY ${ICU_I18N_INST_DIR} DESTINATION include )
Advertisement