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

36 lines
943 B

  1. cmake_minimum_required(VERSION 3.7)
  2. project(stb)
  3. add_library(stb
  4. ${PROJECT_SOURCE_DIR}/stb_image.c
  5. ${PROJECT_SOURCE_DIR}/stb_image_write.c)
  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}/stb_image.h
  16. ${PROJECT_SOURCE_DIR}/stb_image_write.h
  17. DESTINATION include/stb)
  18. # Install CMake config file
  19. install(EXPORT ${PROJECT_NAME}-targets
  20. FILE ${PROJECT_NAME}-targets.cmake
  21. DESTINATION lib/cmake/${PROJECT_NAME})
  22. include(CMakePackageConfigHelpers)
  23. configure_package_config_file(
  24. ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}-config.cmake.in
  25. ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
  26. INSTALL_DESTINATION lib/cmake/${PROJECT_NAME})
  27. install(
  28. FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
  29. DESTINATION lib/cmake/${PROJECT_NAME})