/[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 62 - (show annotations) (download)
Tue Sep 7 11:08:22 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 12771 byte(s)
Auto Commited Import of: pcsx2-0.9.7-r3738-debug 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 -pipe
18 -Wno-format
19 -Wno-unused-parameter
20 -Wno-unused-value
21 -Wunused-variable)
22
23 # set warning flags
24 set(DebugFlags
25 -W
26 -g)
27
28 # set optimization flags
29 set(OptimizationFlags
30 -falign-functions
31 -falign-jumps
32 -falign-labels
33 -falign-loops
34 -fcaller-saves
35 -fcprop-registers
36 -fcrossjumping
37 -fcse-follow-jumps
38 -fcse-skip-blocks
39 -fdefer-pop
40 -fdelete-null-pointer-checks
41 -fgcse
42 -fgcse-lm
43 -fif-conversion
44 -fif-conversion2
45 -fmerge-constants
46 -foptimize-sibling-calls
47 -fpeephole2
48 -fregmove
49 -freorder-blocks
50 -freorder-functions
51 -frerun-cse-after-loop
52 -fsched-interblock
53 -fsched-spec
54 -fstrict-overflow
55 -fthread-jumps
56 -ftree-ccp
57 -ftree-ch
58 -ftree-copyrename
59 -ftree-dce
60 -ftree-dominator-opts
61 -ftree-fre
62 -ftree-lrs
63 -ftree-pre
64 -ftree-sra
65 -ftree-ter
66 -ftree-vrp
67 -funit-at-a-time)
68
69 # Debug - Build
70 if(CMAKE_BUILD_TYPE STREQUAL Debug)
71
72 # executable name
73 set(Output pcsx2-dbg)
74
75 # add defines
76 add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEVBUILD -DPCSX2_DEBUG -DWX_PRECOMP)
77 endif(CMAKE_BUILD_TYPE STREQUAL Debug)
78
79 # Devel - Build
80 if(CMAKE_BUILD_TYPE STREQUAL Devel)
81
82 # executable name
83 set(Output pcsx2-dev)
84
85 # add defines
86 add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD -DWX_PRECOMP -DNDEBUG)
87 endif(CMAKE_BUILD_TYPE STREQUAL Devel)
88
89 # Release - Build
90 if(CMAKE_BUILD_TYPE STREQUAL Release)
91
92 # executable name
93 set(Output pcsx2)
94
95 # add defines
96 add_definitions(${CommonFlags} ${OptimizationFlags} -DWX_PRECOMP -DNDEBUG)
97 endif(CMAKE_BUILD_TYPE STREQUAL Release)
98
99 # you must have both svn client executable and a source that contains svn metadata
100 if(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
101 # execute subversion
102 Subversion_WC_INFO(${CMAKE_SOURCE_DIR} tmpvar)
103
104 # write svnrev.h
105 file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV ${tmpvar_WC_REVISION} \n#define SVN_MODS 0")
106 else(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
107 # write svnrev.h
108 file(WRITE ${CMAKE_BINARY_DIR}/pcsx2/svnrev.h "#define SVN_REV 0 \n#define SVN_MODS 0")
109 endif(Subversion_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.svn")
110
111 # variable with sources of this executable
112 set(pcsx2Sources
113 Cache.cpp
114 COP0.cpp
115 COP2.cpp
116 Counters.cpp
117 GameDatabase.cpp
118 Dump.cpp
119 Elfheader.cpp
120 FiFo.cpp
121 FPU.cpp
122 Gif.cpp
123 GS.cpp
124 GSState.cpp
125 Hw.cpp
126 HwRead.cpp
127 HwWrite.cpp
128 Interpreter.cpp
129 IopBios.cpp
130 IopCounters.cpp
131 IopDma.cpp
132 IopHw.cpp
133 IopIrq.cpp
134 IopMem.cpp
135 IopSio2.cpp
136 # Mdec.cpp
137 Memory.cpp
138 MMI.cpp
139 MTGS.cpp
140 Patch.cpp
141 Patch_Memory.cpp
142 Pcsx2Config.cpp
143 PluginManager.cpp
144 PrecompiledHeader.cpp
145 R3000A.cpp
146 R3000AInterpreter.cpp
147 R3000AOpcodeTables.cpp
148 R5900.cpp
149 R5900OpcodeImpl.cpp
150 R5900OpcodeTables.cpp
151 SaveState.cpp
152 ShiftJisToUnicode.cpp
153 Sif.cpp
154 Sif0.cpp
155 Sif1.cpp
156 Sio.cpp
157 SourceLog.cpp
158 SPR.cpp
159 Stats.cpp
160 System.cpp
161 Vif0_Dma.cpp
162 Vif1_Dma.cpp
163 Vif1_MFIFO.cpp
164 Vif.cpp
165 Vif_Codes.cpp
166 Vif_Transfer.cpp
167 Vif_Unpack.cpp
168 vtlb.cpp
169 VU0.cpp
170 VUmicro.cpp
171 VU0micro.cpp
172 VU0microInterp.cpp
173 VU1micro.cpp
174 VU1microInterp.cpp
175 VUflags.cpp
176 VUmicroMem.cpp
177 VUops.cpp)
178
179 # variable with sources of this executable
180 set(pcsx2Headers
181 Cache.h
182 cheatscpp.h
183 Common.h
184 Config.h
185 COP0.h
186 Counters.h
187 Dmac.h
188 Dump.h
189 GameDatabase.h
190 Elfheader.h
191 Gif.h
192 GS.h
193 Hardware.h
194 Hw.h
195 IopBios.h
196 IopCommon.h
197 IopCounters.h
198 IopDma.h
199 IopHw.h
200 IopMem.h
201 IopSio2.h
202 # Mdec.h
203 Memory.h
204 MemoryTypes.h
205 NakedAsm.h
206 Patch.h
207 Patch_Obsolete.h
208 PathDefs.h
209 Plugins.h
210 PrecompiledHeader.h
211 R3000A.h
212 R5900Exceptions.h
213 R5900.h
214 R5900OpcodeTables.h
215 SamplProf.h
216 SaveState.h
217 Sifcmd.h
218 Sif.h
219 Sio.h
220 sio_internal.h
221 SPR.h
222 Stats.h
223 SysForwardDefs.h
224 System.h
225 Vif_Dma.h
226 Vif.h
227 Vif_Unpack.h
228 Vif_Unpack.inl
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