CMakeLists.txt 523 B

123456789101112131415161718192021222324
  1. # CMakeLists.txt - glew
  2. if (NOT SERVER_ONLY)
  3. include_directories("include")
  4. if(APPLE)
  5. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -arch x86_64")
  6. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch x86_64 -F/Library/Frameworks")
  7. endif()
  8. find_package(OpenGL REQUIRED)
  9. include_directories(${OPENGL_INCLUDE_DIR})
  10. add_definitions(-DGLEW_STATIC)
  11. add_library(glew STATIC
  12. include/GL/glew.h include/GL/glxew.h include/GL/wglew.h
  13. src/glew.c src/glewinfo.c
  14. )
  15. target_link_libraries(glew ${OPENGL_LIBRARIES})
  16. endif()