🛠️🐜 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.

34 lines
901 B

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