modules.cmake 394 B

12345678910111213141516
  1. # This file contains C++20 module support requiring CMake 3.28+
  2. # Included conditionally to prevent parse errors on older CMake versions
  3. if(HTTPLIB_BUILD_MODULES)
  4. if(POLICY CMP0155)
  5. cmake_policy(SET CMP0155 NEW)
  6. endif()
  7. set(CMAKE_CXX_SCAN_FOR_MODULES ON)
  8. target_sources(${PROJECT_NAME}
  9. PUBLIC
  10. FILE_SET CXX_MODULES FILES
  11. "${_httplib_build_includedir}/httplib.cppm"
  12. )
  13. endif()