/[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 185 - (show annotations) (download)
Mon Sep 13 19:49:07 2010 UTC (9 years, 4 months ago) by william
File MIME type: text/plain
File size: 3670 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.3761 local: v0.9.7.165-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 # 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 ZZoglCreate.cpp
67 ZZoglCRTC.cpp
68 ZZoglFlush.cpp
69 ZZoglFlushHack.cpp
70 ZZoglSave.cpp
71 ZZoglShaders.cpp
72 ZZoglShoots.cpp
73 ZZoglVB.cpp
74 ZZKeyboard.cpp
75 ZZLog.cpp)
76
77 # zzogl headers
78 set(zzoglHeaders
79 common.h
80 CRC.h
81 GifTransfer.h
82 glprocs.h
83 GS.h
84 Mem.h
85 Mem_Swizzle.h
86 Mem_Transmit.h
87 Profile.h
88 rasterfont.h
89 NewRegs.h
90 Regs.h
91 targets.h
92 Util.h
93 x86.h
94 zerogs.h
95 zerogsmath.h
96 zpipe.h
97 ZZoglCRTC.h
98 ZZoglShaders.h
99 ZZGl.h
100 ZZLog.h)
101
102 # zzogl S sources
103 set(zzoglSSources
104 x86-32.S)
105
106 # zzogl shader sources
107 set(zzoglShaderSources
108 ctx0/ps2hw_ctx.fx
109 ctx1/ps2hw_ctx.fx)
110
111 # zzogl Linux sources
112 set(zzoglLinuxSources
113 Linux/Conf.cpp
114 Linux/Linux.cpp)
115
116 # zzogl Linux headers
117 set(zzoglLinuxHeaders
118 Linux/Linux.h)
119
120 # change language of .S-files to c++
121 set_source_files_properties(${zzoglSSources} PROPERTIES LANGUAGE CXX)
122
123 # add additional include directories
124 include_directories(.
125 Linux)
126
127 # add library
128 add_library(${Output} SHARED
129 ${zzoglSources}
130 ${zzoglHeaders}
131 ${zzoglSSources}
132 ${zzoglShaderSources}
133 ${zzoglLinuxSources}
134 ${zzoglLinuxHeaders})
135
136 # set output directory
137 set_target_properties(${Output} PROPERTIES
138 LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
139
140 # WARNING can conflict with zerogs plugin
141 # copy ps2hw.dat to plugins folder
142 add_custom_command(TARGET ${Output} POST_BUILD
143 COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/plugins/zzogl-pg/opengl/ps2hw.dat ${PROJECT_SOURCE_DIR}/bin/plugins)
144
145 # link target with project internal libraries
146 target_link_libraries(${Output} Utilities)
147
148 # link target with Cg
149 target_link_libraries(${Output} ${CG_LIBRARIES})
150
151 # link target with glew
152 target_link_libraries(${Output} ${GLEW_LIBRARY})
153
154 # link target with opengl
155 target_link_libraries(${Output} ${OPENGL_LIBRARIES})
156
157 # link target with X11
158 target_link_libraries(${Output} ${X11_LIBRARIES})
159
160 # link target with jpeg
161 target_link_libraries(${Output} ${JPEG_LIBRARIES})
162
163 # User flags options
164 if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
165 target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
166 endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

  ViewVC Help
Powered by ViewVC 1.1.22