@ -12,45 +12,30 @@
@@ -12,45 +12,30 @@
SET ( QtSingleApplication_FOUND FALSE )
IF ( QT4_FOUND )
message ( STATUS "Looking for Qt4 single application library" )
FIND_PATH ( QtSingleApplication_INCLUDE_DIR QtSingleApplication
# s t a n d a r d l o c a t i o n s
/ u s r / i n c l u d e
/ 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
)
if ( Qt5Widgets_FOUND )
set ( _includeFileName qtsingleapplication.h )
else ( )
set ( _includeFileName qtsinglecoreapplication.h )
endif ( )
SET ( QtSingleApplication_NAMES ${ QtSingleApplication_NAMES }
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_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 )
FOREACH ( TOP_INCLUDE_PATH in ${ Qt5Core_INCLUDE_DIRS } ${ FRAMEWORK_INCLUDE_DIR } )
FIND_PATH ( QtSingleApplication_INCLUDE_DIR ${ _includeFileName } ${ TOP_INCLUDE_PATH } /QtSolutions )
IF ( QtSingleApplication_INCLUDE_DIR )
BREAK ( )
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 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_FILENAME_COMPONENT ( _QT5_CORELIBRARYPATH ${ _QT5_CORELIBRARY } PATH )
GET_TARGET_PROPERTY ( _QT5_CORELIBRARY Qt5::Core LOCATION )
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 }
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 )