Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

FetchContent support #1063

@valaxkong

Description

@valaxkong

I saw the README said glog can be incorporated into custom projects using the CMake command add_subdirectory. I tried it like this

FetchContent_Declare(
  glog
  GIT_REPOSITORY https://github.com/google/glog.git
  GIT_TAG        v0.6.0
)
FetchContent_GetProperties(glog)
if(NOT glog_POPULATED)
  FetchContent_Populate(glog)
  add_subdirectory(${glog_SOURCE_DIR})
endif()

When building as a submodule of my projects, I found those template codes in xxx.h.in files have not been replaced to generate xxx.h file. How to do things right? Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions