From ccea123acfbfb06cb44ac5c24d8ddd678a8f6a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Fri, 10 Nov 2017 21:35:25 +0100 Subject: [PATCH] fix Exists check --- CMakeLists.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1514bffb..37dbcf78b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,15 +180,15 @@ add_subdirectory(Net) list(APPEND Poco_COMPONENTS "Net") endif() -if(EXISTS MongoDB AND ENABLE_MONGODB) +if(EXISTS ${PROJECT_SOURCE_DIR}/MongoDB AND ENABLE_MONGODB) add_subdirectory(MongoDB) list(APPEND Poco_COMPONENTS "MongoDB") endif() -if(EXISTS Redis AND ENABLE_REDIS) +if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS) add_subdirectory(Redis) list(APPEND Poco_COMPONENTS "Redis") endif() -if(EXISTS PDF AND ENABLE_PDF) +if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF) add_subdirectory(PDF) list(APPEND Poco_COMPONENTS "PDF") endif() @@ -197,33 +197,33 @@ endif() #NetSSL -if(WIN32 AND EXISTS NetSSL_Win AND ENABLE_NETSSL_WIN) +if(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN) add_subdirectory(NetSSL_Win) list(APPEND Poco_COMPONENTS "NetSSL_Win") -endif(WIN32 AND EXISTS NetSSL_Win AND ENABLE_NETSSL_WIN) +endif(WIN32 AND EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_Win AND ENABLE_NETSSL_WIN) find_package(OpenSSL) if(OPENSSL_FOUND) include_directories("${OPENSSL_INCLUDE_DIR}") - if(EXISTS NetSSL_OpenSSL AND ENABLE_NETSSL) + if(EXISTS ${PROJECT_SOURCE_DIR}/NetSSL_OpenSSL AND ENABLE_NETSSL) add_subdirectory(NetSSL_OpenSSL) list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL") endif() - if(EXISTS Crypto AND ENABLE_CRYPTO) + if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO) add_subdirectory(Crypto) list(APPEND Poco_COMPONENTS "Crypto") endif() endif(OPENSSL_FOUND) -if(EXISTS Data AND ENABLE_DATA) +if(EXISTS ${PROJECT_SOURCE_DIR}/Data AND ENABLE_DATA) add_subdirectory(Data) list(APPEND Poco_COMPONENTS "Data") endif() -if(EXISTS SevenZip AND ENABLE_SEVENZIP) +if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP) add_subdirectory(SevenZip) list(APPEND Poco_COMPONENTS "SevenZip") endif() -if(EXISTS Zip AND ENABLE_ZIP) +if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP) add_subdirectory(Zip) list(APPEND Poco_COMPONENTS "Zip") endif() @@ -232,28 +232,28 @@ find_package(APR) find_package(Apache2) if(APRUTIL_FOUND AND APACHE_FOUND) include_directories( "${APACHE_INCLUDE_DIR}" "${APRUTIL_INCLUDE_DIR}" ) - if(EXISTS ApacheConnector AND ENABLE_APACHECONNECTOR) + if(EXISTS ${PROJECT_SOURCE_DIR}/ApacheConnector AND ENABLE_APACHECONNECTOR) add_subdirectory(ApacheConnector) list(APPEND Poco_COMPONENTS "ApacheConnector") endif() endif(APRUTIL_FOUND AND APACHE_FOUND) -if(EXISTS CppParser AND ENABLE_CPPPARSER) +if(EXISTS ${PROJECT_SOURCE_DIR}/CppParser AND ENABLE_CPPPARSER) add_subdirectory(CppParser) list(APPEND Poco_COMPONENTS "CppParser") endif() -if(EXISTS PocoDoc AND ENABLE_POCODOC) +if(EXISTS ${PROJECT_SOURCE_DIR}/PocoDoc AND ENABLE_POCODOC) add_subdirectory(PocoDoc) list(APPEND Poco_COMPONENTS "PocoDoc") endif() -if(EXISTS PageCompiler AND ENABLE_PAGECOMPILER) +if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler AND ENABLE_PAGECOMPILER) add_subdirectory(PageCompiler) list(APPEND Poco_COMPONENTS "PageCompiler") endif() -if(EXISTS PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE) +if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE) add_subdirectory(PageCompiler/File2Page) list(APPEND Poco_COMPONENTS "File2Page") endif()