@ -12,45 +12,30 @@
SET ( QtSingleApplication_FOUND FALSE )
SET ( QtSingleApplication_FOUND FALSE )
IF ( QT4_FOUND )
if ( Qt5Widgets_FOUND )
message ( STATUS "Looking for Qt4 single application library" )
set ( _includeFileName qtsingleapplication.h )
FIND_PATH ( QtSingleApplication_INCLUDE_DIR QtSingleApplication
else ( )
# s t a n d a r d l o c a t i o n s
set ( _includeFileName qtsinglecoreapplication.h )
/ u s r / i n c l u d e
endif ( )
/ u s r / i n c l u d e / Q t S o l u t i o n s
# q t 4 l o c a t i o n e x c e p t m a c ' s f r a m e w o r k s
" $ { Q T _ I N C L U D E _ D I R } / Q t S o l u t i o n s "
# m a c ' s f r a m e w o r k s
$ { F R A M E W O R K _ I N C L U D E _ D I R } / Q t S o l u t i o n s
)
SET ( QtSingleApplication_NAMES ${ QtSingleApplication_NAMES }
FOREACH ( TOP_INCLUDE_PATH in ${ Qt5Core_INCLUDE_DIRS } ${ FRAMEWORK_INCLUDE_DIR } )
Q t S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 l i b Q t S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 )
FIND_PATH ( QtSingleApplication_INCLUDE_DIR ${ _includeFileName } ${ TOP_INCLUDE_PATH } /QtSolutions )
FIND_LIBRARY ( QtSingleApplication_LIBRARY
N A M E S $ { Q t S i n g l e A p p l i c a t i o n _ N A M E S }
P A T H S $ { Q T _ L I B R A R Y _ D I R }
)
ELSEIF ( Qt5Core_FOUND )
message ( STATUS "Looking for Qt5 single application library" )
FOREACH ( TOP_INCLUDE_PATH in ${ Qt5Core_INCLUDE_DIRS } ${ FRAMEWORK_INCLUDE_DIR } )
FIND_PATH ( QtSingleApplication_INCLUDE_DIR QtSingleApplication ${ TOP_INCLUDE_PATH } /QtSolutions )
IF ( QtSingleApplication_INCLUDE_DIR )
IF ( QtSingleApplication_INCLUDE_DIR )
BREAK ( )
BREAK ( )
ENDIF ( )
ENDIF ( )
ENDFOREACH ( )
ENDFOREACH ( )
SET ( QtSingleApplication_NAMES ${ QtSingleApplication_NAMES }
SET ( QtSingleApplication_NAMES ${ QtSingleApplication_NAMES }
Q t 5 S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 l i b Q t 5 S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6
Q t 5 S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 l i b Q t 5 S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6
Q t S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 l i b Q t S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 )
Q t S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 l i b Q t S o l u t i o n s _ S i n g l e A p p l i c a t i o n - 2 . 6 )
GET_TARGET_PROPERTY ( _QT5_CORELIBRARY Qt5::Core LOCATION )
GET_TARGET_PROPERTY ( _QT5_CORELIBRARY Qt5::Core LOCATION )
GET_FILENAME_COMPONENT ( _QT5_CORELIBRARYPATH ${ _QT5_CORELIBRARY } PATH )
GET_FILENAME_COMPONENT ( _QT5_CORELIBRARYPATH ${ _QT5_CORELIBRARY } PATH )
FIND_LIBRARY ( QtSingleApplication_LIBRARY
FIND_LIBRARY ( QtSingleApplication_LIBRARY
N A M E S $ { Q t S i n g l e A p p l i c a t i o n _ N A M E S }
N A M E S $ { Q t S i n g l e A p p l i c a t i o n _ N A M E S }
P A T H S $ { _ Q T 5 _ C O R E L I B R A R Y P A T H }
P A T H S $ { _ Q T 5 _ C O R E L I B R A R Y P A T H }
)
)
ENDIF ( )
IF ( QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR )
IF ( QtSingleApplication_LIBRARY AND QtSingleApplication_INCLUDE_DIR )