CMakeLists.txt 797 B

12345678910111213141516171819202122232425262728293031
  1. cmake_minimum_required(VERSION 3.12...3.13)
  2. set(
  3. CMAKE_TOOLCHAIN_FILE
  4. "${CMAKE_CURRENT_LIST_DIR}/../toolchain.cmake"
  5. CACHE
  6. FILEPATH
  7. "Default toolchain"
  8. )
  9. set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard")
  10. set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Require C++ standard to be supported")
  11. set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default")
  12. option(HUNTER_ENABLED "Enable Hunter package manager" OFF)
  13. include("../cmake/HunterGate.cmake")
  14. HunterGate(
  15. URL "https://github.com/cpp-pm/hunter/archive/v0.24.8.tar.gz"
  16. SHA1 "ca7838dded9a1811b04ffd56175f629e0af82d3d"
  17. )
  18. project(coeurl-cmake-buildtest)
  19. include(FetchContent)
  20. FetchContent_Declare(
  21. coeurl
  22. GIT_REPOSITORY "${CMAKE_CURRENT_LIST_DIR}/.."
  23. GIT_TAG HEAD
  24. )
  25. FetchContent_MakeAvailable(coeurl)