Commit 1ef4f937 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Depending on platform, the POSIX and Qt5 client libraries may or may not be...

Depending on platform, the POSIX and Qt5 client libraries may or may not be available. If Any of them is available, we set INDI_FOUND to true except under Windows where we can not use the POSIX client library
parent 6ebde876
......@@ -39,7 +39,7 @@ macro(_INDI_check_version)
endif(NOT INDI_VERSION_OK)
endmacro(_INDI_check_version)
if (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
if (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
# in cache already
_INDI_check_version()
......@@ -85,7 +85,7 @@ else (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
${GNUWIN32_DIR}/lib
)
if (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
if (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
# If INDI is found we need to make sure on WIN32 we have INDI Client Qt backend otherwise we can't use INDI
if (WIN32)
if (INDI_CLIENT_QT_LIBRARIES)
......@@ -96,13 +96,19 @@ else (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
else (WIN32)
set(INDI_FOUND TRUE)
endif(WIN32)
else (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
else (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
set(INDI_FOUND FALSE)
endif (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
endif (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
if (INDI_FOUND)
if (NOT INDI_FIND_QUIETLY)
message(STATUS "Found INDI: ${INDI_LIBRARIES}, ${INDI_CLIENT_LIBRARIES}, ${INDI_INCLUDE_DIR}")
message(STATUS "Found INDI: ${INDI_LIBRARIES}, ${INDI_INCLUDE_DIR}")
if (INDI_CLIENT_LIBRARIES)
message(STATUS "Found INDI Client Library: ${INDI_CLIENT_LIBRARIES}")
endif (INDI_CLIENT_LIBRARIES)
if (INDI_CLIENT_QT_LIBRARIES)
message(STATUS "Found INDI Qt5 Client Library: ${INDI_CLIENT_QT_LIBRARIES}")
endif (INDI_CLIENT_QT_LIBRARIES)
endif (NOT INDI_FIND_QUIETLY)
else (INDI_FOUND)
if (INDI_FIND_REQUIRED)
......@@ -112,4 +118,4 @@ else (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
mark_as_advanced(INDI_INCLUDE_DIR INDI_LIBRARIES INDI_CLIENT_LIBRARIES INDI_CLIENT_QT_LIBRARIES)
endif (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND INDI_CLIENT_LIBRARIES)
endif (INDI_INCLUDE_DIR AND INDI_LIBRARIES AND (INDI_CLIENT_LIBRARIES OR INDI_CLIENT_QT_LIBRARIES))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment