Project

General

Profile

Bug #815

cmake configure dependency bug

Added by Janosch Dobler over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
02/13/2016
Due date:
% Done:

0%


Description

If Zlib AND Jansson are not found, JANSSON_INCLUDE_DIR is not set to an empty string and cmake configuring fails.

Suggestion to fix it:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8fff106..ab062db 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,16 +48,16 @@ if(NOT FUSE_FOUND)
        message( " *** No fuse dev libs found, won't build dnbd3-fuse" )
        SET(FUSE_INCLUDE_DIR "")
 endif()
-if(MAKE_SERVER AND NOT THREADS_FOUND)
+if(NOT THREADS_FOUND)
        message( " *** No threads found, won't build dnbd3-server" )
        SET(MAKE_SERVER False)
 endif()
-if(MAKE_SERVER AND NOT ZLIB_FOUND)
+if(NOT ZLIB_FOUND)
        message( " *** No zlib found, won't build dnbd3-server" )
        SET(ZLIB_INCLUDE_DIR "")
        SET(MAKE_SERVER False)
 endif()
-if(MAKE_SERVER AND NOT JANSSON_FOUND)
+if(NOT JANSSON_FOUND)
        message( " *** No jansson lib found, won't build dnbd3-server" )
        SET(JANSSON_INCLUDE_DIR "")
        SET(MAKE_SERVER False)
@@ -190,4 +190,3 @@ ENDIF()

Also available in: Atom PDF