/[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 10 - (show annotations) (download)
Mon Sep 6 11:40:06 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 4030 byte(s)
exported r3113 from ./upstream/trunk
1 # Utilities library
2
3 # library name
4 set(UtilitiesName Utilities)
5
6 # Clear default flags
7 set(CMAKE_C_FLAGS "")
8 set(CMAKE_CXX_FLAGS "")
9 set(CMAKE_C_FLAGS_DEBUG "")
10 set(CMAKE_CXX_FLAGS_DEBUG "")
11 set(CMAKE_C_FLAGS_DEVEL "")
12 set(CMAKE_CXX_FLAGS_DEVEL "")
13 set(CMAKE_C_FLAGS_RELEASE "")
14 set(CMAKE_CXX_FLAGS_RELEASE "")
15
16 # set common flags
17 set(CommonFlags
18 -pthread
19 -m32
20 -march=i486
21 -msse
22 -msse2
23 -fno-dse
24 -fno-guess-branch-probability
25 -fno-strict-aliasing
26 -fno-tree-dse
27 -pipe
28 -Wno-format
29 -Wno-unused-parameter
30 -Wno-unused-value
31 -Wunused-variable)
32
33 # set warning flags
34 set(DebugFlags
35 -g
36 -W)
37
38 # set optimization flags
39 set(OptimizationFlags
40 -falign-functions
41 -falign-jumps
42 -falign-labels
43 -falign-loops
44 -fcaller-saves
45 -fcprop-registers
46 -fcrossjumping
47 -fcse-follow-jumps
48 -fcse-skip-blocks
49 -fdefer-pop
50 -fdelete-null-pointer-checks
51 -fgcse
52 -fgcse-lm
53 -fif-conversion
54 -fif-conversion2
55 -fmerge-constants
56 -foptimize-sibling-calls
57 -fpeephole2
58 -fregmove
59 -freorder-blocks
60 -freorder-functions
61 -frerun-cse-after-loop
62 -fsched-interblock
63 -fsched-spec
64 -fstrict-overflow
65 -fthread-jumps
66 -ftree-ccp
67 -ftree-ch
68 -ftree-copyrename
69 -ftree-dce
70 -ftree-dominator-opts
71 -ftree-fre
72 -ftree-lrs
73 -ftree-pre
74 -ftree-sra
75 -ftree-ter
76 -ftree-vrp
77 -funit-at-a-time)
78
79 # Debug - Build
80 if(CMAKE_BUILD_TYPE STREQUAL Debug)
81
82 # add defines
83 add_definitions(${CommonFlags} ${DebugFlags} -DPCSX2_DEBUG -DPCSX2_DEVBUILD)
84 endif(CMAKE_BUILD_TYPE STREQUAL Debug)
85
86 # Devel - Build
87 if(CMAKE_BUILD_TYPE STREQUAL Devel)
88
89 # add defines
90 add_definitions(${CommonFlags} ${OptimizationFlags} -DPCSX2_DEVBUILD)
91 endif(CMAKE_BUILD_TYPE STREQUAL Devel)
92
93 # Release - Build
94 if(CMAKE_BUILD_TYPE STREQUAL Release)
95
96 # add defines
97 add_definitions(${CommonFlags} ${OptimizationFlags})
98 endif(CMAKE_BUILD_TYPE STREQUAL Release)
99
100 # variable with all sources of this library
101 set(UtilitiesSources
102 ../../include/Utilities/EventSource.inl
103 AlignedMalloc.cpp
104 CheckedStaticBox.cpp
105 Console.cpp
106 EventSource.cpp
107 Exceptions.cpp
108 FastFormatString.cpp
109 HashTools.cpp
110 Linux/LnxHostSys.cpp
111 Linux/LnxMisc.cpp
112 Linux/LnxThreads.cpp
113 Mutex.cpp
114 PathUtils.cpp
115 PrecompiledHeader.cpp
116 pxCheckBox.cpp
117 pxRadioPanel.cpp
118 pxStaticText.cpp
119 pxWindowTextWriter.cpp
120 Semaphore.cpp
121 StringHelpers.cpp
122 ThreadingDialogs.cpp
123 ThreadTools.cpp
124 vssprintf.cpp
125 wxAppWithHelpers.cpp
126 wxGuiTools.cpp
127 wxHelpers.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/RedtapeWindows.h
153 ../../include/Utilities/SafeArray.h
154 ../../include/Utilities/ScopedPtr.h
155 ../../include/Utilities/ScopedPtrMT.h
156 ../../include/Utilities/StringHelpers.h
157 ../../include/Utilities/Threading.h
158 ../../include/Utilities/ThreadingDialogs.h
159 ../../include/Utilities/wxAppWithHelpers.h
160 ../../include/Utilities/wxBaseTools.h
161 ../../include/Utilities/wxGuiTools.h
162 PrecompiledHeader.h)
163
164 # change language of .S-files to c++
165 set_source_files_properties(${UtilitiesSSources} PROPERTIES LANGUAGE CXX)
166
167 # add library
168 add_library(${UtilitiesName} STATIC ${UtilitiesSources} ${UtilitiesHeaders} ${UtilitiesSSources})
169
170 # link target with wx
171 target_link_libraries(${UtilitiesName} ${wxWidgets_LIBRARIES})
172
173 # Force the linker into 32 bits mode
174 target_link_libraries(${UtilitiesName} -m32)
175
176 # Linker strip option
177 if (CMAKE_BUILD_STRIP)
178 target_link_libraries(${UtilitiesName} -s)
179 endif (CMAKE_BUILD_STRIP)

  ViewVC Help
Powered by ViewVC 1.1.22