0

Code in CMakeLists.txt

if (NOT glad_FOUND)
    include(FetchContent)
    FetchContent_Declare(
            glad
            URL "https://glad.dav1d.de/#language=c&specification=gl&api=gl%3D4.6&api=gles1%3Dnone&api=gles2%3Dnone&api=glsc2%3Dnone&profile=compatibility&loader=on"
            DOWNLOAD_NO_EXTRACT TRUE

    )
    FetchContent_MakeAvailable(glad)
endif()

Url

Error:

CMake Error at D:/IDEs/apps/CLion/ch-0/222.4167.35/bin/cmake/win/share/cmake-3.23/Modules/ExternalProject.cmake:2302:EVAL:2 (add_custom_command): BYPRODUCTS containing a "#" is not allowed.

ChrisMM
  • 8,448
  • 13
  • 29
  • 48
Chu Chun
  • 35
  • 6
  • Probably, there is another (direct) link to the same project, but which contains no hash symbol. Like in [that question](https://stackoverflow.com/questions/59799798/download-file-with-url-that-contains-hash-symbol-inside). – Tsyvarev Sep 28 '22 at 23:01
  • Wait- does this even work? According to wikipedia: ["_Clients are not supposed to send URI fragments to servers when they retrieve a document_"](https://en.wikipedia.org/wiki/URI_fragment); [RFC3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.5). – starball Sep 29 '22 at 03:21
  • FWIW, [this is the code throwing the error](https://gitlab.kitware.com/cmake/cmake/-/blob/v3.23.0/Source/cmLocalGenerator.cxx#L3964) – starball Sep 29 '22 at 03:50

1 Answers1

-1

Im switched to GLEW

find_package(GLEW QUIET)
if (NOT GLEW_FOUND)
    include(FetchContent)
    FetchContent_Declare(
            GLEW
            GIT_REPOSITORY https://github.com/Perlmint/glew-cmake
            GIT_TAG glew-cmake-2.2.0
    )
    FetchContent_MakeAvailable(GLEW)
endif ()
Chu Chun
  • 35
  • 6