xref: /reactos/dll/opengl/glu32/CMakeLists.txt (revision 11345aed)
1
2set_cpp(WITH_RUNTIME)
3
4include_directories(BEFORE
5    include
6    src/include
7    src/libnurbs/internals
8    src/libnurbs/interface
9    src/libnurbs/nurbtess)
10
11add_definitions(
12    -DBUILD_GLU32
13    -DNDEBUG
14    -DLIBRARYBUILD
15    -DRESOLVE_3D_TEXTURE_SUPPORT)
16
17# we must use our own spec file
18spec2def(glu32.dll glu32.spec ADD_IMPORTLIB)
19
20list(APPEND SOURCE
21    src/libutil/error.c
22    src/libutil/glue.c
23    src/libutil/mipmap.c
24    src/libutil/project.c
25    src/libutil/quad.c
26    src/libutil/registry.c
27    src/libtess/dict.c
28    src/libtess/geom.c
29    src/libtess/memalloc.c
30    src/libtess/mesh.c
31    src/libtess/normal.c
32    src/libtess/priorityq.c
33    src/libtess/render.c
34    src/libtess/sweep.c
35    src/libtess/tess.c
36    src/libtess/tessmono.c)
37
38list(APPEND LIBNURBS_SOURCE
39    src/libnurbs/interface/bezierEval.cc
40    src/libnurbs/interface/bezierPatch.cc
41    src/libnurbs/interface/bezierPatchMesh.cc
42    src/libnurbs/interface/glcurveval.cc
43    src/libnurbs/interface/glinterface.cc
44    src/libnurbs/interface/glrenderer.cc
45    src/libnurbs/interface/glsurfeval.cc
46    src/libnurbs/interface/incurveeval.cc
47    src/libnurbs/interface/insurfeval.cc
48    src/libnurbs/internals/arc.cc
49    src/libnurbs/internals/arcsorter.cc
50    src/libnurbs/internals/arctess.cc
51    src/libnurbs/internals/backend.cc
52    src/libnurbs/internals/basiccrveval.cc
53    src/libnurbs/internals/basicsurfeval.cc
54    src/libnurbs/internals/bin.cc
55    src/libnurbs/internals/bufpool.cc
56    src/libnurbs/internals/cachingeval.cc
57    src/libnurbs/internals/ccw.cc
58    src/libnurbs/internals/coveandtiler.cc
59    src/libnurbs/internals/curve.cc
60    src/libnurbs/internals/curvelist.cc
61    src/libnurbs/internals/curvesub.cc
62    src/libnurbs/internals/dataTransform.cc
63    src/libnurbs/internals/displaylist.cc
64    src/libnurbs/internals/flist.cc
65    src/libnurbs/internals/flistsorter.cc
66    src/libnurbs/internals/hull.cc
67    src/libnurbs/internals/intersect.cc
68    src/libnurbs/internals/knotvector.cc
69    src/libnurbs/internals/mapdesc.cc
70    src/libnurbs/internals/mapdescv.cc
71    src/libnurbs/internals/maplist.cc
72    src/libnurbs/internals/mesher.cc
73    src/libnurbs/internals/monoTriangulationBackend.cc
74    src/libnurbs/internals/monotonizer.cc
75    src/libnurbs/internals/mycode.cc
76    src/libnurbs/internals/nurbsinterfac.cc
77    src/libnurbs/internals/nurbstess.cc
78    src/libnurbs/internals/patch.cc
79    src/libnurbs/internals/patchlist.cc
80    src/libnurbs/internals/quilt.cc
81    src/libnurbs/internals/reader.cc
82    src/libnurbs/internals/renderhints.cc
83    src/libnurbs/internals/slicer.cc
84    src/libnurbs/internals/sorter.cc
85    src/libnurbs/internals/splitarcs.cc
86    src/libnurbs/internals/subdivider.cc
87    src/libnurbs/internals/tobezier.cc
88    src/libnurbs/internals/trimline.cc
89    src/libnurbs/internals/trimregion.cc
90    src/libnurbs/internals/trimvertpool.cc
91    src/libnurbs/internals/uarray.cc
92    src/libnurbs/internals/varray.cc
93    src/libnurbs/nurbtess/directedLine.cc
94    src/libnurbs/nurbtess/gridWrap.cc
95    src/libnurbs/nurbtess/monoChain.cc
96    src/libnurbs/nurbtess/monoPolyPart.cc
97    src/libnurbs/nurbtess/monoTriangulation.cc
98    src/libnurbs/nurbtess/partitionX.cc
99    src/libnurbs/nurbtess/partitionY.cc
100    src/libnurbs/nurbtess/polyUtil.cc
101    src/libnurbs/nurbtess/primitiveStream.cc
102    src/libnurbs/nurbtess/quicksort.cc
103    src/libnurbs/nurbtess/rectBlock.cc
104    src/libnurbs/nurbtess/sampleComp.cc
105    src/libnurbs/nurbtess/sampleCompBot.cc
106    src/libnurbs/nurbtess/sampleCompRight.cc
107    src/libnurbs/nurbtess/sampleCompTop.cc
108    src/libnurbs/nurbtess/sampleMonoPoly.cc
109    src/libnurbs/nurbtess/sampledLine.cc
110    src/libnurbs/nurbtess/searchTree.cc
111    precomp.h)
112
113add_library(glu32 MODULE
114    ${LIBNURBS_SOURCE}
115    src/libnurbs/nurbtess/polyDBG.cc
116    ${SOURCE}
117    glu32.rc
118    ${CMAKE_CURRENT_BINARY_DIR}/glu32.def)
119
120set_module_type(glu32 win32dll)
121
122if(NOT MSVC)
123    target_compile_options(glu32 PRIVATE -Wno-write-strings -Wno-unused-but-set-variable)
124    # Prevent a warning when comparing 'this' against 0
125    set_source_files_properties(src/libnurbs/internals/arc.cc PROPERTIES COMPILE_FLAGS "-Wno-nonnull-compare")
126elseif(USE_CLANG_CL)
127    target_compile_options(glu32 PRIVATE -Wno-self-assign -Wno-unused-function -Wno-microsoft-include)
128    target_compile_options(glu32 PRIVATE -Wno-deprecated-register -Wno-tautological-undefined-compare)
129endif()
130
131add_importlibs(glu32 opengl32 gdi32 msvcrt kernel32 ntdll)
132add_pch(glu32 precomp.h LIBNURBS_SOURCE)
133add_cd_file(TARGET glu32 DESTINATION reactos/system32 FOR all)
134