/[pcsx2_0.9.7]/trunk/common/src/Utilities/CMakeLists.txt
ViewVC logotype

Contents of /trunk/common/src/Utilities/CMakeLists.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273 - (show annotations) (download)
Fri Nov 12 01:10:22 2010 UTC (9 years, 7 months ago) by william
File MIME type: text/plain
File size: 4512 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4013 local: v0.9.7.197-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 # library name
10 set(Output Utilities)
11
12 # set common flags
13 set(CommonFlags
14 -pthread
15 -fvisibility=hidden
16 -fno-dse
17 -fno-guess-branch-probability
18 -fno-strict-aliasing
19 -fno-tree-dse
20 -pipe
21 -Wno-format
22 -Wno-unused-parameter
23 -Wno-unused-value
24 -Wunused-variable)
25
26 # set warning flags
27 set(DebugFlags
28 -g
29 -W)
30
31 # set optimization flags
32 set(OptimizationFlags
33 -falign-functions
34 -falign-jumps
35 -falign-labels
36 -falign-loops
37 -fcaller-saves
38 -fcprop-registers
39 -fcrossjumping
40 -fcse-follow-jumps
41 -fcse-skip-blocks
42 -fdefer-pop
43 -fdelete-null-pointer-checks
44 -fgcse
45 -fgcse-lm
46 -fif-conversion
47 -fif-conversion2
48 -fmerge-constants
49 -foptimize-sibling-calls
50 -fpeephole2
51 -fregmove
52 -freorder-blocks
53 -freorder-functions
54 -frerun-cse-after-loop
55 -fsched-interblock
56 -fsched-spec
57 -fstrict-overflow
58 -fthread-jumps
59 -ftree-ccp
60 -ftree-ch
61 -ftree-copyrename
62 -ftree-dce
63 -ftree-dominator-opts
64 -ftree-fre
65 -ftree-lrs
66 -ftree-pre
67 -ftree-sra
68 -ftree-ter
69 -ftree-vrp
70 -funit-at-a-time)
71
72 # Debug - Build
73 if(CMAKE_BUILD_TYPE STREQUAL Debug)
74
75 # add defines
76 add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD)
77 endif(CMAKE_BUILD_TYPE STREQUAL Debug)
78
79 # Devel - Build
80 if(CMAKE_BUILD_TYPE STREQUAL Devel)
81
82 # add defines
83 add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD)
84 endif(CMAKE_BUILD_TYPE STREQUAL Devel)
85
86 # Release - Build
87 if(CMAKE_BUILD_TYPE STREQUAL Release)
88
89 # add defines
90 add_definitions(${CommonFlags} ${OptimizationFlags})
91 endif(CMAKE_BUILD_TYPE STREQUAL Release)
92
93 # variable with all sources of this library
94 set(UtilitiesSources
95 ../../include/Utilities/FixedPointTypes.inl
96 ../../include/Utilities/EventSource.inl
97 ../../include/Utilities/SafeArray.inl
98 ../../include/Utilities/TlsVariable.inl
99 AlignedMalloc.cpp
100 CheckedStaticBox.cpp
101 Console.cpp
102 EventSource.cpp
103 Exceptions.cpp
104 FastFormatString.cpp
105 HashTools.cpp
106 IniInterface.cpp
107 Linux/LnxHostSys.cpp
108 Linux/LnxMisc.cpp
109 Linux/LnxThreads.cpp
110 Mutex.cpp
111 PathUtils.cpp
112 PrecompiledHeader.cpp
113 pxCheckBox.cpp
114 pxRadioPanel.cpp
115 pxStaticText.cpp
116 pxStreams.cpp
117 pxTranslate.cpp
118 pxWindowTextWriter.cpp
119 Semaphore.cpp
120 StringHelpers.cpp
121 ThreadingDialogs.cpp
122 ThreadTools.cpp
123 vssprintf.cpp
124 wxAppWithHelpers.cpp
125 wxGuiTools.cpp
126 wxHelpers.cpp
127 x86/MemcpyVibes.cpp
128 # x86/MemcpyFast.cpp
129 )
130
131 # collect .S files
132 set(UtilitiesSSources
133 x86/MemcpyFast.S)
134
135 # variable with all headers of this library
136 set(UtilitiesHeaders
137 ../../include/Utilities/Assertions.h
138 ../../include/Utilities/CheckedStaticBox.h
139 ../../include/Utilities/Console.h
140 ../../include/Utilities/Dependencies.h
141 ../../include/Utilities/EventSource.h
142 ../../include/Utilities/Exceptions.h
143 ../../include/Utilities/FixedPointTypes.h
144 ../../include/Utilities/General.h
145 ../../include/Utilities/HashMap.h
146 ../../include/Utilities/lnx_memzero.h
147 ../../include/Utilities/MemcpyFast.h
148 ../../include/Utilities/Path.h
149 ../../include/Utilities/pxCheckBox.h
150 ../../include/Utilities/pxRadioPanel.h
151 ../../include/Utilities/pxStaticText.h
152 ../../include/Utilities/pxStreams.h
153 ../../include/Utilities/RedtapeWindows.h
154 ../../include/Utilities/SafeArray.h
155 ../../include/Utilities/ScopedAlloc.h
156 ../../include/Utilities/ScopedPtr.h
157 ../../include/Utilities/ScopedPtrMT.h
158 ../../include/Utilities/StringHelpers.h
159 ../../include/Utilities/Threading.h
160 ../../include/Utilities/ThreadingDialogs.h
161 ../../include/Utilities/TraceLog.h
162 ../../include/Utilities/wxAppWithHelpers.h
163 ../../include/Utilities/wxBaseTools.h
164 ../../include/Utilities/wxGuiTools.h
165 PrecompiledHeader.h)
166
167 include_directories(.)
168
169 # change language of .S-files to c++
170 set_source_files_properties(${UtilitiesSSources} PROPERTIES LANGUAGE CXX)
171
172 # add library
173 add_library(${Output} STATIC ${UtilitiesSources} ${UtilitiesHeaders} ${UtilitiesSSources})
174
175 # link target with wx
176 target_link_libraries(${Output} ${wxWidgets_LIBRARIES})
177
178 # User flags options
179 if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
180 target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
181 endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

  ViewVC Help
Powered by ViewVC 1.1.22