CMakeLists.txt 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310
  1. # -*- cmake -*-
  2. project(viewer)
  3. include(00-Common)
  4. include(Boost)
  5. include(ELFIO)
  6. include(Glib)
  7. include(Hunspell)
  8. include(jemalloc)
  9. include(Json)
  10. include(LUA)
  11. include(FindOpenGL)
  12. include(LLWindow)
  13. include(LLAppearance)
  14. include(LLAudio)
  15. include(LLCharacter)
  16. include(LLCommon)
  17. include(LLConvexDecomposition)
  18. include(LLFilesystem)
  19. include(LLGltf)
  20. include(LLImage)
  21. include(LLInventory)
  22. include(LLMath)
  23. include(LLMessage)
  24. include(LLPlugin)
  25. include(LLPrimitive)
  26. include(LLRender)
  27. include(LLUI)
  28. include(LLXML)
  29. include(Linking)
  30. include(Python)
  31. include(NDOF)
  32. include(ViewerMiscLibs)
  33. include(GLOD)
  34. include(PNG)
  35. include(ZLIB)
  36. include(CEFPlugin)
  37. use_prebuilt_binary(tinyexr)
  38. use_prebuilt_binary(artwork-common)
  39. use_prebuilt_binary(dictionaries)
  40. if (WINDOWS)
  41. use_prebuilt_binary(runtime-libraries)
  42. endif (WINDOWS)
  43. set(viewer_SOURCE_FILES
  44. llagent.cpp
  45. llagentpilot.cpp
  46. llagentwearables.cpp
  47. llaisapi.cpp
  48. llappcorehttp.cpp
  49. llappearancemgr.cpp
  50. llappviewer.cpp
  51. llaudiosourcevo.cpp
  52. llavataractions.cpp
  53. llavatarproperties.cpp
  54. llavatartracker.cpp
  55. llchatbar.cpp
  56. llcloud.cpp
  57. llcolorswatch.cpp
  58. llcommandhandler.cpp
  59. llcurrencyuimanager.cpp
  60. lldebugview.cpp
  61. lldrawable.cpp
  62. lldrawpoolalpha.cpp
  63. lldrawpoolavatar.cpp
  64. lldrawpoolbump.cpp
  65. lldrawpool.cpp
  66. lldrawpoolmaterials.cpp
  67. lldrawpoolsimple.cpp
  68. lldrawpoolsky.cpp
  69. lldrawpoolterrain.cpp
  70. lldrawpooltree.cpp
  71. lldrawpoolwater.cpp
  72. lldrawpoolwlsky.cpp
  73. lldynamictexture.cpp
  74. llenvironment.cpp
  75. llenvsettings.cpp
  76. lleventnotifier.cpp
  77. lleventpoll.cpp
  78. llexperiencelog.cpp
  79. llface.cpp
  80. llfasttimerview.cpp
  81. llfeaturemanager.cpp
  82. llfetchedgltfmaterial.cpp
  83. llfirstuse.cpp
  84. llflexibleobject.cpp
  85. llfloaterabout.cpp
  86. llfloateractivespeakers.cpp
  87. llfloateranimpreview.cpp
  88. hbfloaterareasearch.cpp
  89. llfloaterauction.cpp
  90. llfloateravatarinfo.cpp
  91. llfloateravatarpicker.cpp
  92. llfloateravatartextures.cpp
  93. llfloaterbeacons.cpp
  94. llfloaterbulkpermission.cpp
  95. hbfloaterbump.cpp
  96. llfloaterbuycontents.cpp
  97. llfloaterbuy.cpp
  98. llfloaterbuycurrency.cpp
  99. llfloaterbuyland.cpp
  100. llfloatercamera.cpp
  101. llfloaterchat.cpp
  102. llfloaterchatterbox.cpp
  103. llfloaterclassified.cpp
  104. llfloatercolorpicker.cpp
  105. llfloatercustomize.cpp
  106. llfloaterdebugsettings.cpp
  107. hbfloaterdebugtags.cpp
  108. llfloaterdisplayname.cpp
  109. hbfloatereditenvsettings.cpp
  110. llfloatereditui.cpp
  111. llfloaterevent.cpp
  112. llfloaterexperiencepicker.cpp
  113. llfloaterexperienceprofile.cpp
  114. llfloaterexperiences.cpp
  115. llfloaterfriends.cpp
  116. llfloatergesture.cpp
  117. llfloatergodtools.cpp
  118. llfloatergroupbulkban.cpp
  119. llfloatergroupinfo.cpp
  120. llfloatergroupinvite.cpp
  121. llfloatergroups.cpp
  122. hbfloatergrouptitles.cpp
  123. llfloaterim.cpp
  124. llfloaterimagepreview.cpp
  125. llfloaterinspect.cpp
  126. llfloaterinventory.cpp
  127. hbfloaterinvitemspicker.cpp
  128. llfloaterjoystick.cpp
  129. llfloaterlagmeter.cpp
  130. llfloaterland.cpp
  131. llfloaterlandholdings.cpp
  132. hbfloatermakenewoutfit.cpp
  133. llfloatermarketplace.cpp
  134. llfloatermediabrowser.cpp
  135. slfloatermediafilter.cpp
  136. llfloatermediasettings.cpp
  137. llfloaterminimap.cpp
  138. llfloatermodelpreview.cpp
  139. llfloatermove.cpp
  140. llfloatermute.cpp
  141. llfloaternearbymedia.cpp
  142. llfloaternewim.cpp
  143. llfloaternotificationsconsole.cpp
  144. llfloaterobjectiminfo.cpp
  145. llfloaterobjectweights.cpp
  146. llfloateropenobject.cpp
  147. llfloaterparcel.cpp
  148. llfloaterpathfindingcharacters.cpp
  149. llfloaterpathfindinglinksets.cpp
  150. llfloaterpathfindingobjects.cpp
  151. llfloaterpay.cpp
  152. llfloaterperms.cpp
  153. llfloaterpostcard.cpp
  154. llfloaterpreference.cpp
  155. llfloaterproperties.cpp
  156. hbfloaterradar.cpp
  157. llfloaterregiondebugconsole.cpp
  158. llfloaterregioninfo.cpp
  159. llfloaterreporter.cpp
  160. hbfloaterrlv.cpp
  161. llfloatersearchreplace.cpp
  162. llfloaterscriptdebug.cpp
  163. llfloaterscriptqueue.cpp
  164. hbfloatersearch.cpp
  165. llfloatersellland.cpp
  166. llfloatersnapshot.cpp
  167. hbfloatersoundslist.cpp
  168. llfloaterstats.cpp
  169. llfloatertelehub.cpp
  170. hbfloaterteleporthistory.cpp
  171. hbfloatertextinput.cpp
  172. hbfloaterthumbnail.cpp
  173. llfloatertools.cpp
  174. llfloatertopobjects.cpp
  175. llfloatertos.cpp
  176. hbfloateruploadasset.cpp
  177. llfloaterurldisplay.cpp
  178. llfloaterurlentry.cpp
  179. llfloatervoicedevicesettings.cpp
  180. llfloaterwindlight.cpp
  181. llfloaterworldmap.cpp
  182. llfolderview.cpp
  183. llfollowcam.cpp
  184. llgesturemgr.cpp
  185. llgltfmateriallist.cpp
  186. llgltfmaterialpreview.cpp
  187. llgltfscenemanager.cpp
  188. llgridmanager.cpp
  189. llgroupmgr.cpp
  190. llgroupnotify.cpp
  191. llhoverview.cpp
  192. llhudeffect.cpp
  193. llhudeffectlookat.cpp
  194. llhudeffectpointat.cpp
  195. llhudeffectspiral.cpp
  196. llhudicon.cpp
  197. llhudmanager.cpp
  198. llhudobject.cpp
  199. llhudtext.cpp
  200. llhudview.cpp
  201. llimmgr.cpp
  202. llinventoryactions.cpp
  203. llinventorybridge.cpp
  204. hbinventoryclipboard.cpp
  205. llinventoryicon.cpp
  206. llinventorymodel.cpp
  207. llinventorymodelfetch.cpp
  208. lljoystickbutton.cpp
  209. lllandmarklist.cpp
  210. lllocalbitmaps.cpp
  211. lllocalgltfmaterials.cpp
  212. lllogchat.cpp
  213. llmanip.cpp
  214. llmaniprotate.cpp
  215. llmanipscale.cpp
  216. llmaniptranslate.cpp
  217. llmarketplacefunctions.cpp
  218. llmaterialmgr.cpp
  219. llmediactrl.cpp
  220. llmediadataclient.cpp
  221. llmediaremotectrl.cpp
  222. llmeshrepository.cpp
  223. llmorphview.cpp
  224. llmutelist.cpp
  225. llnotify.cpp
  226. hbobjectbackup.cpp
  227. lloverlaybar.cpp
  228. llpanelaudiovolume.cpp
  229. llpanelavatar.cpp
  230. llpanelclassified.cpp
  231. llpanelcontents.cpp
  232. llpaneldirbrowser.cpp
  233. llpaneldirclassified.cpp
  234. llpaneldirevents.cpp
  235. llpaneldirfind.cpp
  236. llpaneldirgroups.cpp
  237. llpaneldirland.cpp
  238. llpaneldirpeople.cpp
  239. llpaneldirplaces.cpp
  240. llpaneleditwearable.cpp
  241. llpanelenvsettings.cpp
  242. llpanelevent.cpp
  243. llpanelexperiencelisteditor.cpp
  244. llpanelexperiencelog.cpp
  245. llpanelface.cpp
  246. hbpanelgrids.cpp
  247. llpanelgroup.cpp
  248. llpanelgroupbulk.cpp
  249. llpanelgroupexperiences.cpp
  250. llpanelgroupgeneral.cpp
  251. llpanelgrouplandmoney.cpp
  252. llpanelgroupnotices.cpp
  253. llpanelgrouproles.cpp
  254. llpanelinventory.cpp
  255. llpanelland.cpp
  256. llpanellandaudio.cpp
  257. hbpanellandenvironment.cpp
  258. llpanellandmedia.cpp
  259. llpanellogin.cpp
  260. llpanelminimap.cpp
  261. llpanelobject.cpp
  262. llpanelpermissions.cpp
  263. llpanelpick.cpp
  264. llpanelplace.cpp
  265. llpanelvolume.cpp
  266. llpanelworldmap.cpp
  267. llparcelselection.cpp
  268. llpatchvertexarray.cpp
  269. llpathfindingcharacter.cpp
  270. llpathfindingcharacterlist.cpp
  271. llpathfindinglinkset.cpp
  272. llpathfindinglinksetlist.cpp
  273. llpathfindingmanager.cpp
  274. llpathfindingnavmesh.cpp
  275. llpathfindingnavmeshstatus.cpp
  276. llpathfindingobject.cpp
  277. llpathfindingobjectlist.cpp
  278. llphysicsmotion.cpp
  279. llpipeline.cpp
  280. llprefschat.cpp
  281. hbprefscool.cpp
  282. llprefsgeneral.cpp
  283. llprefsgraphics.cpp
  284. llprefsim.cpp
  285. llprefsinput.cpp
  286. llprefsmedia.cpp
  287. llprefsnetwork.cpp
  288. llprefsnotifications.cpp
  289. llprefsskins.cpp
  290. llprefsvoice.cpp
  291. hbpreprocessor.cpp
  292. llpreview.cpp
  293. llpreviewanim.cpp
  294. llpreviewgesture.cpp
  295. llpreviewlandmark.cpp
  296. llpreviewmaterial.cpp
  297. llpreviewnotecard.cpp
  298. llpreviewscript.cpp
  299. llpreviewsound.cpp
  300. llpreviewtexture.cpp
  301. llproductinforequest.cpp
  302. llprogressview.cpp
  303. llreflectionmapmanager.cpp
  304. mkrlinterface.cpp
  305. llsavedlogins.cpp
  306. llscrollingpanelparam.cpp
  307. llselectmgr.cpp
  308. llskinningutil.cpp
  309. llsky.cpp
  310. llslurl.cpp
  311. llspatialpartition.cpp
  312. llstartup.cpp
  313. llstatusbar.cpp
  314. llsurface.cpp
  315. llsurfacepatch.cpp
  316. lltexturecache.cpp
  317. lltexturectrl.cpp
  318. lltexturefetch.cpp
  319. lltextureview.cpp
  320. lltinygltfhelper.cpp
  321. qltoolalign.cpp
  322. lltoolbar.cpp
  323. lltoolbrushland.cpp
  324. lltoolcomp.cpp
  325. lltool.cpp
  326. lltooldraganddrop.cpp
  327. lltoolface.cpp
  328. lltoolfocus.cpp
  329. lltoolgrab.cpp
  330. lltoolmgr.cpp
  331. lltoolobjpicker.cpp
  332. lltoolpie.cpp
  333. lltoolpipette.cpp
  334. lltoolplacer.cpp
  335. lltoolselect.cpp
  336. lltoolselectland.cpp
  337. lltoolselectrect.cpp
  338. lltoolview.cpp
  339. lltracker.cpp
  340. llurldispatcher.cpp
  341. llvelocitybar.cpp
  342. llviewerassetstorage.cpp
  343. llviewerassetupload.cpp
  344. llvieweraudio.cpp
  345. hbviewerautomation.cpp
  346. llviewercamera.cpp
  347. llviewercontrol.cpp
  348. llviewerdisplay.cpp
  349. llviewerdisplayname.cpp
  350. llviewerfoldertype.cpp
  351. llviewergesture.cpp
  352. llviewerinventory.cpp
  353. llviewerjointattachment.cpp
  354. llviewerjoint.cpp
  355. llviewerjointmesh.cpp
  356. llviewerjoystick.cpp
  357. llviewerkeyboard.cpp
  358. llviewermedia.cpp
  359. llviewermediafocus.cpp
  360. llviewermenu.cpp
  361. llviewermessage.cpp
  362. llviewerobject.cpp
  363. llviewerobjectexport.cpp
  364. llviewerobjectlist.cpp
  365. llvieweroctree.cpp
  366. llviewerparcelmedia.cpp
  367. llviewerparcelmgr.cpp
  368. llviewerparceloverlay.cpp
  369. llviewerpartsim.cpp
  370. llviewerpartsource.cpp
  371. llviewerregion.cpp
  372. llviewershadermgr.cpp
  373. llviewerstats.cpp
  374. llviewertexlayer.cpp
  375. llviewertexteditor.cpp
  376. llviewertextureanim.cpp
  377. llviewertexture.cpp
  378. llviewertexturelist.cpp
  379. llviewerthrottle.cpp
  380. llviewerwearable.cpp
  381. llviewerwindow.cpp
  382. llvisualparamhint.cpp
  383. llvlcomposition.cpp
  384. llvlmanager.cpp
  385. llvoavatar.cpp
  386. llvoavatarpuppet.cpp
  387. llvoavatarself.cpp
  388. llvocache.cpp
  389. llvoclouds.cpp
  390. llvograss.cpp
  391. llvoicechannel.cpp
  392. llvoiceclient.cpp
  393. llvoiceremotectrl.cpp
  394. llvoicevisualizer.cpp
  395. llvoicevivox.cpp
  396. llvoicewebrtc.cpp
  397. llvoinventorylistener.cpp
  398. llvopartgroup.cpp
  399. llvosky.cpp
  400. llvosurfacepatch.cpp
  401. llvotree.cpp
  402. llvovolume.cpp
  403. llvowater.cpp
  404. llvowlsky.cpp
  405. llwearablelist.cpp
  406. llweb.cpp
  407. llwind.cpp
  408. llwlskyparammgr.cpp
  409. llwlwaterparammgr.cpp
  410. llworld.cpp
  411. llworldmap.cpp
  412. )
  413. # This gets renamed in the packaging step
  414. set(VIEWER_BINARY_NAME "CoolVLViewer" CACHE STRING
  415. "The name of the viewer executable to create.")
  416. set(viewer_HEADER_FILES
  417. CMakeLists.txt
  418. llagent.h
  419. llagentpilot.h
  420. llagentwearables.h
  421. llaisapi.h
  422. llappcorehttp.h
  423. llappearancemgr.h
  424. llappviewer.h
  425. llaudiosourcevo.h
  426. llavataractions.h
  427. llavatarproperties.h
  428. llavatartracker.h
  429. llchat.h
  430. llchatbar.h
  431. llcloud.h
  432. llcolorswatch.h
  433. llcommandhandler.h
  434. llcurrencyuimanager.h
  435. lldebugview.h
  436. lldrawable.h
  437. lldrawpool.h
  438. lldrawpoolalpha.h
  439. lldrawpoolavatar.h
  440. lldrawpoolbump.h
  441. lldrawpoolmaterials.h
  442. lldrawpoolsimple.h
  443. lldrawpoolsky.h
  444. lldrawpoolterrain.h
  445. lldrawpooltree.h
  446. lldrawpoolwater.h
  447. lldrawpoolwlsky.h
  448. lldynamictexture.h
  449. llenvironment.h
  450. llenvsettings.h
  451. lleventnotifier.h
  452. lleventpoll.h
  453. llexperiencelog.h
  454. llface.h
  455. llfasttimerview.h
  456. llfeaturemanager.h
  457. llfetchedgltfmaterial.h
  458. llfirstuse.h
  459. llflexibleobject.h
  460. llfloaterabout.h
  461. llfloateractivespeakers.h
  462. llfloateranimpreview.h
  463. hbfloaterareasearch.h
  464. llfloaterauction.h
  465. llfloateravatarinfo.h
  466. llfloateravatarpicker.h
  467. llfloateravatartextures.h
  468. llfloaterbeacons.h
  469. llfloaterbulkpermission.h
  470. hbfloaterbump.h
  471. llfloaterbuy.h
  472. llfloaterbuycontents.h
  473. llfloaterbuycurrency.h
  474. llfloaterbuyland.h
  475. llfloatercamera.h
  476. llfloaterchat.h
  477. llfloaterchatterbox.h
  478. llfloaterclassified.h
  479. llfloatercolorpicker.h
  480. llfloatercustomize.h
  481. llfloaterdebugsettings.h
  482. hbfloaterdebugtags.h
  483. llfloaterdisplayname.h
  484. hbfloatereditenvsettings.h
  485. llfloatereditui.h
  486. llfloaterevent.h
  487. llfloaterexperiencepicker.h
  488. llfloaterexperienceprofile.h
  489. llfloaterexperiences.h
  490. llfloaterfriends.h
  491. llfloatergesture.h
  492. llfloatergodtools.h
  493. llfloatergroupbulkban.h
  494. llfloatergroupinfo.h
  495. llfloatergroupinvite.h
  496. llfloatergroups.h
  497. hbfloatergrouptitles.h
  498. llfloaterim.h
  499. llfloaterimagepreview.h
  500. llfloaterinspect.h
  501. llfloaterinventory.h
  502. hbfloaterinvitemspicker.h
  503. llfloaterjoystick.h
  504. llfloaterlagmeter.h
  505. llfloaterland.h
  506. llfloaterlandholdings.h
  507. hbfloatermakenewoutfit.h
  508. llfloatermarketplace.h
  509. llfloatermediabrowser.h
  510. slfloatermediafilter.h
  511. llfloatermediasettings.h
  512. llfloaterminimap.h
  513. llfloatermodelpreview.h
  514. llfloatermove.h
  515. llfloatermute.h
  516. llfloaternearbymedia.h
  517. llfloaternewim.h
  518. llfloaternotificationsconsole.h
  519. llfloaterobjectiminfo.h
  520. llfloaterobjectweights.h
  521. llfloateropenobject.h
  522. llfloaterparcel.h
  523. llfloaterpathfindingcharacters.h
  524. llfloaterpathfindinglinksets.h
  525. llfloaterpathfindingobjects.h
  526. llfloaterpay.h
  527. llfloaterpostcard.h
  528. llfloaterpreference.h
  529. llfloaterperms.h
  530. llfloaterproperties.h
  531. hbfloaterradar.h
  532. llfloaterregiondebugconsole.h
  533. llfloaterregioninfo.h
  534. llfloaterreporter.h
  535. hbfloaterrlv.h
  536. llfloatersearchreplace.h
  537. llfloaterscriptdebug.h
  538. llfloaterscriptqueue.h
  539. hbfloatersearch.h
  540. llfloatersellland.h
  541. llfloatersnapshot.h
  542. hbfloatersoundslist.h
  543. llfloaterstats.h
  544. llfloatertelehub.h
  545. hbfloaterteleporthistory.h
  546. hbfloatertextinput.h
  547. hbfloaterthumbnail.h
  548. llfloatertools.h
  549. llfloatertopobjects.h
  550. llfloatertos.h
  551. hbfloateruploadasset.h
  552. llfloaterurldisplay.h
  553. llfloaterurlentry.h
  554. llfloatervoicedevicesettings.h
  555. llfloaterwindlight.h
  556. llfloaterworldmap.h
  557. llfolderview.h
  558. llfollowcam.h
  559. llgesturemgr.h
  560. llgltfmateriallist.h
  561. llgltfmaterialpreview.h
  562. llgltfscenemanager.h
  563. llgridmanager.h
  564. llgroupmgr.h
  565. llgroupnotify.h
  566. llhoverview.h
  567. llhudeffect.h
  568. llhudeffectlookat.h
  569. llhudeffectpointat.h
  570. llhudeffectspiral.h
  571. llhudicon.h
  572. llhudmanager.h
  573. llhudobject.h
  574. llhudtext.h
  575. llhudview.h
  576. llimmgr.h
  577. llinventoryactions.h
  578. llinventorybridge.h
  579. hbinventoryclipboard.h
  580. llinventoryicon.h
  581. llinventorymodel.h
  582. llinventorymodelfetch.h
  583. lljoystickbutton.h
  584. lllandmarklist.h
  585. lllocalbitmaps.h
  586. lllocalgltfmaterials.h
  587. lllogchat.h
  588. llmanip.h
  589. llmaniprotate.h
  590. llmanipscale.h
  591. llmaniptranslate.h
  592. llmarketplacefunctions.h
  593. llmaterialmgr.h
  594. llmediactrl.h
  595. llmediadataclient.h
  596. llmediaremotectrl.h
  597. llmeshrepository.h
  598. llmorphview.h
  599. llmutelist.h
  600. llnotify.h
  601. hbobjectbackup.h
  602. lloverlaybar.h
  603. llpanelaudiovolume.h
  604. llpanelavatar.h
  605. llpanelclassified.h
  606. llpanelcontents.h
  607. llpaneldirbrowser.h
  608. llpaneldirclassified.h
  609. llpaneldirevents.h
  610. llpaneldirfind.h
  611. llpaneldirgroups.h
  612. llpaneldirland.h
  613. llpaneldirpeople.h
  614. llpaneldirplaces.h
  615. llpaneleditwearable.h
  616. llpanelenvsettings.h
  617. llpanelevent.h
  618. llpanelexperiencelisteditor.h
  619. llpanelexperiencelog.h
  620. llpanelface.h
  621. hbpanelgrids.h
  622. llpanelgroup.h
  623. llpanelgroupbulk.h
  624. llpanelgroupexperiences.h
  625. llpanelgroupgeneral.h
  626. llpanelgrouplandmoney.h
  627. llpanelgroupnotices.h
  628. llpanelgrouproles.h
  629. llpanelinventory.h
  630. llpanelland.h
  631. llpanellandaudio.h
  632. hbpanellandenvironment.h
  633. llpanellandmedia.h
  634. llpanellogin.h
  635. llpanelminimap.h
  636. llpanelobject.h
  637. llpanelpermissions.h
  638. llpanelpick.h
  639. llpanelplace.h
  640. llpanelvolume.h
  641. llpanelworldmap.h
  642. llparcelselection.h
  643. llpatchvertexarray.h
  644. llpathfindingcharacter.h
  645. llpathfindingcharacterlist.h
  646. llpathfindinglinkset.h
  647. llpathfindinglinksetlist.h
  648. llpathfindingmanager.h
  649. llpathfindingnavmesh.h
  650. llpathfindingnavmeshstatus.h
  651. llpathfindingobject.h
  652. llpathfindingobjectlist.h
  653. llphysicsmotion.h
  654. llpipeline.h
  655. llprefschat.h
  656. hbprefscool.h
  657. llprefsgeneral.h
  658. llprefsgraphics.h
  659. llprefsim.h
  660. llprefsinput.h
  661. llprefsmedia.h
  662. llprefsnetwork.h
  663. llprefsnotifications.h
  664. llprefsskins.h
  665. llprefsvoice.h
  666. hbpreprocessor.h
  667. llpreview.h
  668. llpreviewanim.h
  669. llpreviewgesture.h
  670. llpreviewlandmark.h
  671. llpreviewmaterial.h
  672. llpreviewnotecard.h
  673. llpreviewscript.h
  674. llpreviewsound.h
  675. llpreviewtexture.h
  676. llproductinforequest.h
  677. llprogressview.h
  678. llreflectionmapmanager.h
  679. mkrlinterface.h
  680. llsavedlogins.h
  681. llscrollingpanelparam.h
  682. llselectmgr.h
  683. llskinningutil.h
  684. llsky.h
  685. llslurl.h
  686. llspatialpartition.h
  687. llstartup.h
  688. llstatusbar.h
  689. llsurface.h
  690. llsurfacepatch.h
  691. lltexturecache.h
  692. lltexturectrl.h
  693. lltexturefetch.h
  694. lltextureview.h
  695. lltinygltfhelper.h
  696. lltool.h
  697. qltoolalign.h
  698. lltoolbar.h
  699. lltoolbrushland.h
  700. lltoolcomp.h
  701. lltooldraganddrop.h
  702. lltoolface.h
  703. lltoolfocus.h
  704. lltoolgrab.h
  705. lltoolmgr.h
  706. lltoolobjpicker.h
  707. lltoolpie.h
  708. lltoolpipette.h
  709. lltoolplacer.h
  710. lltoolselect.h
  711. lltoolselectland.h
  712. lltoolselectrect.h
  713. lltoolview.h
  714. lltracker.h
  715. llurldispatcher.h
  716. llvelocitybar.h
  717. llviewerassetstorage.h
  718. llviewerassetupload.h
  719. llvieweraudio.h
  720. hbviewerautomation.h
  721. llviewercamera.h
  722. llviewercontrol.h
  723. llviewerdisplay.h
  724. llviewerdisplayname.h
  725. llviewerfoldertype.h
  726. llviewergesture.h
  727. llviewerinventory.h
  728. llviewerjoint.h
  729. llviewerjointattachment.h
  730. llviewerjointmesh.h
  731. llviewerjoystick.h
  732. llviewerkeyboard.h
  733. llviewermedia.h
  734. llviewermediafocus.h
  735. llviewermenu.h
  736. llviewermessage.h
  737. llviewerobject.h
  738. llviewerobjectexport.h
  739. llviewerobjectlist.h
  740. llvieweroctree.h
  741. llviewerparcelmedia.h
  742. llviewerparcelmgr.h
  743. llviewerparceloverlay.h
  744. llviewerpartsim.h
  745. llviewerpartsource.h
  746. llviewerprecompiledheaders.h
  747. llviewerregion.h
  748. llviewershadermgr.h
  749. llviewerstats.h
  750. llviewertexlayer.h
  751. llviewertexteditor.h
  752. llviewertextureanim.h
  753. llviewertexture.h
  754. llviewertexturelist.h
  755. llviewerthrottle.h
  756. llviewerwearable.h
  757. llviewerwindow.h
  758. llvisualparamhint.h
  759. llvlcomposition.h
  760. llvlmanager.h
  761. llvoavatar.h
  762. llvoavatarpuppet.h
  763. llvoavatarself.h
  764. llvocache.h
  765. llvoclouds.h
  766. llvograss.h
  767. llvoicechannel.h
  768. llvoiceclient.h
  769. llvoiceremotectrl.h
  770. llvoicevisualizer.h
  771. llvoicevivox.h
  772. llvoicewebrtc.h
  773. llvoinventorylistener.h
  774. llvopartgroup.h
  775. llvosky.h
  776. llvosurfacepatch.h
  777. llvotree.h
  778. llvovolume.h
  779. llvowater.h
  780. llvowlsky.h
  781. llweb.h
  782. llwind.h
  783. llwlskyparammgr.h
  784. llwlwaterparammgr.h
  785. llworld.h
  786. llworldmap.h
  787. roles_constants.h
  788. )
  789. if (ENABLE_PUPPETRY)
  790. list(APPEND viewer_SOURCE_FILES llpuppetmodule.cpp llpuppetmotion.cpp)
  791. list(APPEND viewer_HEADER_FILES llpuppetmodule.h llpuppetmotion.h)
  792. endif (ENABLE_PUPPETRY)
  793. if (DARWIN)
  794. list(APPEND viewer_HEADER_FILES llappviewermacosx-objc.h)
  795. list(APPEND viewer_SOURCE_FILES llappviewermacosx.cpp)
  796. list(APPEND viewer_SOURCE_FILES llappviewermacosx-objc.mm)
  797. # This should be compiled with the viewer.
  798. list(APPEND viewer_SOURCE_FILES llappdelegate-objc.mm)
  799. include(CMakeFindFrameworks)
  800. find_library(CARBON_LIBRARY Carbon)
  801. find_library(AGL_LIBRARY AGL)
  802. find_library(APPKIT_LIBRARY AppKit)
  803. find_library(COCOA_LIBRARY Cocoa)
  804. find_library(IOKIT_LIBRARY IOKit)
  805. if (OPENMP)
  806. set(viewer_LIBRARIES
  807. ${COCOA_LIBRARY}
  808. ${CARBON_LIBRARY}
  809. ${AGL_LIBRARY}
  810. ${IOKIT_LIBRARY}
  811. omp
  812. )
  813. else (OPENMP)
  814. set(viewer_LIBRARIES
  815. ${COCOA_LIBRARY}
  816. ${CARBON_LIBRARY}
  817. ${AGL_LIBRARY}
  818. ${IOKIT_LIBRARY}
  819. )
  820. endif (OPENMP)
  821. # Add resource files to the project.
  822. set(viewer_RESOURCE_FILES
  823. ${VIEWER_BRANDING_ID}.icns
  824. Info-${VIEWER_BRANDING_NAME_CAMELCASE}.plist
  825. ${VIEWER_BRANDING_NAME_CAMELCASE}.xib
  826. # CMake does not seem to support Xcode language variants well just yet
  827. English.lproj/InfoPlist.strings
  828. English.lproj/language.txt
  829. )
  830. set_source_files_properties(
  831. ${viewer_RESOURCE_FILES}
  832. PROPERTIES
  833. HEADER_FILE_ONLY TRUE
  834. #MACOSX_PACKAGE_LOCATION Resources #don't do this! this tells cmake to copy the files.
  835. )
  836. source_group("Resources" FILES ${viewer_RESOURCE_FILES})
  837. list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
  838. endif (DARWIN)
  839. if (LINUX)
  840. list(APPEND viewer_SOURCE_FILES llappviewerlinux.cpp)
  841. if (OPENMP)
  842. set(viewer_LIBRARIES ${GLIB_LIBRARIES} Xinerama omp)
  843. else (OPENMP)
  844. set(viewer_LIBRARIES ${GLIB_LIBRARIES} Xinerama)
  845. endif (OPENMP)
  846. endif (LINUX)
  847. if (WINDOWS)
  848. list(APPEND viewer_SOURCE_FILES
  849. llappviewerwin32.cpp
  850. windows.manifest
  851. )
  852. list(APPEND viewer_HEADER_FILES
  853. llappviewerwin32.h
  854. )
  855. # NOTE: this trick is only useful with old cmake versions. With v3.16.0+,
  856. # we use cmake's new target_precompile_headers instead. HB
  857. if (${CMAKE_VERSION} VERSION_LESS "3.16.0")
  858. # Pre-compiled header configuration; llviewerprecompiledheaders.cpp
  859. # generates the .pch file. All sources added to viewer_SOURCE_FILES at this
  860. # point use it. We also add /Zm150 to avoid running out of memory (due to
  861. # large includes).
  862. set_source_files_properties(llviewerprecompiledheaders.cpp
  863. PROPERTIES
  864. COMPILE_FLAGS "/Ycllviewerprecompiledheaders.h /Zm150"
  865. )
  866. foreach(src_file ${viewer_SOURCE_FILES})
  867. set_source_files_properties(
  868. ${src_file}
  869. PROPERTIES
  870. COMPILE_FLAGS "/Yullviewerprecompiledheaders.h /Zm150"
  871. )
  872. endforeach(src_file ${viewer_SOURCE_FILES})
  873. list(APPEND viewer_SOURCE_FILES llviewerprecompiledheaders.cpp)
  874. endif (${CMAKE_VERSION} VERSION_LESS "3.16.0")
  875. # Add resource files to the project. viewerRes.rc is the only buildable file,
  876. # but the rest are all dependencies of it.
  877. set(viewer_RESOURCE_FILES
  878. res/arrow.cur
  879. res/arrowcop.cur
  880. res/arrowcopmulti.cur
  881. res/arrowdrag.cur
  882. res/circleandline.cur
  883. res/icon1.ico
  884. res/llarrow.cur
  885. res/llarrowdrag.cur
  886. res/llarrowdragmulti.cur
  887. res/llarrowlocked.cur
  888. res/llgrablocked.cur
  889. res/llno.cur
  890. res/llnolocked.cur
  891. res/lltoolcamera.cur
  892. res/lltoolcreate.cur
  893. res/lltoolfocus.cur
  894. res/lltoolgrab.cur
  895. res/lltoolland.cur
  896. res/lltoolpan.cur
  897. res/lltoolpipette.cur
  898. res/lltoolrotate.cur
  899. res/lltoolscale.cur
  900. res/lltooltranslate.cur
  901. res/lltoolzoomin.cur
  902. res/lltoolzoomout.cur
  903. res/ll_icon.BMP
  904. res/ll_icon.ico
  905. res/resource.h
  906. res/toolbuy.cur
  907. res/toolopen.cur
  908. res/toolpay.cur
  909. res/toolpickobject.cur
  910. res/toolpickobject2.cur
  911. res/toolpickobject3.cur
  912. res/toolpipette.cur
  913. res/toolsit.cur
  914. res/lltoolpathfinding.cur
  915. res/lltoolpathfindingpathend.cur
  916. res/lltoolpathfindingpathendadd.cur
  917. res/lltoolpathfindingpathstart.cur
  918. res/lltoolpathfindingpathstartadd.cur
  919. res/llno.cur
  920. )
  921. set_source_files_properties(${viewer_RESOURCE_FILES}
  922. PROPERTIES HEADER_FILE_ONLY TRUE)
  923. set(viewer_RESOURCE_FILES
  924. res/resource.h
  925. res/viewerRes.rc
  926. ${viewer_RESOURCE_FILES}
  927. )
  928. source_group("Resource Files" FILES ${viewer_RESOURCE_FILES})
  929. list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES})
  930. set(viewer_LIBRARIES
  931. opengl32
  932. comdlg32
  933. dxguid
  934. kernel32
  935. odbc32
  936. odbccp32
  937. ole32
  938. oleaut32
  939. Vfw32
  940. winspool
  941. )
  942. find_library(INTEL_MEMOPS_LIBRARY
  943. NAMES ll_intel_memops
  944. PATHS
  945. optimized ${ARCH_PREBUILT_DIRS_RELEASE}
  946. debug ${ARCH_PREBUILT_DIRS_DEBUG}
  947. )
  948. mark_as_advanced(INTEL_MEMOPS_LIBRARY)
  949. if (INTEL_MEMOPS_LIBRARY)
  950. list(APPEND viewer_LIBRARIES ${INTEL_MEMOPS_LIBRARY})
  951. endif (INTEL_MEMOPS_LIBRARY)
  952. endif (WINDOWS)
  953. # Add the xui files. This is handy for searching for xui elements from within
  954. ## the IDE.
  955. file(GLOB viewer_XUI_FILE_GLOB_LIST
  956. ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/xui/en-us/*.xml
  957. )
  958. set(viewer_XUI_FILES
  959. ${CMAKE_CURRENT_SOURCE_DIR}/skins/default/colors_base.xml
  960. )
  961. list(APPEND viewer_XUI_FILES ${viewer_XUI_FILE_GLOB_LIST})
  962. list(SORT viewer_XUI_FILES)
  963. source_group("XUI Files" FILES ${viewer_XUI_FILES})
  964. set_source_files_properties(${viewer_XUI_FILES}
  965. PROPERTIES HEADER_FILE_ONLY TRUE)
  966. list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
  967. set(viewer_APPSETTINGS_FILES
  968. app_settings/anim.ini
  969. app_settings/cmd_line.xml
  970. app_settings/grass.xml
  971. app_settings/grids.xml
  972. app_settings/gpu_table.txt
  973. app_settings/high_graphics.xml
  974. app_settings/keys.ini
  975. app_settings/keywords.ini
  976. app_settings/logcontrol.xml
  977. app_settings/low_graphics.xml
  978. app_settings/mid_graphics.xml
  979. app_settings/mime_types.xml
  980. app_settings/message.xml
  981. app_settings/settings.xml
  982. app_settings/settings_files.xml
  983. app_settings/settings_per_account.xml
  984. app_settings/std_bump.ini
  985. app_settings/trees.xml
  986. app_settings/ultra_graphics.xml
  987. app_settings/message_template.msg
  988. )
  989. source_group("App Settings" FILES ${viewer_APPSETTINGS_FILES})
  990. set_source_files_properties(${viewer_APPSETTINGS_FILES}
  991. PROPERTIES HEADER_FILE_ONLY TRUE)
  992. list(APPEND viewer_SOURCE_FILES ${viewer_APPSETTINGS_FILES})
  993. set(viewer_CHARACTER_FILES
  994. character/attentions.xml
  995. character/avatar_lad.xml
  996. character/avatar_skeleton.xml
  997. character/avatar_constraint.llsd
  998. )
  999. source_group("Character File" FILES ${viewer_CHARACTER_FILES})
  1000. set_source_files_properties(${viewer_CHARACTER_FILES}
  1001. PROPERTIES HEADER_FILE_ONLY TRUE)
  1002. list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES})
  1003. list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES})
  1004. set_source_files_properties(${viewer_HEADER_FILES}
  1005. PROPERTIES HEADER_FILE_ONLY TRUE)
  1006. add_executable(${VIEWER_BINARY_NAME}
  1007. WIN32
  1008. MACOSX_BUNDLE
  1009. ${viewer_SOURCE_FILES}
  1010. )
  1011. # *NOTE: - this list is very sensitive to ordering, test carefully on all
  1012. # platforms if you change the releative order of the entries here.
  1013. # In particular, cmake 2.6.4 (when buidling with linux/makefile generators)
  1014. # appears to sometimes de-duplicate redundantly listed dependencies improperly.
  1015. # To work around this, higher level modules should be listed before the modules
  1016. # that they depend upon. -brad
  1017. #
  1018. # *NOTE: On mixing system shared libraries and updated static archives. We use
  1019. # a number of libraries that have an existence as system libraries, internal
  1020. # use libraries and applications libraries. The most-referenced one of these
  1021. # is libz where you can find four or more versions in play at once. On Linux,
  1022. # libz can be found at link and run time via a number of paths:
  1023. #
  1024. # => -lfreetype
  1025. # => libz.so.1 (on install machine, not build)
  1026. # => -lSDL
  1027. # => libz.so.1 (on install machine, not build)
  1028. # => -lz
  1029. #
  1030. # We generally want the newest version of the library to provide all symbol
  1031. # resolution. To that end, when using static archives, the *_PRELOAD_ARCHIVES
  1032. # variables, PNG_PRELOAD_ARCHIVES and ZLIB_PRELOAD_ARCHIVES, get the archives
  1033. # dumped into the target binary and runtime lookup will find the most modern
  1034. # version.
  1035. target_link_libraries(${VIEWER_BINARY_NAME}
  1036. # Make sure MIMALLOC_OBJECT and WINDOWS_LIBRARIES appear first in the list of
  1037. # target link libraries. HB
  1038. ${MIMALLOC_OBJECT}
  1039. ${WINDOWS_LIBRARIES}
  1040. ${PNG_PRELOAD_ARCHIVES}
  1041. ${ZLIB_PRELOAD_ARCHIVES}
  1042. ${LLAPPEARANCE_LIBRARIES}
  1043. ${LLAUDIO_LIBRARIES}
  1044. ${LLCHARACTER_LIBRARIES}
  1045. ${LLIMAGE_LIBRARIES}
  1046. ${LLIMAGEJ2COJ_LIBRARIES}
  1047. ${LLINVENTORY_LIBRARIES}
  1048. ${LLMESSAGE_LIBRARIES}
  1049. ${LLPLUGIN_LIBRARIES}
  1050. ${LLGLTF_LIBRARIES}
  1051. ${LLPRIMITIVE_LIBRARIES}
  1052. ${LLRENDER_LIBRARIES}
  1053. ${FREETYPE2_LIBRARIES}
  1054. ${LLUI_LIBRARIES}
  1055. ${LLFILESYSTEM_LIBRARIES}
  1056. ${LLWINDOW_LIBRARIES}
  1057. ${LLXML_LIBRARIES}
  1058. ${LLMATH_LIBRARIES}
  1059. ${LLCOMMON_LIBRARIES}
  1060. ${NDOF_LIBRARY}
  1061. ${FMODWRAPPER_LIBRARY}
  1062. ${GLOD_LIBRARIES}
  1063. ${HUNSPELL_LIBRARY}
  1064. ${LUA_LIBRARIES}
  1065. ${OPENGL_LIBRARIES}
  1066. ${SDL_LIBRARY}
  1067. ${SMARTHEAP_LIBRARY}
  1068. ${UI_LIBRARIES}
  1069. ${ELFIO_LIBRARIES}
  1070. ${LLCONVEXDECOMP_LIBRARY}
  1071. ${HACD_LIBRARY}
  1072. ${viewer_LIBRARIES}
  1073. ${JEMALLOC_LIBRARY}
  1074. )
  1075. # Add OS-independent dependencies for plugins
  1076. add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_cef media_plugin_gstreamer)
  1077. if (NOT ${CMAKE_VERSION} VERSION_LESS "3.16.0")
  1078. target_precompile_headers(${VIEWER_BINARY_NAME} PRIVATE llviewerprecompiledheaders.h <llfasttimer.h> <llfloater.h> <glh_linear.h>)
  1079. endif()
  1080. if (ENABLE_PUPPETRY)
  1081. set(CUSTOM_OPTION "${CUSTOM_OPTION} puppetry")
  1082. endif (ENABLE_PUPPETRY)
  1083. if (OPENMP)
  1084. set(CUSTOM_OPTION "${CUSTOM_OPTION} openmp")
  1085. endif (OPENMP)
  1086. if (NOT DARWIN)
  1087. set(PACKAGE_DEFAULT ON)
  1088. else (NOT DARWIN)
  1089. set(PACKAGE_DEFAULT OFF)
  1090. endif (NOT DARWIN)
  1091. set(PACKAGE ${PACKAGE_DEFAULT} CACHE BOOL
  1092. "Add a packaging target that builds an installer package.")
  1093. set(MANIFEST_SCRIPT ${CMAKE_SOURCE_DIR}/../scripts/viewer_manifest.py)
  1094. if (WINDOWS)
  1095. set_target_properties(${VIEWER_BINARY_NAME}
  1096. PROPERTIES
  1097. LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS"
  1098. LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
  1099. LINK_FLAGS_RELEASE "/FORCE:MULTIPLE /OPT:REF"
  1100. )
  1101. set(RELEASE_VIEWER_DIR "viewer-win64-release")
  1102. add_custom_command(
  1103. OUTPUT ${CMAKE_CFG_INTDIR}/touched.bat
  1104. COMMAND ${PYTHON_EXECUTABLE}
  1105. ARGS
  1106. ${MANIFEST_SCRIPT}
  1107. --configuration=${CMAKE_CFG_INTDIR}
  1108. --branding_id=${VIEWER_BRANDING_ID}
  1109. --source=${CMAKE_CURRENT_SOURCE_DIR}
  1110. --build=${CMAKE_CURRENT_BINARY_DIR}
  1111. --dest=${CMAKE_SOURCE_DIR}/../${RELEASE_VIEWER_DIR}
  1112. --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/touched.bat
  1113. --custom=${CUSTOM_OPTION}
  1114. DEPENDS ${VIEWER_BINARY_NAME} ${MANIFEST_SCRIPT}
  1115. )
  1116. if (PACKAGE)
  1117. add_custom_target(packaging ALL DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CFG_INTDIR}/touched.bat)
  1118. endif (PACKAGE)
  1119. endif (WINDOWS)
  1120. if (LINUX)
  1121. find_program(EUSTRIP eu-strip)
  1122. if (EUSTRIP)
  1123. add_custom_command(
  1124. OUTPUT ${VIEWER_BINARY_NAME}-stripped
  1125. COMMAND eu-strip
  1126. ARGS --strip-debug --remove-comment -o ${VIEWER_BINARY_NAME}-stripped -f ${VIEWER_BINARY_NAME}.debug ${VIEWER_BINARY_NAME}
  1127. DEPENDS ${VIEWER_BINARY_NAME}
  1128. COMMENT "Creating the stripped binary and the debug symbols files."
  1129. )
  1130. else (EUSTRIP)
  1131. add_custom_command(
  1132. OUTPUT ${VIEWER_BINARY_NAME}-stripped
  1133. COMMAND strip
  1134. ARGS --strip-debug -o ${VIEWER_BINARY_NAME}-stripped ${VIEWER_BINARY_NAME}
  1135. DEPENDS ${VIEWER_BINARY_NAME}
  1136. COMMENT "Creating the stripped binary."
  1137. )
  1138. endif (EUSTRIP)
  1139. set(product ${VIEWER_BRANDING_NAME_CAMELCASE}-${ARCH}-${viewer_VER})
  1140. add_custom_command(
  1141. OUTPUT ${product}.tar.bz2
  1142. COMMAND ${PYTHON_EXECUTABLE}
  1143. ARGS
  1144. ${MANIFEST_SCRIPT}
  1145. --branding_id=${VIEWER_BRANDING_ID}
  1146. --installer_name=${product}
  1147. --source=${CMAKE_CURRENT_SOURCE_DIR}
  1148. --build=${CMAKE_CURRENT_BINARY_DIR}
  1149. --dest=${CMAKE_CURRENT_BINARY_DIR}/packaged
  1150. --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
  1151. --buildtype=${CMAKE_BUILD_TYPE}
  1152. --custom=${CUSTOM_OPTION}
  1153. DEPENDS ${VIEWER_BINARY_NAME}-stripped ${MANIFEST_SCRIPT}
  1154. COMMENT "Performing viewer_manifest copy"
  1155. )
  1156. if (PACKAGE)
  1157. add_custom_target(packaging ALL DEPENDS ${product}.tar.bz2)
  1158. endif (PACKAGE)
  1159. endif (LINUX)
  1160. if (DARWIN)
  1161. string(TIMESTAMP CURRENTYEAR "%Y")
  1162. set(product ${VIEWER_BRANDING_NAME})
  1163. set(MACOSX_BUNDLE_INFO_STRING "${VIEWER_BRANDING_NAME}")
  1164. set(MACOSX_BUNDLE_ICON_FILE "${VIEWER_BRANDING_ID}.icns")
  1165. set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.secondlife.coolvlviewer")
  1166. set(MACOSX_BUNDLE_BUNDLE_NAME "${VIEWER_BRANDING_NAME}")
  1167. set(MACOSX_BUNDLE_LONG_VERSION_STRING "${viewer_VER}")
  1168. set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${viewer_VER}")
  1169. set(MACOSX_BUNDLE_BUNDLE_VERSION "${viewer_VER}")
  1170. set(MACOSX_BUNDLE_COPYRIGHT "Copyright (c) 2007-${CURRENTYEAR} Linden Research Inc., Henri Beauchamp and many other Open Source contributors")
  1171. set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "${VIEWER_BRANDING_NAME_CAMELCASE}.nib")
  1172. set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "LLApplication")
  1173. set_target_properties(
  1174. ${VIEWER_BINARY_NAME}
  1175. PROPERTIES
  1176. OUTPUT_NAME "${product}"
  1177. MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info-${VIEWER_BRANDING_NAME_CAMELCASE}.plist"
  1178. XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${MACOSX_BUNDLE_GUI_IDENTIFIER}"
  1179. )
  1180. configure_file(
  1181. "${CMAKE_CURRENT_SOURCE_DIR}/Info-${VIEWER_BRANDING_NAME_CAMELCASE}.plist"
  1182. "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${product}.app/Contents/Info.plist"
  1183. )
  1184. add_custom_command(
  1185. TARGET ${VIEWER_BINARY_NAME} PRE_BUILD
  1186. COMMAND ibtool
  1187. ARGS --compile ${CMAKE_CURRENT_SOURCE_DIR}/${VIEWER_BRANDING_NAME_CAMELCASE}.nib ${CMAKE_CURRENT_SOURCE_DIR}/${VIEWER_BRANDING_NAME_CAMELCASE}.xib
  1188. DEPENDS ${VIEWER_BRANDING_NAME_CAMELCASE}.xib
  1189. COMMENT "Generating the ${VIEWER_BRANDING_NAME_CAMELCASE}.nib file from ${VIEWER_BRANDING_NAME_CAMELCASE}.xib."
  1190. )
  1191. add_custom_command(
  1192. TARGET ${VIEWER_BINARY_NAME} POST_BUILD
  1193. COMMAND ${PYTHON_EXECUTABLE}
  1194. ARGS
  1195. ${MANIFEST_SCRIPT}
  1196. --actions=copy
  1197. --configuration=${CMAKE_CFG_INTDIR}
  1198. --source=${CMAKE_CURRENT_SOURCE_DIR}
  1199. --branding_id=${VIEWER_BRANDING_ID}
  1200. --build=${CMAKE_CURRENT_BINARY_DIR}
  1201. --dest=${CMAKE_CURRENT_BINARY_DIR}/../${product}.app
  1202. --buildtype=${CMAKE_BUILD_TYPE}
  1203. --custom=${CUSTOM_OPTION}
  1204. DEPENDS ${VIEWER_BINARY_NAME} ${VIEWER_BRANDING_NAME_CAMELCASE}.nib ${MANIFEST_SCRIPT}
  1205. COMMENT "Performing viewer_manifest copy"
  1206. )
  1207. endif (DARWIN)
  1208. get_directory_property(ALLDEFINES COMPILE_DEFINITIONS)
  1209. message("newview COMPILE_DEFINITIONS = ${ALLDEFINES}")
  1210. foreach(d ${ALLDEFINES})
  1211. if (WINDOWS)
  1212. set(defines "${defines} /D${d}")
  1213. else (WINDOWS)
  1214. set(defines "${defines} -D${d}")
  1215. endif (WINDOWS)
  1216. endforeach()
  1217. string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
  1218. if ("${build_type}" STREQUAL "DEBUG")
  1219. set(compiler_flags "${CMAKE_CXX_FLAGS_DEBUG}")
  1220. elseif ("${build_type}" STREQUAL "RELWITHDEBINFO")
  1221. set(compiler_flags "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
  1222. else ()
  1223. set(compiler_flags "${CMAKE_CXX_FLAGS_RELEASE}")
  1224. endif ()
  1225. if (USELTO AND NOT "${CMAKE_CXX_COMPILE_OPTIONS_IPO}" STREQUAL "")
  1226. foreach(f ${CMAKE_CXX_COMPILE_OPTIONS_IPO})
  1227. set(compiler_flags "${compiler_flags} ${f}")
  1228. endforeach()
  1229. endif ()
  1230. set(compiler_flags "${compiler_flags} ${CMAKE_CXX_FLAGS}${defines}")
  1231. message(STATUS "Compile flags for target ${CMAKE_BUILD_TYPE} = ${compiler_flags}")
  1232. if (SELECTED_LINKER)
  1233. message(STATUS "Using ld.${SELECTED_LINKER} as the linker.")
  1234. endif (SELECTED_LINKER)
  1235. # This is used in llfloaterabout.cpp to include the compile flags in the
  1236. # Version info tab
  1237. add_definitions(-DLL_COMPILE_FLAGS="\"${compiler_flags}\"")
  1238. # When using new libcurl, ngttp2 is also in use, so signal that as well for use
  1239. # in llfloaterabout.cpp. Also enable the workaround for the HTTP pipelining bug
  1240. # in new libcurl when in use...
  1241. if (USE_NEW_LIBCURL)
  1242. add_definitions(-DLL_NGHTTP2=1)
  1243. add_definitions(-DLL_CURL_BUG=1)
  1244. endif (USE_NEW_LIBCURL)