*/}}

CMakeLists.txt 830 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. cmake_minimum_required(VERSION 3.1)
  2. project (lagui)
  3. if (POLICY CMP0072)
  4. set(OpenGL_GL_PREFERENCE GLVND)
  5. endif()
  6. find_package(OpenGL REQUIRED)
  7. find_package(X11 REQUIRED)
  8. find_package(Freetype REQUIRED)
  9. find_package(GLEW REQUIRED)
  10. file(GLOB_RECURSE SOURCE_FILES
  11. ./**.c
  12. ./**.cpp)
  13. # Add header files
  14. file(GLOB_RECURSE HEADER_FILES
  15. ./**.h
  16. ./**.hpp)
  17. add_definitions(-w)
  18. include_directories(
  19. ${CMAKE_SOURCE_DIR}
  20. ${X11_INCLUDE_DIR}
  21. ${GLEW_INCLUDE_PATH}
  22. ${GLM_INCLUDE_PATH}
  23. ${FREETYPE_INCLUDE_DIRS}
  24. ${ODE_INCLUDE_DIRS}
  25. lagui
  26. )
  27. add_library(lagui ${HEADER_FILES} ${SOURCE_FILES})
  28. install(FILES ${HEADER_FILES} DESTINATION include/lagui)
  29. install(TARGETS lagui EXPORT lagui-targets DESTINATION lib/lagui)
  30. install(EXPORT lagui-targets DESTINATION lib/lagui)
  31. install(FILES lagui-config.cmake DESTINATION lib/lagui)