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