From 47a487a4a9855567fbd1e69d9e107c5ef01e81df Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Mon, 27 Nov 2017 21:25:03 +0100 Subject: [PATCH] fix CMake - fix wrong compare for HWLOC not found - remove usage of microhttpd variable if microhttpd is disabled --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 87c0e8a..4025973 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -361,7 +361,7 @@ if(HWLOC_ENABLE) PATH_SUFFIXES lib) - if("${HWLOC}" STREQUAL "MHTD-NOTFOUND" OR ${HWLOC_INCLUDE_DIR} STREQUAL "HWLOC_INCLUDE_DIR-NOTFOUND") + if("${HWLOC}" STREQUAL "HWLOC-NOTFOUND" OR ${HWLOC_INCLUDE_DIR} STREQUAL "HWLOC_INCLUDE_DIR-NOTFOUND") message(FATAL_ERROR "hwloc NOT found: use `-DHWLOC_ENABLE=OFF` to build without hwloc support") else() set(LIBS ${LIBS} ${HWLOC}) @@ -446,7 +446,10 @@ add_library(xmr-stak-c ${SRCFILES_C} ) set_property(TARGET xmr-stak-c PROPERTY C_STANDARD 99) -target_link_libraries(xmr-stak-c ${MHTD} ${LIBS}) +if(MICROHTTPD_ENABLE) + target_link_libraries(xmr-stak-c ${MHTD}) +endif() +target_link_libraries(xmr-stak-c ${LIBS}) # compile generic backend files file(GLOB BACKEND_CPP