CMakeLists.txt 431 B

123456789101112131415161718
  1. project("moon")
  2. cmake_minimum_required(VERSION 2.8)
  3. file(GLOB SOURCES src/*.cpp src/*.hpp)
  4. add_executable(moon ${SOURCES})
  5. set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
  6. find_package(SDL2 REQUIRED)
  7. find_package(OpenGL REQUIRED)
  8. find_package(GLUT REQUIRED)
  9. include_directories(${OPENGL_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} ${GLUT_INCLUDE_DIR})
  10. target_link_libraries(moon ${OPENGL_LIBRARIES} ${SDL2_LIBRARY} ${GLUT_LIBRARY})