Skip to content

Commit

Permalink
Merge pull request #30 from AntaresSimulatorTeam/fix/no-search-packag…
Browse files Browse the repository at this point in the history
…e-in-registry

Search for glog and gflags packages does not work properly
  • Loading branch information
flomnes authored Aug 21, 2023
2 parents be42195 + d141c90 commit 1b961a7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmake/dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ endif()
## GFLAGS ##
##############
if(BUILD_gflags)
find_package(gflags)
# On Windows, when configuring "glog" or "gflags", a path to <package>-config.cmake is stored
# under the form of a registry key (HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\<PackageName>).
# A a consequence, when deploying/installing another version of antares-deps, supposed to be
# completely independent, an already compiled package ("glog" or "gflags") is found by the
# find_package(<PackageName>) in the Windows registry.
# As we can't make packages "glog" or "gflags" not to store paths in the Windows' registry,
# we tell find_package(<PackageName>) not to search in registry, by using NO_CMAKE_PACKAGE_REGISTRY option.
find_package(gflags NO_CMAKE_PACKAGE_REGISTRY)

if(NOT gflags_FOUND)
build_git_dependency(
Expand All @@ -100,7 +107,7 @@ endif()
## GLOG ##
############
if(BUILD_glog)
find_package(glog)
find_package(glog NO_CMAKE_PACKAGE_REGISTRY)

if(NOT glog_FOUND)
build_git_dependency(
Expand Down

0 comments on commit 1b961a7

Please sign in to comment.