/[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 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 1 month ago) by william
File MIME type: text/plain
File size: 4433 byte(s)
re-commit (had local access denied errors when committing)
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 VirtualMemory.cpp
125 wxAppWithHelpers.cpp
126 wxGuiTools.cpp
127 wxHelpers.cpp
128 x86/MemcpyVibes.cpp
129 # x86/MemcpyFast.cpp
130 )
131
132 # collect .S files
133 set(UtilitiesSSources
134 x86/MemcpyFast.S)
135
136 # variable with all headers of this library
137 set(UtilitiesHeaders
138 ../../include/Utilities/Assertions.h
139 ../../include/Utilities/CheckedStaticBox.h
140 ../../include/Utilities/Console.h
141 ../../include/Utilities/Dependencies.h
142 ../../include/Utilities/EventSource.h
143 ../../include/Utilities/Exceptions.h
144 ../../include/Utilities/FixedPointTypes.h
145 ../../include/Utilities/General.h
146 ../../include/Utilities/HashMap.h
147 ../../include/Utilities/lnx_memzero.h
148 ../../include/Utilities/MemcpyFast.h
149 ../../include/Utilities/MemsetFast.inl
150 ../../include/Utilities/Path.h
151 ../../include/Utilities/PageFaultSource.h
152 ../../include/Utilities/pxCheckBox.h
153 ../../include/Utilities/pxRadioPanel.h
154 ../../include/Utilities/pxStaticText.h
155 ../../include/Utilities/pxStreams.h
156 ../../include/Utilities/RedtapeWindows.h
157 ../../include/Utilities/SafeArray.h
158 ../../include/Utilities/ScopedAlloc.h
159 ../../include/Utilities/ScopedPtr.h
160 ../../include/Utilities/ScopedPtrMT.h
161 ../../include/Utilities/StringHelpers.h
162 ../../include/Utilities/Threading.h
163 ../../include/Utilities/ThreadingDialogs.h
164 ../../include/Utilities/TraceLog.h
165 ../../include/Utilities/wxAppWithHelpers.h
166 ../../include/Utilities/wxBaseTools.h
167 ../../include/Utilities/wxGuiTools.h
168 PrecompiledHeader.h)
169
170 include_directories(.)
171
172 # change language of .S-files to c++
173 set_source_files_properties(${UtilitiesSSources} PROPERTIES LANGUAGE CXX)
174
175 # add library
176 add_library(${Output} STATIC ${UtilitiesSources} ${UtilitiesHeaders} ${UtilitiesSSources})
177
178 # link target with wx
179 target_link_libraries(${Output} ${wxWidgets_LIBRARIES})
180
181 # User flags options
182 if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
183 target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
184 endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

  ViewVC Help
Powered by ViewVC 1.1.22