-set(CMAKE_INCLUDE_CURRENT_DIR OFF)
+include_directories(.)
-# From Sconstruct
-include_directories(BEFORE
- include)
-
-include_directories(
- src/gallium/include
- src/gallium/auxiliary
- src/gallium/drivers
- src/gallium/winsys)
-
-if(NOT MSVC)
- add_compile_flags_language("-std=gnu99" "C")
- add_compile_flags("-Wno-deprecated-declarations")
- if(GCC_VERSION VERSION_EQUAL 4.7 OR GCC_VERSION VERSION_GREATER 4.7)
- add_compile_flags("-Wno-error=unused-local-typedefs")
- endif()
- # optimizations (builtin memcmp is slow on some gcc versions) used in SConsript files
- add_compile_flags("-ffast-math -fno-builtin-memcmp")
-else()
- include_directories(include/c99)
- add_compile_flags("/wd4996")
-endif()
+# our DBG definitions conflict with mesa source code
+remove_definitions(-DDBG=1 -DDBG=0)
add_definitions(
-DWIN32
-D_WINDOWS
- -DPIPE_SUBSYSTEM_WINDOWS_USER
-D_DLL
-# -DDEBUG
+ -DFEATURE_GL=1
+ -D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers
+ -DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers
+ -D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport)
)
-# our DBG definitions conflict with mesa source code
-remove_definitions(-DDBG=1 -DDBG=0)
+if(OPENGL32_USE_TLS)
+ add_definitions(-DOPENGL32_USE_TLS)
+endif()
+
+if((ARCH STREQUAL "i386") AND (NOT MSVC))
+ add_definitions(
+ -DUSE_X86_ASM
+ -DUSE_MMX_ASM
+ -DUSE_3DNOW_ASM
+ -DUSE_SSE_ASM
+ )
+ add_subdirectory(x86)
+endif()
-add_subdirectory(src)
+add_subdirectory(drivers/common)
+add_subdirectory(main)
+add_subdirectory(math)
+add_subdirectory(swrast)
+add_subdirectory(swrast_setup)
+add_subdirectory(tnl)
+add_subdirectory(vbo)