/[pcsx2_0.9.7]/trunk/plugins/zzogl-pg/opengl/CMakeLists.txt
ViewVC logotype

Contents of /trunk/plugins/zzogl-pg/opengl/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, 2 months ago) by william
File MIME type: text/plain
File size: 3830 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 # plugin name
10 set(Output zzogl)
11
12 set(CommonFlags
13 -pthread
14 -DZEROGS_SSE2
15 -fno-regmove
16 -fno-strict-aliasing
17 -Wstrict-aliasing # Allow to track strict aliasing issue.
18 -Wno-format
19 -Wno-unused-parameter
20 -Wno-unused-value
21 -Wunused-variable
22 )
23
24 set(OptimizationFlags
25 -O2
26 -DNDEBUG
27 )
28
29 # Debug - Build
30 if(CMAKE_BUILD_TYPE STREQUAL Debug)
31 # add defines
32 add_definitions(${CommonFlags} -g -Wall -D_DEBUG)
33 endif(CMAKE_BUILD_TYPE STREQUAL Debug)
34
35 # Devel - Build
36 if(CMAKE_BUILD_TYPE STREQUAL Devel)
37 # add defines
38 add_definitions(${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD)
39 endif(CMAKE_BUILD_TYPE STREQUAL Devel)
40
41 # Release - Build
42 if(CMAKE_BUILD_TYPE STREQUAL Release)
43 # add defines
44 add_definitions(${CommonFlags} ${OptimizationFlags} -W)
45 endif(CMAKE_BUILD_TYPE STREQUAL Release)
46
47 # zzogl sources
48 set(zzoglSources
49 GifTransfer.cpp
50 GLWin32.cpp
51 GLWinX11.cpp
52 GSmain.cpp
53 HostMemory.cpp
54 Mem.cpp
55 # memcpy_amd.cpp
56 Mem_Swizzle.cpp
57 Mem_Tables.cpp
58 Profile.cpp
59 rasterfont.cpp
60 NewRegs.cpp
61 Regs.cpp
62 targets.cpp
63 x86.cpp
64 zerogs.cpp
65 zpipe.cpp
66 ZZClut.cpp
67 ZZHacks.cpp
68 ZZKeyboard.cpp
69 ZZoglDrawing.cpp
70 ZZLog.cpp
71 ZZoglCreate.cpp
72 ZZoglCRTC.cpp
73 ZZoglFlush.cpp
74 ZZoglFlushHack.cpp
75 ZZoglSave.cpp
76 ZZoglShaders.cpp
77 ZZoglShoots.cpp
78 ZZoglVB.cpp
79 )
80
81 # zzogl headers
82 set(zzoglHeaders
83 common.h
84 CRC.h
85 GifTransfer.h
86 # glprocs.h
87 GS.h
88 HostMemory.h
89 Mem.h
90 Mem_Swizzle.h
91 Mem_Transmit.h
92 Profile.h
93 rasterfont.h
94 NewRegs.h
95 Regs.h
96 targets.h
97 Util.h
98 x86.h
99 zerogs.h
100 zpipe.h
101 ZZClut.h
102 ZZGl.h
103 ZZHacks.h
104 ZZoglDrawing.h
105 ZZLog.h
106 ZZoglCRTC.h
107 ZZoglMath.h
108 ZZoglShaders.h
109 ZZoglShoots.h
110 ZZoglVB.h
111 )
112
113 # zzogl S sources
114 set(zzoglSSources
115 x86-32.S)
116
117 # zzogl shader sources
118 set(zzoglShaderSources
119 ctx0/ps2hw_ctx.fx
120 ctx1/ps2hw_ctx.fx)
121
122 # zzogl Linux sources
123 set(zzoglLinuxSources
124 Linux/Conf.cpp
125 Linux/Linux.cpp)
126
127 # zzogl Linux headers
128 set(zzoglLinuxHeaders
129 Linux/Linux.h)
130
131 # change language of .S-files to c++
132 set_source_files_properties(${zzoglSSources} PROPERTIES LANGUAGE CXX)
133
134 # add additional include directories
135 include_directories(.
136 Linux)
137
138 # add library
139 add_library(${Output} SHARED
140 ${zzoglSources}
141 ${zzoglHeaders}
142 ${zzoglSSources}
143 ${zzoglShaderSources}
144 ${zzoglLinuxSources}
145 ${zzoglLinuxHeaders})
146
147 # set output directory
148 set_target_properties(${Output} PROPERTIES
149 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
150
151 # WARNING can conflict with zerogs plugin
152 # copy ps2hw.dat to plugins folder
153 add_custom_command(TARGET ${Output} POST_BUILD
154 COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/plugins/zzogl-pg/opengl/ps2hw.dat ${PROJECT_SOURCE_DIR}/bin/plugins)
155
156 # link target with project internal libraries
157 target_link_libraries(${Output} Utilities)
158
159 # link target with Cg
160 target_link_libraries(${Output} ${CG_LIBRARIES})
161
162 # link target with glew
163 target_link_libraries(${Output} ${GLEW_LIBRARY})
164
165 # link target with opengl
166 target_link_libraries(${Output} ${OPENGL_LIBRARIES})
167
168 # link target with X11
169 target_link_libraries(${Output} ${X11_LIBRARIES})
170
171 # link target with jpeg
172 target_link_libraries(${Output} ${JPEG_LIBRARIES})
173
174 # User flags options
175 if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
176 target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
177 endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

  ViewVC Help
Powered by ViewVC 1.1.22