Mercurial > hg > orthanc
changeset 4530:e40148c916b8
handling of ENABLE_WEB_SERVER in DownloadOrthancFramework.cmake for static library
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Feb 2021 11:02:23 +0100 |
parents | 5774fe497ff2 |
children | d64e6f401a8a |
files | OrthancFramework/Resources/CMake/DownloadOrthancFramework.cmake OrthancFramework/UnitTestsSources/CMakeLists.txt |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/DownloadOrthancFramework.cmake Wed Feb 24 21:06:34 2021 +0100 +++ b/OrthancFramework/Resources/CMake/DownloadOrthancFramework.cmake Thu Feb 25 11:02:23 2021 +0100 @@ -598,6 +598,15 @@ include_directories(${CURL_INCLUDE_DIRS}) list(APPEND ORTHANC_FRAMEWORK_LIBRARIES ${CURL_LIBRARIES}) endif() + + # Optional component - civetweb + if (ENABLE_WEB_SERVER) + CHECK_INCLUDE_FILE_CXX(civetweb.h HAVE_CIVETWEB_H) + if (NOT HAVE_CIVETWEB_H) + message(FATAL_ERROR "Please install the libcivetweb-dev package") + endif() + list(APPEND ORTHANC_FRAMEWORK_LIBRARIES civetweb) + endif() endif() # Look for Orthanc framework shared library
--- a/OrthancFramework/UnitTestsSources/CMakeLists.txt Wed Feb 24 21:06:34 2021 +0100 +++ b/OrthancFramework/UnitTestsSources/CMakeLists.txt Thu Feb 25 11:02:23 2021 +0100 @@ -48,6 +48,7 @@ set(ENABLE_PUGIXML ON) set(ENABLE_SQLITE ON) set(ENABLE_WEB_CLIENT ON) +set(ENABLE_WEB_SERVER ON) if (NOT ORTHANC_FRAMEWORK_STATIC) set(USE_SYSTEM_GOOGLE_TEST ON CACHE BOOL "Use the system version of Google Test")