fix Exists check

This commit is contained in:
Günter Obiltschnig 2017-11-10 21:35:25 +01:00
parent e89e7d4520
commit ccea123acf

View File

@ -180,15 +180,15 @@ add_subdirectory(Net)
list(APPEND Poco_COMPONENTS "Net") list(APPEND Poco_COMPONENTS "Net")
endif() endif()
if(EXISTS MongoDB AND ENABLE_MONGODB) if(EXISTS ${PROJECT_SOURCE_DIR}/MongoDB AND ENABLE_MONGODB)
add_subdirectory(MongoDB) add_subdirectory(MongoDB)
list(APPEND Poco_COMPONENTS "MongoDB") list(APPEND Poco_COMPONENTS "MongoDB")
endif() endif()
if(EXISTS Redis AND ENABLE_REDIS) if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
add_subdirectory(Redis) add_subdirectory(Redis)
list(APPEND Poco_COMPONENTS "Redis") list(APPEND Poco_COMPONENTS "Redis")
endif() endif()
if(EXISTS PDF AND ENABLE_PDF) if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
add_subdirectory(PDF) add_subdirectory(PDF)
list(APPEND Poco_COMPONENTS "PDF") list(APPEND Poco_COMPONENTS "PDF")
endif() endif()
@ -197,33 +197,33 @@ endif()
#NetSSL #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) add_subdirectory(NetSSL_Win)
list(APPEND Poco_COMPONENTS "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) find_package(OpenSSL)
if(OPENSSL_FOUND) if(OPENSSL_FOUND)
include_directories("${OPENSSL_INCLUDE_DIR}") 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) add_subdirectory(NetSSL_OpenSSL)
list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL") list(APPEND Poco_COMPONENTS "NetSSL_OpenSSL")
endif() endif()
if(EXISTS Crypto AND ENABLE_CRYPTO) if(EXISTS ${PROJECT_SOURCE_DIR}/Crypto AND ENABLE_CRYPTO)
add_subdirectory(Crypto) add_subdirectory(Crypto)
list(APPEND Poco_COMPONENTS "Crypto") list(APPEND Poco_COMPONENTS "Crypto")
endif() endif()
endif(OPENSSL_FOUND) endif(OPENSSL_FOUND)
if(EXISTS Data AND ENABLE_DATA) if(EXISTS ${PROJECT_SOURCE_DIR}/Data AND ENABLE_DATA)
add_subdirectory(Data) add_subdirectory(Data)
list(APPEND Poco_COMPONENTS "Data") list(APPEND Poco_COMPONENTS "Data")
endif() endif()
if(EXISTS SevenZip AND ENABLE_SEVENZIP) if(EXISTS ${PROJECT_SOURCE_DIR}/SevenZip AND ENABLE_SEVENZIP)
add_subdirectory(SevenZip) add_subdirectory(SevenZip)
list(APPEND Poco_COMPONENTS "SevenZip") list(APPEND Poco_COMPONENTS "SevenZip")
endif() endif()
if(EXISTS Zip AND ENABLE_ZIP) if(EXISTS ${PROJECT_SOURCE_DIR}/Zip AND ENABLE_ZIP)
add_subdirectory(Zip) add_subdirectory(Zip)
list(APPEND Poco_COMPONENTS "Zip") list(APPEND Poco_COMPONENTS "Zip")
endif() endif()
@ -232,28 +232,28 @@ find_package(APR)
find_package(Apache2) find_package(Apache2)
if(APRUTIL_FOUND AND APACHE_FOUND) if(APRUTIL_FOUND AND APACHE_FOUND)
include_directories( "${APACHE_INCLUDE_DIR}" "${APRUTIL_INCLUDE_DIR}" ) 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) add_subdirectory(ApacheConnector)
list(APPEND Poco_COMPONENTS "ApacheConnector") list(APPEND Poco_COMPONENTS "ApacheConnector")
endif() endif()
endif(APRUTIL_FOUND AND APACHE_FOUND) endif(APRUTIL_FOUND AND APACHE_FOUND)
if(EXISTS CppParser AND ENABLE_CPPPARSER) if(EXISTS ${PROJECT_SOURCE_DIR}/CppParser AND ENABLE_CPPPARSER)
add_subdirectory(CppParser) add_subdirectory(CppParser)
list(APPEND Poco_COMPONENTS "CppParser") list(APPEND Poco_COMPONENTS "CppParser")
endif() endif()
if(EXISTS PocoDoc AND ENABLE_POCODOC) if(EXISTS ${PROJECT_SOURCE_DIR}/PocoDoc AND ENABLE_POCODOC)
add_subdirectory(PocoDoc) add_subdirectory(PocoDoc)
list(APPEND Poco_COMPONENTS "PocoDoc") list(APPEND Poco_COMPONENTS "PocoDoc")
endif() endif()
if(EXISTS PageCompiler AND ENABLE_PAGECOMPILER) if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler AND ENABLE_PAGECOMPILER)
add_subdirectory(PageCompiler) add_subdirectory(PageCompiler)
list(APPEND Poco_COMPONENTS "PageCompiler") list(APPEND Poco_COMPONENTS "PageCompiler")
endif() endif()
if(EXISTS PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE) if(EXISTS ${PROJECT_SOURCE_DIR}/PageCompiler/File2Page AND ENABLE_PAGECOMPILER_FILE2PAGE)
add_subdirectory(PageCompiler/File2Page) add_subdirectory(PageCompiler/File2Page)
list(APPEND Poco_COMPONENTS "File2Page") list(APPEND Poco_COMPONENTS "File2Page")
endif() endif()