/[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 148 - (show annotations) (download)
Fri Sep 10 17:22:32 2010 UTC (9 years, 4 months ago) by william
File MIME type: text/plain
File size: 12755 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.3746 local: v0.9.7.138) 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 vtlb.h
229 VUflags.h
230 VUmicro.h
231 VUops.h)
232
233 # CDVD sources
234 set(pcsx2CDVDSources
235 CDVD/CdRom.cpp
236 CDVD/CDVDaccess.cpp
237 CDVD/CDVD.cpp
238 CDVD/CDVDisoReader.cpp
239 CDVD/IsoFileFormats.cpp
240 CDVD/IsoFileTools.cpp
241 CDVD/IsoFS/IsoFile.cpp
242 CDVD/IsoFS/IsoFSCDVD.cpp
243 CDVD/IsoFS/IsoFS.cpp)
244
245 # CDVD headers
246 set(pcsx2CDVDHeaders
247 CDVD/CdRom.h
248 CDVD/CDVDaccess.h
249 CDVD/CDVD.h
250 CDVD/CDVD_internal.h
251 CDVD/CDVDisoReader.h
252 CDVD/IsoFileFormats.h
253 CDVD/IsoFileTools.h
254 CDVD/IsoFS/IsoDirectory.h
255 CDVD/IsoFS/IsoFileDescriptor.h
256 CDVD/IsoFS/IsoFile.h
257 CDVD/IsoFS/IsoFSCDVD.h
258 CDVD/IsoFS/IsoFS.h
259 CDVD/IsoFS/SectorSource.h)
260
261 # DebugTools sources
262 set(pcsx2DebugToolsSources
263 DebugTools/DisR3000A.cpp
264 DebugTools/DisR5900asm.cpp
265 DebugTools/DisR5900.cpp
266 DebugTools/DisVU0Micro.cpp
267 DebugTools/DisVU1Micro.cpp)
268
269 # DebugTools headers
270 set(pcsx2DebugToolsHeaders
271 DebugTools/Debug.h
272 DebugTools/DisASm.h
273 DebugTools/DisVUmicro.h
274 DebugTools/DisVUops.h)
275
276 # gui sources
277 set(pcsx2GuiSources
278 gui/AdvancedDialog.cpp
279 gui/AppAssert.cpp
280 gui/AppConfig.cpp
281 gui/AppCorePlugins.cpp
282 gui/AppCoreThread.cpp
283 gui/AppEventSources.cpp
284 gui/AppGameDatabase.cpp
285 gui/AppInit.cpp
286 gui/AppMain.cpp
287 gui/AppRes.cpp
288 gui/ConsoleLogger.cpp
289 gui/CpuUsageProvider.cpp
290 gui/CpuUsageProviderLnx.cpp
291 gui/Dialogs/AboutBoxDialog.cpp
292 gui/Dialogs/AppConfigDialog.cpp
293 gui/Dialogs/AssertionDialog.cpp
294 gui/Panels/BaseApplicableConfigPanel.cpp
295 gui/Panels/MemoryCardListView.cpp
296 gui/Dialogs/BaseConfigurationDialog.cpp
297 gui/Dialogs/BiosSelectorDialog.cpp
298 gui/Dialogs/ConfirmationDialogs.cpp
299 gui/Dialogs/CreateMemoryCardDialog.cpp
300 gui/Dialogs/FirstTimeWizard.cpp
301 gui/Dialogs/GameDatabaseDialog.cpp
302 gui/Dialogs/ImportSettingsDialog.cpp
303 gui/Dialogs/LogOptionsDialog.cpp
304 gui/Dialogs/McdConfigDialog.cpp
305 gui/Dialogs/PickUserModeDialog.cpp
306 gui/Dialogs/StuckThreadDialog.cpp
307 gui/Dialogs/SysConfigDialog.cpp
308 gui/ExecutorThread.cpp
309 gui/FrameForGS.cpp
310 gui/GlobalCommands.cpp
311 gui/i18n.cpp
312 gui/IsoDropTarget.cpp
313 gui/MainFrame.cpp
314 gui/MainMenuClicks.cpp
315 gui/MemoryCardFile.cpp
316 gui/Panels/BaseApplicableConfigPanel.cpp
317 gui/Panels/MemoryCardListPanel.cpp
318 gui/MessageBoxes.cpp
319 gui/MSWstuff.cpp
320 gui/Panels/AudioPanel.cpp
321 gui/Panels/BiosSelectorPanel.cpp
322 gui/Panels/CpuPanel.cpp
323 gui/Panels/DirPickerPanel.cpp
324 gui/Panels/GameDatabasePanel.cpp
325 gui/Panels/GameFixesPanel.cpp
326 gui/Panels/GSWindowPanel.cpp
327 gui/Panels/LogOptionsPanels.cpp
328 gui/Panels/MiscPanelStuff.cpp
329 gui/Panels/PathsPanel.cpp
330 gui/Panels/PluginSelectorPanel.cpp
331 gui/Panels/SpeedhacksPanel.cpp
332 gui/Panels/VideoPanel.cpp
333 gui/pxLogTextCtrl.cpp
334 gui/RecentIsoList.cpp
335 gui/Saveslots.cpp
336 gui/SysState.cpp
337 gui/UpdateUI.cpp
338 )
339
340 # gui headers
341 set(pcsx2GuiHeaders
342 gui/AdvancedDialog.h
343 gui/App.h
344 gui/ApplyState.h
345 gui/AppAccelerators.h
346 gui/AppCommon.h
347 gui/AppConfig.h
348 gui/AppCorePlugins.h
349 gui/AppEventListeners.h
350 gui/AppForwardDefs.h
351 gui/AppGameDatabase.h
352 gui/ConsoleLogger.h
353 gui/CpuUsageProvider.h
354 gui/Dialogs/BaseConfigurationDialog.inl
355 gui/Dialogs/ConfigurationDialog.h
356 gui/Dialogs/LogOptionsDialog.h
357 gui/Dialogs/ModalPopups.h
358 gui/i18n.h
359 gui/IsoDropTarget.h
360 gui/MainFrame.h
361 gui/MemoryCardFile.h
362 gui/MSWstuff.h
363 gui/Panels/ConfigurationPanels.h
364 gui/Panels/LogOptionsPanels.h
365 gui/Panels/MemoryCardPanels.h
366 gui/RecentIsoList.h
367 )
368
369 # IPU sources
370 set(pcsx2IPUSources
371 IPU/IPU.cpp
372 IPU/IPU_Fifo.cpp
373 IPU/IPUdma.cpp
374 IPU/mpeg2lib/Idct.cpp
375 IPU/mpeg2lib/Mpeg.cpp
376 IPU/yuv2rgb.cpp)
377
378 # IPU headers
379 set(pcsx2IPUHeaders
380 IPU/IPU.h
381 IPU/IPU_Fifo.h
382 IPU/IPUdma.h
383 IPU/yuv2rgb.h)
384
385 # Linux sources
386 set(pcsx2LinuxSources
387 Linux/LnxHostSys.cpp
388 Linux/LnxKeyCodes.cpp)
389
390 # Linux headers
391 set(pcsx2LinuxHeaders
392 )
393
394 # ps2 sources
395 set(pcsx2ps2Sources
396 ps2/BiosTools.cpp
397 ps2/GIFpath.cpp
398 ps2/LegacyDmac.cpp
399 ps2/Iop/IopHwRead.cpp
400 ps2/Iop/IopHwWrite.cpp)
401
402 # ps2 headers
403 set(pcsx2ps2Headers
404 ps2/BiosTools.h
405 ps2/eeHwTraceLog.inl
406 ps2/HwInternal.h
407 ps2/Iop/IopHw_Internal.h)
408
409 # RDebug sources
410 set(pcsx2RDebugSources
411 RDebug/deci2.cpp
412 RDebug/deci2_dbgp.cpp
413 RDebug/deci2_dcmp.cpp
414 RDebug/deci2_drfp.cpp
415 RDebug/deci2_iloadp.cpp
416 RDebug/deci2_netmp.cpp
417 RDebug/deci2_ttyp.cpp)
418
419 # RDebug headers
420 set(pcsx2RDebugHeaders
421 RDebug/deci2_dbgp.h
422 RDebug/deci2_dcmp.h
423 RDebug/deci2_drfp.h
424 RDebug/deci2.h
425 RDebug/deci2_iloadp.h
426 RDebug/deci2_netmp.h
427 RDebug/deci2_ttyp.h)
428
429 # System sources
430 set(pcsx2SystemSources
431 System/SysCoreThread.cpp
432 System/SysThreadBase.cpp)
433
434 # System headers
435 set(pcsx2SystemHeaders
436 System/PageFaultSource.h
437 System/SysThreads.h)
438
439 # Utilities sources
440 set(pcsx2UtilitiesSources
441 Utilities/FileUtils.cpp)
442
443 # Utilities headers
444 set(pcsx2UtilitiesHeaders
445 Utilities/AsciiFile.h)
446
447 # Zip tools utilies sources
448 set(pcsx2ZipToolsSources
449 ZipTools/thread_gzip.cpp
450 ZipTools/thread_lzma.cpp)
451
452 # Zip tools utilies headers
453 set(pcsx2ZipToolsHeaders
454 ZipTools/ThreadedZipTools.h)
455
456
457 # Windows sources
458 set(pcsx2WindowsSources
459 windows/cheats/browser.cpp
460 windows/cheats/cheats.cpp
461 windows/DwmSetup.cpp
462 windows/ini.cpp
463 windows/PatchBrowser.cpp
464 windows/SampleProf.cp
465 windows/WinCompressNTFS.cpp
466 windows/WinConsolePipe.cpp
467 windows/WinSysExec.cpp)
468
469 # Windows headers
470 set(pcsx2WindowsHeaders
471 windows/cheats/cheats.h
472 windows/resource.h
473 windows/Win32.h)
474
475 # x86 sources
476 set(pcsx2x86Sources
477 x86/BaseblockEx.cpp
478 x86/iCOP0.cpp
479 x86/iCore.cpp
480 x86/iFPU.cpp
481 x86/iFPUd.cpp
482 x86/iMisc.cpp
483 x86/iMMI.cpp
484 x86/iPsxMem.cpp
485 x86/iR3000A.cpp
486 x86/iR3000Atables.cpp
487 x86/iR5900Misc.cpp
488 x86/ir5900tables.cpp
489 x86/iVU1micro.cpp
490 x86/ix86-32/iCore-32.cpp
491 x86/ix86-32/iR5900-32.cpp
492 x86/ix86-32/iR5900Arit.cpp
493 x86/ix86-32/iR5900AritImm.cpp
494 x86/ix86-32/iR5900Branch.cpp
495 x86/ix86-32/iR5900Jump.cpp
496 x86/ix86-32/iR5900LoadStore.cpp
497 x86/ix86-32/iR5900Move.cpp
498 x86/ix86-32/iR5900MultDiv.cpp
499 x86/ix86-32/iR5900Shift.cpp
500 x86/ix86-32/iR5900Templates.cpp
501 x86/ix86-32/recVTLB.cpp
502 x86/newVif_Dynarec.cpp
503 x86/newVif_Unpack.cpp
504 x86/newVif_UnpackSSE.cpp
505 x86/sVU_Lower.cpp
506 x86/sVU_Micro.cpp
507 x86/sVU_Upper.cpp
508 x86/sVU_zerorec.cpp
509 )
510
511 # x86 headers
512 set(pcsx2x86Headers
513 x86/BaseblockEx.h
514 x86/iCOP0.h
515 x86/iCore.h
516 x86/iFPU.h
517 x86/iMMI.h
518 x86/iR3000A.h
519 x86/iR5900Arit.h
520 x86/iR5900AritImm.h
521 x86/iR5900Branch.h
522 x86/iR5900.h
523 x86/iR5900Jump.h
524 x86/iR5900LoadStore.h
525 x86/iR5900Move.h
526 x86/iR5900MultDiv.h
527 x86/iR5900Shift.h
528 x86/microVU.h
529 x86/microVU_IR.h
530 x86/microVU_Misc.h
531 x86/microVU_Alloc.inl
532 x86/microVU_Analyze.inl
533 x86/microVU_Branch.inl
534 x86/microVU_Clamp.inl
535 x86/microVU_Compile.inl
536 x86/microVU.cpp
537 x86/microVU_Execute.inl
538 x86/microVU_Flags.inl
539 x86/microVU_Log.inl
540 x86/microVU_Lower.inl
541 x86/microVU_Macro.inl
542 x86/microVU_Misc.inl
543 x86/microVU_Tables.inl
544 x86/microVU_Upper.inl
545 x86/newVif.h
546 x86/newVif_BlockBuffer.h
547 x86/newVif_HashBucket.h
548 x86/newVif_UnpackSSE.h
549 x86/sVU_Compare.h
550 x86/sVU_Debug.h
551 x86/sVU_Micro.h
552 x86/sVU_zerorec.h
553 )
554
555 # colect .asm files
556 set(pcsx2AsmFiles
557 IPU/yuv2rgb.asm
558 x86/ix86-32/aVif_proc-32.asm)
559
560 # collect .S files
561 set(pcsx2SSources
562 x86/aVUzerorec.S)
563
564 # change language of .S-files to c++
565 set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX)
566
567 # common Sources
568 set(Common
569 ${pcsx2Sources}
570 ${pcsx2Headers}
571 ${pcsx2CDVDSources}
572 ${pcsx2CDVDHeaders}
573 ${pcsx2DebugToolsSources}
574 ${pcsx2DebugToolsSources}
575 ${pcsx2GuiSources}
576 ${pcsx2GuiHeaders}
577 ${pcsx2IPUSources}
578 ${pcsx2IPUHeaders}
579 ${pcsx2ps2Sources}
580 ${pcsx2ps2Headers}
581 ${pcsx2SystemSources}
582 ${pcsx2SystemHeaders}
583 ${pcsx2UtilitiesSources}
584 ${pcsx2UtilitiesHeaders}
585 ${pcsx2x86Sources}
586 ${pcsx2x86Headers}
587 ${pcsx2ZipToolsSources}
588 ${pcsx2ZipToolsHeaders}
589 ${pcsx2SSources})
590
591 # platform sources
592 # Linux
593 if(Linux)
594 set(Platform
595 ${pcsx2LinuxSources}
596 ${pcsx2LinuxHeaders})
597 endif(Linux)
598
599 # Windows
600 if(Windows)
601 set(Platform
602 ${pcsx2WindowsSources}
603 ${pcsx2WindowsHeaders})
604 endif(Windows)
605
606 # MacOSX
607 if(MacOSX)
608 set(PlatformSources
609 )
610 endif(MacOSX)
611
612 # additonal include directories
613 include_directories(.
614 gui
615 x86
616 ${CMAKE_BINARY_DIR}/pcsx2)
617
618 # set runtime output directory
619 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
620
621 # add executable
622 add_executable(${Output}
623 ${Common}
624 ${Platform})
625
626 # add dependencies
627 add_dependencies(${Output} Resources)
628
629 # link target with project internal libraries
630 target_link_libraries(${Output} Utilities x86emitter)
631
632 # link target with wx
633 target_link_libraries(${Output} ${wxWidgets_LIBRARIES})
634
635 if(Linux)
636 # link target with gtk2
637 target_link_libraries(${Output} ${GTK2_LIBRARIES})
638 endif(Linux)
639
640 # link target with zlib
641 target_link_libraries(${Output} ${ZLIB_LIBRARIES})
642
643 # User flags options
644 if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
645 target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
646 endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

  ViewVC Help
Powered by ViewVC 1.1.22