1set (MODULE_NAME GL) 2 3if(WIN32) 4# Windows MSVC/Intel compiler hits: 5# - dwonload free libraries package glew and glut/freeglut from the Internet 6# - add x64/x86 binaries with glew and glut/freeglut libraries (.lib) to the directory lib/x64 or lib/x86. 7# Include folder libs as cmake argument -DCLConform_GL_LIBRARIES_DIR=lib\x64 while solution generation 8# - GL headers files should be added to project source directory and GL subdirectory 9# - Add .dll files: glut glew to the test binary location. 10 list(APPEND CLConform_LIBRARIES opengl32 freeglut glew32) 11else(WIN32) 12 list(APPEND CLConform_LIBRARIES GL glut GLEW GLU) 13endif(WIN32) 14 15set (${MODULE_NAME}_SOURCES 16 main.cpp 17 test_buffers.cpp 18 test_image_methods.cpp 19 test_images_1D.cpp 20 test_images_1Darray.cpp 21 test_images_2D.cpp 22 test_images_2Darray.cpp 23 test_images_3D.cpp 24 test_images_depth.cpp 25 test_images_getinfo_common.cpp 26 test_images_multisample.cpp 27 test_images_read_common.cpp 28 test_images_write_common.cpp 29 test_renderbuffer.cpp 30 test_renderbuffer_info.cpp 31 test_fence_sync.cpp 32 helpers.cpp 33 ../../test_common/gl/helpers.cpp 34 ) 35 36if (WIN32) 37 list (APPEND ${MODULE_NAME}_SOURCES ../../test_common/gl/setup_win32.cpp) 38else(WIN32) 39 list (APPEND ${MODULE_NAME}_SOURCES ../../test_common/gl/setup_x11.cpp) 40endif(WIN32) 41 42# Compiling GLEW along with the project if the compiler is MINGW. 43# The mingw linker was giving weird errors while linking to glew32.lib generated by 44# MSVC. 45if(MINGW) 46 list (APPEND ${MODULE_NAME}_SOURCES GLEW/glew.c) 47 set_source_files_properties( 48 ${${MODULE_NAME}_SOURCES} 49 COMPILE_FLAGS -DGLEW_STATIC) 50 include_directories("./GLEW/") 51endif(MINGW) 52 53set_source_files_properties( 54 ${${MODULE_NAME}_SOURCES} 55 PROPERTIES LANGUAGE CXX) 56 57# Add the current folder to the include path, so that 58# test_common/gl/setup_x11.cpp can find testBase.h which is located in this 59# folder. 60include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 61 62include(../CMakeCommon.txt)