/[pcsx2_0.9.7]/trunk/pcsx2/CMakeLists.txt
ViewVC logotype

Contents of /trunk/pcsx2/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 185 - (show annotations) (download)
Mon Sep 13 19:49:07 2010 UTC (9 years, 4 months ago) by william
File MIME type: text/plain
File size: 12817 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.3761 local: v0.9.7.165-latest) in ./trunk
1 # Check that people use the good file
2 if(NOT TOP_CMAKE_WAS_SOURCED)
3 message(FATAL_ERROR "
4 You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
5 It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
6 endif(NOT TOP_CMAKE_WAS_SOURCED)
7
8
9 # set common flags
10 set(CommonFlags
11 -pthread
12 -fvisibility=hidden
13 -fno-guess-branch-probability
14 -fno-dse
15 -fno-tree-dse
16 -fno-strict-aliasing
17 -Wstrict-aliasing # Allow to track strict aliasing issue.
18 -pipe
19 -Wno-format
20 -Wno-unused-parameter
21 -Wno-unused-value
22 -Wunused-variable)
23
24 # set warning flags
25 set(DebugFlags
26 -W
27 -g)
28
29 # set optimization flags
30 set(OptimizationFlags
31 -falign-functions
32 -falign-jumps
33 -falign-labels
34 -falign-loops
35 -fcaller-saves
36 -fcprop-registers
37 -fcrossjumping
38 -fcse-follow-jumps
39 -fcse-skip-blocks
40 -fdefer-pop
41 -fdelete-null-pointer-checks
42 -fgcse
43 -fgcse-lm
44 -fif-conversion
45 -fif-conversion2
46 -fmerge-constants
47 -foptimize-sibling-calls
48 -fpeephole2
49 -fregmove
50 -freorder-blocks
51 -freorder-functions
52 -frerun-cse-after-loop
53 -fsched-interblock
54 -fsched-spec
55 -fstrict-overflow
56 -fthread-jumps
57 -ftree-ccp
58 -ftree-ch
59 -ftree-copyrename
60 -ftree-dce
61 -ftree-dominator-opts
62 -ftree-fre
63 -ftree-lrs
64 -ftree-pre
65 -ftree-sra
66 -ftree-ter
67 -ftree-vrp
68 -funit-at-a-time)
69
70 # Debug - Build
71 if(CMAKE_BUILD_TYPE STREQUAL Debug)
72
73 # executable name
74 set(Output pcsx2-dbg)
75
76 # add defines
77 add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG -DWX_PRECOMP)
78 endif(CMAKE_BUILD_TYPE STREQUAL Debug)
79
80 # Devel - Build
81 if(CMAKE_BUILD_TYPE STREQUAL Devel)
82
83 # executable name
84 set(Output pcsx2-dev)
85
86 # add defines
87 add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DWX_PRECOMP -DNDEBUG)
88 endif(CMAKE_BUILD_TYPE STREQUAL Devel)
89
90 # Release - Build
91 if(CMAKE_BUILD_TYPE STREQUAL Release)
92
93 # executable name
94 set(Output pcsx2)
95
96 # add defines
97 add_definitions(${CommonFlags} ${OptimizationFlags} -DWX_PRECOMP -DNDEBUG)
98 endif(CMAKE_BUILD_TYPE STREQUAL Release)
99
100 # you must have both svn client executable and a source that contains svn metadata
101 if(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
102 # execute subversion
103 Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
104
105 # write svnrev.h
106 file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
107 else(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
108 # write svnrev.h
109 file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
110 endif(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
111
112 # variable with sources of this executable
113 set(pcsx2Sources
114 Cache.cpp
115 COP0.cpp
116 COP2.cpp
117 Counters.cpp
118 GameDatabase.cpp
119 Dump.cpp
120 Elfheader.cpp
121 FiFo.cpp
122 FPU.cpp
123 Gif.cpp
124 GS.cpp
125 GSState.cpp
126 Hw.cpp
127 HwRead.cpp
128 HwWrite.cpp
129 Interpreter.cpp
130 IopBios.cpp
131 IopCounters.cpp
132 IopDma.cpp
133 IopHw.cpp
134 IopIrq.cpp
135 IopMem.cpp
136 IopSio2.cpp
137 # Mdec.cpp
138 Memory.cpp
139 MMI.cpp
140 MTGS.cpp
141 Patch.cpp
142 Patch_Memory.cpp
143 Pcsx2Config.cpp
144 PluginManager.cpp
145 PrecompiledHeader.cpp
146 R3000A.cpp
147 R3000AInterpreter.cpp
148 R3000AOpcodeTables.cpp
149 R5900.cpp
150 R5900OpcodeImpl.cpp
151 R5900OpcodeTables.cpp
152 SaveState.cpp
153 ShiftJisToUnicode.cpp
154 Sif.cpp
155 Sif0.cpp
156 Sif1.cpp
157 Sio.cpp
158 SourceLog.cpp
159 SPR.cpp
160 Stats.cpp
161 System.cpp
162 Vif0_Dma.cpp
163 Vif1_Dma.cpp
164 Vif1_MFIFO.cpp
165 Vif.cpp
166 Vif_Codes.cpp
167 Vif_Transfer.cpp
168 Vif_Unpack.cpp
169 vtlb.cpp
170 VU0.cpp
171 VUmicro.cpp
172 VU0micro.cpp
173 VU0microInterp.cpp
174 VU1micro.cpp
175 VU1microInterp.cpp
176 VUflags.cpp
177 VUmicroMem.cpp
178 VUops.cpp)
179
180 # variable with sources of this executable
181 set(pcsx2Headers
182 Cache.h
183 cheatscpp.h
184 Common.h
185 Config.h
186 COP0.h
187 Counters.h
188 Dmac.h
189 Dump.h
190 GameDatabase.h
191 Elfheader.h
192 Gif.h
193 GS.h
194 Hardware.h
195 Hw.h
196 IopBios.h
197 IopCommon.h
198 IopCounters.h
199 IopDma.h
200 IopHw.h
201 IopMem.h
202 IopSio2.h
203 # Mdec.h
204 Memory.h
205 MemoryTypes.h
206 NakedAsm.h
207 Patch.h
208 Patch_Obsolete.h
209 PathDefs.h
210 Plugins.h
211 PrecompiledHeader.h
212 R3000A.h
213 R5900Exceptions.h
214 R5900.h
215 R5900OpcodeTables.h
216 SamplProf.h
217 SaveState.h
218 Sifcmd.h
219 Sif.h
220 Sio.h
221 sio_internal.h
222 SPR.h
223 Stats.h
224 SysForwardDefs.h
225 System.h
226 Vif_Dma.h
227 Vif.h
228 Vif_Unpack.h
229 vtlb.h
230 VUflags.h
231 VUmicro.h
232 VUops.h)
233
234 # CDVD sources
235 set(pcsx2CDVDSources
236 CDVD/CdRom.cpp
237 CDVD/CDVDaccess.cpp
238 CDVD/CDVD.cpp
239 CDVD/CDVDisoReader.cpp
240 CDVD/IsoFileFormats.cpp
241 CDVD/IsoFileTools.cpp
242 CDVD/IsoFS/IsoFile.cpp
243 CDVD/IsoFS/IsoFSCDVD.cpp
244 CDVD/IsoFS/IsoFS.cpp)
245
246 # CDVD headers
247 set(pcsx2CDVDHeaders
248 CDVD/CdRom.h
249 CDVD/CDVDaccess.h
250 CDVD/CDVD.h
251 CDVD/CDVD_internal.h
252 CDVD/CDVDisoReader.h
253 CDVD/IsoFileFormats.h
254 CDVD/IsoFileTools.h
255 CDVD/IsoFS/IsoDirectory.h
256 CDVD/IsoFS/IsoFileDescriptor.h
257 CDVD/IsoFS/IsoFile.h
258 CDVD/IsoFS/IsoFSCDVD.h
259 CDVD/IsoFS/IsoFS.h
260 CDVD/IsoFS/SectorSource.h)
261
262 # DebugTools sources
263 set(pcsx2DebugToolsSources
264 DebugTools/DisR3000A.cpp
265 DebugTools/DisR5900asm.cpp
266 DebugTools/DisR5900.cpp
267 DebugTools/DisVU0Micro.cpp
268 DebugTools/DisVU1Micro.cpp)
269
270 # DebugTools headers
271 set(pcsx2DebugToolsHeaders
272 DebugTools/Debug.h
273 DebugTools/DisASm.h
274 DebugTools/DisVUmicro.h
275 DebugTools/DisVUops.h)
276
277 # gui sources
278 set(pcsx2GuiSources
279 gui/AdvancedDialog.cpp
280 gui/AppAssert.cpp
281 gui/AppConfig.cpp
282 gui/AppCorePlugins.cpp
283 gui/AppCoreThread.cpp
284 gui/AppEventSources.cpp
285 gui/AppGameDatabase.cpp
286 gui/AppInit.cpp
287 gui/AppMain.cpp
288 gui/AppRes.cpp
289 gui/ConsoleLogger.cpp
290 gui/CpuUsageProvider.cpp
291 gui/CpuUsageProviderLnx.cpp
292 gui/Dialogs/AboutBoxDialog.cpp
293 gui/Dialogs/AppConfigDialog.cpp
294 gui/Dialogs/AssertionDialog.cpp
295 gui/Panels/BaseApplicableConfigPanel.cpp
296 gui/Panels/MemoryCardListView.cpp
297 gui/Dialogs/BaseConfigurationDialog.cpp
298 gui/Dialogs/BiosSelectorDialog.cpp
299 gui/Dialogs/ConfirmationDialogs.cpp
300 gui/Dialogs/CreateMemoryCardDialog.cpp
301 gui/Dialogs/FirstTimeWizard.cpp
302 gui/Dialogs/GameDatabaseDialog.cpp
303 gui/Dialogs/ImportSettingsDialog.cpp
304 gui/Dialogs/LogOptionsDialog.cpp
305 gui/Dialogs/McdConfigDialog.cpp
306 gui/Dialogs/PickUserModeDialog.cpp
307 gui/Dialogs/StuckThreadDialog.cpp
308 gui/Dialogs/SysConfigDialog.cpp
309 gui/ExecutorThread.cpp
310 gui/FrameForGS.cpp
311 gui/GlobalCommands.cpp
312 gui/i18n.cpp
313 gui/IsoDropTarget.cpp
314 gui/MainFrame.cpp
315 gui/MainMenuClicks.cpp
316 gui/MemoryCardFile.cpp
317 gui/Panels/BaseApplicableConfigPanel.cpp
318 gui/Panels/MemoryCardListPanel.cpp
319 gui/MessageBoxes.cpp
320 gui/MSWstuff.cpp
321 gui/Panels/AudioPanel.cpp
322 gui/Panels/BiosSelectorPanel.cpp
323 gui/Panels/CpuPanel.cpp
324 gui/Panels/DirPickerPanel.cpp
325 gui/Panels/GameDatabasePanel.cpp
326 gui/Panels/GameFixesPanel.cpp
327 gui/Panels/GSWindowPanel.cpp
328 gui/Panels/LogOptionsPanels.cpp
329 gui/Panels/MiscPanelStuff.cpp
330 gui/Panels/PathsPanel.cpp
331 gui/Panels/PluginSelectorPanel.cpp
332 gui/Panels/SpeedhacksPanel.cpp
333 gui/Panels/VideoPanel.cpp
334 gui/pxLogTextCtrl.cpp
335 gui/RecentIsoList.cpp
336 gui/Saveslots.cpp
337 gui/SysState.cpp
338 gui/UpdateUI.cpp
339 )
340
341 # gui headers
342 set(pcsx2GuiHeaders
343 gui/AdvancedDialog.h
344 gui/App.h
345 gui/ApplyState.h
346 gui/AppAccelerators.h
347 gui/AppCommon.h
348 gui/AppConfig.h
349 gui/AppCorePlugins.h
350 gui/AppEventListeners.h
351 gui/AppForwardDefs.h
352 gui/AppGameDatabase.h
353 gui/ConsoleLogger.h
354 gui/CpuUsageProvider.h
355 gui/Dialogs/BaseConfigurationDialog.inl
356 gui/Dialogs/ConfigurationDialog.h
357 gui/Dialogs/LogOptionsDialog.h
358 gui/Dialogs/ModalPopups.h
359 gui/i18n.h
360 gui/IsoDropTarget.h
361 gui/MainFrame.h
362 gui/MemoryCardFile.h
363 gui/MSWstuff.h
364 gui/Panels/ConfigurationPanels.h
365 gui/Panels/LogOptionsPanels.h
366 gui/Panels/MemoryCardPanels.h
367 gui/RecentIsoList.h
368 )
369
370 # IPU sources
371 set(pcsx2IPUSources
372 IPU/IPU.cpp
373 IPU/IPU_Fifo.cpp
374 IPU/IPUdma.cpp
375 IPU/mpeg2lib/Idct.cpp
376 IPU/mpeg2lib/Mpeg.cpp
377 IPU/yuv2rgb.cpp)
378
379 # IPU headers
380 set(pcsx2IPUHeaders
381 IPU/IPU.h
382 IPU/IPU_Fifo.h
383 IPU/IPUdma.h
384 IPU/yuv2rgb.h)
385
386 # Linux sources
387 set(pcsx2LinuxSources
388 Linux/LnxHostSys.cpp
389 Linux/LnxKeyCodes.cpp)
390
391 # Linux headers
392 set(pcsx2LinuxHeaders
393 )
394
395 # ps2 sources
396 set(pcsx2ps2Sources
397 ps2/BiosTools.cpp
398 ps2/GIFpath.cpp
399 ps2/LegacyDmac.cpp
400 ps2/Iop/IopHwRead.cpp
401 ps2/Iop/IopHwWrite.cpp)
402
403 # ps2 headers
404 set(pcsx2ps2Headers
405 ps2/BiosTools.h
406 ps2/eeHwTraceLog.inl
407 ps2/HwInternal.h
408 ps2/Iop/IopHw_Internal.h)
409
410 # RDebug sources
411 set(pcsx2RDebugSources
412 RDebug/deci2.cpp
413 RDebug/deci2_dbgp.cpp
414 RDebug/deci2_dcmp.cpp
415 RDebug/deci2_drfp.cpp
416 RDebug/deci2_iloadp.cpp
417 RDebug/deci2_netmp.cpp
418 RDebug/deci2_ttyp.cpp)
419
420 # RDebug headers
421 set(pcsx2RDebugHeaders
422 RDebug/deci2_dbgp.h
423 RDebug/deci2_dcmp.h
424 RDebug/deci2_drfp.h
425 RDebug/deci2.h
426 RDebug/deci2_iloadp.h
427 RDebug/deci2_netmp.h
428 RDebug/deci2_ttyp.h)
429
430 # System sources
431 set(pcsx2SystemSources
432 System/SysCoreThread.cpp
433 System/SysThreadBase.cpp)
434
435 # System headers
436 set(pcsx2SystemHeaders
437 System/PageFaultSource.h
438 System/SysThreads.h)
439
440 # Utilities sources
441 set(pcsx2UtilitiesSources
442 Utilities/FileUtils.cpp)
443
444 # Utilities headers
445 set(pcsx2UtilitiesHeaders
446 Utilities/AsciiFile.h)
447
448 # Zip tools utilies sources
449 set(pcsx2ZipToolsSources
450 ZipTools/thread_gzip.cpp
451 ZipTools/thread_lzma.cpp)
452
453 # Zip tools utilies headers
454 set(pcsx2ZipToolsHeaders
455 ZipTools/ThreadedZipTools.h)
456
457
458 # Windows sources
459 set(pcsx2WindowsSources
460 windows/cheats/browser.cpp
461 windows/cheats/cheats.cpp
462 windows/DwmSetup.cpp
463 windows/ini.cpp
464 windows/PatchBrowser.cpp
465 windows/SampleProf.cp
466 windows/WinCompressNTFS.cpp
467 windows/WinConsolePipe.cpp
468 windows/WinSysExec.cpp)
469
470 # Windows headers
471 set(pcsx2WindowsHeaders
472 windows/cheats/cheats.h
473 windows/resource.h
474 windows/Win32.h)
475
476 # x86 sources
477 set(pcsx2x86Sources
478 x86/BaseblockEx.cpp
479 x86/iCOP0.cpp
480 x86/iCore.cpp
481 x86/iFPU.cpp
482 x86/iFPUd.cpp
483 x86/iMisc.cpp
484 x86/iMMI.cpp
485 x86/iPsxMem.cpp
486 x86/iR3000A.cpp
487 x86/iR3000Atables.cpp
488 x86/iR5900Misc.cpp
489 x86/ir5900tables.cpp
490 x86/iVU1micro.cpp
491 x86/ix86-32/iCore-32.cpp
492 x86/ix86-32/iR5900-32.cpp
493 x86/ix86-32/iR5900Arit.cpp
494 x86/ix86-32/iR5900AritImm.cpp
495 x86/ix86-32/iR5900Branch.cpp
496 x86/ix86-32/iR5900Jump.cpp
497 x86/ix86-32/iR5900LoadStore.cpp
498 x86/ix86-32/iR5900Move.cpp
499 x86/ix86-32/iR5900MultDiv.cpp
500 x86/ix86-32/iR5900Shift.cpp
501 x86/ix86-32/iR5900Templates.cpp
502 x86/ix86-32/recVTLB.cpp
503 x86/newVif_Dynarec.cpp
504 x86/newVif_Unpack.cpp
505 x86/newVif_UnpackSSE.cpp
506 x86/sVU_Lower.cpp
507 x86/sVU_Micro.cpp
508 x86/sVU_Upper.cpp
509 x86/sVU_zerorec.cpp
510 )
511
512 # x86 headers
513 set(pcsx2x86Headers
514 x86/BaseblockEx.h
515 x86/iCOP0.h
516 x86/iCore.h
517 x86/iFPU.h
518 x86/iMMI.h
519 x86/iR3000A.h
520 x86/iR5900Arit.h
521 x86/iR5900AritImm.h
522 x86/iR5900Branch.h
523 x86/iR5900.h
524 x86/iR5900Jump.h
525 x86/iR5900LoadStore.h
526 x86/iR5900Move.h
527 x86/iR5900MultDiv.h
528 x86/iR5900Shift.h
529 x86/microVU.h
530 x86/microVU_IR.h
531 x86/microVU_Misc.h
532 x86/microVU_Alloc.inl
533 x86/microVU_Analyze.inl
534 x86/microVU_Branch.inl
535 x86/microVU_Clamp.inl
536 x86/microVU_Compile.inl
537 x86/microVU.cpp
538 x86/microVU_Execute.inl
539 x86/microVU_Flags.inl
540 x86/microVU_Log.inl
541 x86/microVU_Lower.inl
542 x86/microVU_Macro.inl
543 x86/microVU_Misc.inl
544 x86/microVU_Tables.inl
545 x86/microVU_Upper.inl
546 x86/newVif.h
547 x86/newVif_BlockBuffer.h
548 x86/newVif_HashBucket.h
549 x86/newVif_UnpackSSE.h
550 x86/sVU_Compare.h
551 x86/sVU_Debug.h
552 x86/sVU_Micro.h
553 x86/sVU_zerorec.h
554 )
555
556 # colect .asm files
557 set(pcsx2AsmFiles
558 IPU/yuv2rgb.asm
559 x86/ix86-32/aVif_proc-32.asm)
560
561 # collect .S files
562 set(pcsx2SSources
563 x86/aVUzerorec.S)
564
565 # change language of .S-files to c++
566 set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX)
567
568 # common Sources
569 set(Common
570 ${pcsx2Sources}
571 ${pcsx2Headers}
572 ${pcsx2CDVDSources}
573 ${pcsx2CDVDHeaders}
574 ${pcsx2DebugToolsSources}
575 ${pcsx2DebugToolsSources}
576 ${pcsx2GuiSources}
577 ${pcsx2GuiHeaders}
578 ${pcsx2IPUSources}
579 ${pcsx2IPUHeaders}
580 ${pcsx2ps2Sources}
581 ${pcsx2ps2Headers}
582 ${pcsx2SystemSources}
583 ${pcsx2SystemHeaders}
584 ${pcsx2UtilitiesSources}
585 ${pcsx2UtilitiesHeaders}
586 ${pcsx2x86Sources}
587 ${pcsx2x86Headers}
588 ${pcsx2ZipToolsSources}
589 ${pcsx2ZipToolsHeaders}
590 ${pcsx2SSources})
591
592 # platform sources
593 # Linux
594 if(Linux)
595 set(Platform
596 ${pcsx2LinuxSources}
597 ${pcsx2LinuxHeaders})
598 endif(Linux)
599
600 # Windows
601 if(Windows)
602 set(Platform
603 ${pcsx2WindowsSources}
604 ${pcsx2WindowsHeaders})
605 endif(Windows)
606
607 # MacOSX
608 if(MacOSX)
609 set(PlatformSources
610 )
611 endif(MacOSX)
612
613 # additonal include directories
614 include_directories(.
615 gui
616 x86
617 ${CMAKE_BINARY_DIR}/pcsx2)
618
619 # set runtime output directory
620 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
621
622 # add executable
623 add_executable(${Output}
624 ${Common}
625 ${Platform})
626
627 # add dependencies
628 add_dependencies(${Output} Resources)
629
630 # link target with project internal libraries
631 target_link_libraries(${Output} Utilities x86emitter)
632
633 # link target with wx
634 target_link_libraries(${Output} ${wxWidgets_LIBRARIES})
635
636 if(Linux)
637 # link target with gtk2
638 target_link_libraries(${Output} ${GTK2_LIBRARIES})
639 endif(Linux)
640
641 # link target with zlib
642 target_link_libraries(${Output} ${ZLIB_LIBRARIES})
643
644 # User flags options
645 if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
646 target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
647 endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

  ViewVC Help
Powered by ViewVC 1.1.22