Skip to content

Commit 0ceaf9c

Browse files
committed
CMake: unset PNG_LIBRARIES in case PNG was not found
1 parent 504306d commit 0ceaf9c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ else()
212212
endif(JPEG_FOUND)
213213
if(PNG_FOUND)
214214
set(LIBVNCSERVER_HAVE_LIBPNG 1)
215+
else()
216+
unset(PNG_LIBRARIES) # would otherwise contain -NOTFOUND, confusing target_link_libraries()
215217
endif(PNG_FOUND)
216218
if(NOT OPENSSL_FOUND)
217219
unset(OPENSSL_LIBRARIES) # would otherwise contain -NOTFOUND, confusing target_link_libraries()

0 commit comments

Comments
 (0)