2 spec2def(opengl32.dll opengl32.spec ADD_IMPORTLIB)
4 include_directories(../mesa)
7 -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers
8 -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers
9 -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport)
13 add_definitions(-DOPENGL32_USE_TLS)
24 ${CMAKE_CURRENT_BINARY_DIR}/opengl32_stubs.c)
26 set_source_files_properties(gcrt0.o libgmon.a PROPERTIES EXTERNAL_OBJECT TRUE)
28 if(ARCH STREQUAL "i386")
29 # Optimisation: use asm trampolines to ICD provided functions
30 add_asm_files(opengl32_asm
35 add_library(opengl32 SHARED
38 ${CMAKE_CURRENT_BINARY_DIR}/opengl32.def)
40 target_link_libraries(opengl32
52 if((ARCH STREQUAL "i386") AND (NOT MSVC))
53 target_link_libraries(opengl32 mesa_x86)
56 if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
57 target_link_libraries(opengl32 mingwex)
60 set_module_type(opengl32 win32dll HOTPATCHABLE)
62 add_importlibs(opengl32 gdi32 user32 advapi32 msvcrt kernel32 ntdll)
63 add_pch(opengl32 opengl32.h SOURCE)
64 add_cd_file(TARGET opengl32 DESTINATION reactos/system32 FOR all)