diff --git a/cmake_modules/FindCommuni.cmake b/cmake_modules/FindCommuni.cmake index 49d732cc87c6f04e86aebc4d02001d478f0f4eb3..c650897523aa225e86361d9fcd6f7c1c46a1e561 100644 --- a/cmake_modules/FindCommuni.cmake +++ b/cmake_modules/FindCommuni.cmake @@ -1,8 +1,16 @@ -find_package(Qt4) -include( ${QT_USE_FILE} ) +if( ENABLE_QT4 ) + find_package(Qt4) + include( ${QT_USE_FILE} ) +else() + find_package(Qt5Network) +endif() FIND_LIBRARY(IRC_LIBRARY NAMES IrcCore PATHS ${QT_LIBRARY_DIR}) -FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${QT_INCLUDE_DIR} PATH_SUFFIXES Communi) +if( ENABLE_QT4 ) + FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${QT_INCLUDE_DIR} PATH_SUFFIXES Communi) +else() + FIND_PATH(IRC_INCLUDE_DIR NAMES "IrcCore/ircglobal.h" PATHS ${Qt5Core_INCLUDE_DIRS} ${Qt5Core_INCLUDE_DIRS}"/.." PATH_SUFFIXES Communi) +endif() # message( STATUS ${IRC_LIBRARY}) if( IRC_LIBRARY AND IRC_INCLUDE_DIR )