Skip to content

Commit 6954838

Browse files
Conda fixes for Windows (#14219)
1 parent 9234091 commit 6954838

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

samples/cpp/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@ endif()
100100
if(NOT TARGET gflags)
101101
if(APPLE OR DEFINED ENV{CONDA_PREFIX} OR DEFINED ENV{HOMEBREW_PREFIX})
102102
# conda-forge and brew contains only shared version of gflags
103-
find_package(gflags QUIET COMPONENTS nothreads_shared)
103+
if(ENV{CONDA_PREFIX} AND WIN32)
104+
# conda-forge windows compiled as gflags
105+
find_package(gflags QUIET COMPONENTS shared)
106+
else()
107+
find_package(gflags QUIET COMPONENTS nothreads_shared)
108+
endif()
104109
else()
105110
find_package(gflags QUIET COMPONENTS nothreads_static)
106111
endif()

0 commit comments

Comments
 (0)