🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB

  1. cmake_minimum_required(VERSION 3.7)
  2. project(glad)
  3. add_library(${PROJECT_NAME} ${PROJECT_SOURCE_DIR}/src/gl.c)
  4. target_include_directories(${PROJECT_NAME} PRIVATE
  5. ${PROJECT_SOURCE_DIR}/include)
  6. # Install library
  7. install(TARGETS ${PROJECT_NAME}
  8. EXPORT ${PROJECT_NAME}-targets
  9. ARCHIVE DESTINATION lib
  10. LIBRARY DESTINATION lib
  11. RUNTIME DESTINATION bin)
  12. # Install headers
  13. install(
  14. FILES
  15. ${PROJECT_SOURCE_DIR}/include/glad/gl.h
  16. DESTINATION include/glad)
  17. install(
  18. FILES
  19. ${PROJECT_SOURCE_DIR}/include/KHR/khrplatform.h
  20. DESTINATION include/KHR)
  21. # Install CMake config file
  22. install(EXPORT ${PROJECT_NAME}-targets
  23. FILE ${PROJECT_NAME}-targets.cmake
  24. DESTINATION lib/cmake/${PROJECT_NAME})
  25. include(CMakePackageConfigHelpers)
  26. configure_package_config_file(
  27. ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}-config.cmake.in
  28. ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
  29. INSTALL_DESTINATION lib/cmake/${PROJECT_NAME})
  30. install(
  31. FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
  32. DESTINATION lib/cmake/${PROJECT_NAME})