CMakeLists.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # MinIO C++ Library for Amazon S3 Compatible Cloud Storage
  2. # Copyright 2021 MinIO, Inc.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. INCLUDE (CheckIncludeFiles)
  16. INCLUDE (CheckFunctionExists)
  17. CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
  18. CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
  19. CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)
  20. CHECK_INCLUDE_FILES(limits.h HAVE_LIMITS_H)
  21. CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
  22. CHECK_FUNCTION_EXISTS(strtoimax HAVE_STRTOIMAX_F)
  23. if (NOT MSVC)
  24. CHECK_FUNCTION_EXISTS(strptime HAVE_STRPTIME_F)
  25. endif()
  26. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h @ONLY)
  27. # install all the headers
  28. FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
  29. INSTALL(FILES ${files} DESTINATION include/miniocpp)
  30. INSTALL(FILES DESTINATION include)