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

32 lines
860 B

2 years ago
  1. cmake_minimum_required(VERSION 3.7)
  2. project(dr_wav)
  3. add_library(dr_wav ${PROJECT_SOURCE_DIR}/dr_wav.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 header
  11. install(
  12. FILES ${PROJECT_SOURCE_DIR}/dr_wav.h
  13. DESTINATION include/dr_libs)
  14. # Install CMake config file
  15. install(EXPORT ${PROJECT_NAME}-targets
  16. FILE ${PROJECT_NAME}-targets.cmake
  17. DESTINATION lib/cmake/${PROJECT_NAME})
  18. include(CMakePackageConfigHelpers)
  19. configure_package_config_file(
  20. ${PROJECT_SOURCE_DIR}/${PROJECT_NAME}-config.cmake.in
  21. ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
  22. INSTALL_DESTINATION lib/cmake/${PROJECT_NAME})
  23. install(
  24. FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
  25. DESTINATION lib/cmake/${PROJECT_NAME})