@ -1,20 +1,20 @@
# - T r y t o f i n d t h e Q t S i n g l e A p p l i c a t i o n i n c l u d e s a n d l i b r a r y
# - T r y t o f i n d t h e Q t S i n g l e A p p l i c a t i o n i n c l u d e s a n d l i b r a r y
# w h i c h d e f i n e s
# w h i c h d e f i n e s
#
#
# Q T S I N G L E A P P L I C A T I O N _ F O U N D - s y s t e m h a s Q t S i n g l e A p p l i c a t i o n
# Q t S i n g l e A p p l i c a t i o n _ F O U N D - s y s t e m h a s Q t S i n g l e A p p l i c a t i o n
# Q T S I N G L E A P P L I C A T I O N _ I N C L U D E _ D I R - w h e r e t o f i n d h e a d e r Q t S i n g l e A p p l i c a t i o n
# Q t S i n g l e A p p l i c a t i o n _ I N C L U D E _ D I R - w h e r e t o f i n d h e a d e r Q t S i n g l e A p p l i c a t i o n
# Q T S I N G L E A P P L I C A T I O N _ L I B R A R I E S - t h e l i b r a r i e s t o l i n k a g a i n s t t o u s e Q t S i n g l e A p p l i c a t i o n
# Q t S i n g l e A p p l i c a t i o n _ L I B R A R I E S - t h e l i b r a r i e s t o l i n k a g a i n s t t o u s e Q t S i n g l e A p p l i c a t i o n
# Q T S I N G L E A P P L I C A T I O N _ L I B R A R Y - w h e r e t o f i n d t h e Q t S i n g l e A p p l i c a t i o n library ( not for general use )
# Q t S i n g l e A p p l i c a t i o n _ L I B R A R Y - w h e r e t o f i n d t h e Q t S i n g l e A p p l i c a t i o n library ( not for general use )
# copyright ( c ) 2 0 1 3 T I _ E u g e n e t i . e u g e n e @ g m a i l . c o m
# copyright ( c ) 2 0 1 3 T I _ E u g e n e t i . e u g e n e @ g m a i l . c o m
#
#
# R e d i s t r i b u t i o n a n d u s e i s a l l o w e d a c c o r d i n g t o t h e t e r m s o f t h e F r e e B S D l i c e n s e .
# R e d i s t r i b u t i o n a n d u s e i s a l l o w e d a c c o r d i n g t o t h e t e r m s o f t h e F r e e B S D l i c e n s e .
SET ( QTSINGLEAPPLICATION _FOUND FALSE )
SET ( QtSingleApplication _FOUND FALSE )
IF ( QT4_FOUND )
IF ( QT4_FOUND )
message ( STATUS "Looking for Qt4 single application library" )
message ( STATUS "Looking for Qt4 single application library" )
FIND_PATH ( QTSINGLEAPPLICATION _INCLUDE_DIR QtSingleApplication
FIND_PATH ( QtSingleApplication _INCLUDE_DIR QtSingleApplication
# s t a n d a r d l o c a t i o n s
# 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
/ u s r / i n c l u d e / Q t S o l u t i o n s
/ u s r / i n c l u d e / Q t S o l u t i o n s
@ -24,71 +24,71 @@ IF(QT4_FOUND)
$ { 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
$ { 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 }
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 )
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
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 _ L I B R A R Y _ D I R }
P A T H S $ { Q T _ L I B R A R Y _ D I R }
)
)
ELSEIF ( Qt5Core_FOUND )
ELSEIF ( Qt5Core_FOUND )
message ( STATUS "Looking for Qt5 single application library" )
message ( STATUS "Looking for Qt5 single application library" )
FOREACH ( TOP_INCLUDE_PATH in ${ Qt5Core_INCLUDE_DIRS } ${ FRAMEWORK_INCLUDE_DIR } )
FOREACH ( TOP_INCLUDE_PATH in ${ Qt5Core_INCLUDE_DIRS } ${ FRAMEWORK_INCLUDE_DIR } )
FIND_PATH ( QTSINGLEAPPLICATION _INCLUDE_DIR QtSingleApplication ${ TOP_INCLUDE_PATH } /QtSolutions )
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 ( )
ENDIF ( )
IF ( QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION _INCLUDE_DIR )
IF ( QtSingleApplication_LIBRARY AND QtSingleApplication _INCLUDE_DIR )
SET ( QTSINGLEAPPLICATION_LIBRARIES ${ QTSINGLEAPPLICATION _LIBRARY } )
SET ( QtSingleApplication_LIBRARIES ${ QtSingleApplication _LIBRARY } )
SET ( QTSINGLEAPPLICATION _FOUND TRUE )
SET ( QtSingleApplication _FOUND TRUE )
IF ( CYGWIN )
IF ( CYGWIN )
IF ( BUILD_SHARED_LIBS )
IF ( BUILD_SHARED_LIBS )
# N o n e e d t o d e f i n e Q T S I N G L E A P P L I C A T I O N _ U S E _ D L L h e r e , b e c a u s e i t ' s d e f a u l t f o r C y g w i n .
# N o n e e d t o d e f i n e Q t S i n g l e A p p l i c a t i o n _ U S E _ D L L h e r e , b e c a u s e i t ' s d e f a u l t f o r C y g w i n .
ELSE ( BUILD_SHARED_LIBS )
ELSE ( BUILD_SHARED_LIBS )
SET ( QTSINGLEAPPLICATION _DEFINITIONS -DQTSINGLEAPPLICATION_STATIC )
SET ( QtSingleApplication _DEFINITIONS -DQTSINGLEAPPLICATION_STATIC )
ENDIF ( BUILD_SHARED_LIBS )
ENDIF ( BUILD_SHARED_LIBS )
ENDIF ( CYGWIN )
ENDIF ( CYGWIN )
ENDIF ( QTSINGLEAPPLICATION_LIBRARY AND QTSINGLEAPPLICATION _INCLUDE_DIR )
ENDIF ( QtSingleApplication_LIBRARY AND QtSingleApplication _INCLUDE_DIR )
IF ( QTSINGLEAPPLICATION _FOUND )
IF ( QtSingleApplication _FOUND )
IF ( NOT QtSingleApplication_FIND_QUIETLY )
IF ( NOT QtSingleApplication_FIND_QUIETLY )
MESSAGE ( STATUS "Found QtSingleApplication: ${QTSINGLEAPPLICATION _LIBRARY}" )
MESSAGE ( STATUS "Found QtSingleApplication: ${QtSingleApplication _LIBRARY}" )
MESSAGE ( STATUS " includes: ${QTSINGLEAPPLICATION _INCLUDE_DIR}" )
MESSAGE ( STATUS " includes: ${QtSingleApplication _INCLUDE_DIR}" )
ENDIF ( NOT QtSingleApplication_FIND_QUIETLY )
ENDIF ( NOT QtSingleApplication_FIND_QUIETLY )
ELSE ( QTSINGLEAPPLICATION_FOUND )
if ( NOT TARGET QtSingleApplication::QtSingleApplication )
IF ( QtSingleApplication_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "Could not find QtSingleApplication library" )
ENDIF ( QtSingleApplication_FIND_REQUIRED )
ENDIF ( QTSINGLEAPPLICATION_FOUND )
MARK_AS_ADVANCED ( QTSINGLEAPPLICATION_INCLUDE_DIR QTSINGLEAPPLICATION_LIBRARY )
if ( NOT TARGET QtSingleApplication::QtSingleApplication )
add_library ( QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED )
add_library ( QtSingleApplication::QtSingleApplication UNKNOWN IMPORTED )
set_target_properties ( QtSingleApplication::QtSingleApplication PROPERTIES
set_target_properties ( QtSingleApplication::QtSingleApplication PROPERTIES
I N T E R F A C E _ I N C L U D E _ D I R E C T O R I E S " $ { Q T S I N G L E A P P L I C A T I O N _ I N C L U D E _ D I R } "
I N T E R F A C E _ I N C L U D E _ D I R E C T O R I E S " $ { Q t S i n g l e A p p l i c a t i o n _ I N C L U D E _ D I R } "
I N T E R F A C E _ S Y S T E M _ I N C L U D E _ D I R E C T O R I E S " $ { Q T S I N G L E A P P L I C A T I O N _ I N C L U D E _ D I R } "
I N T E R F A C E _ S Y S T E M _ I N C L U D E _ D I R E C T O R I E S " $ { Q t S i n g l e A p p l i c a t i o n _ I N C L U D E _ D I R } "
)
)
if ( EXISTS "${QTSINGLEAPPLICATION _LIBRARY}" )
if ( EXISTS "${QtSingleApplication_LIBRARY}" )
set_target_properties ( QtSingleApplication::QtSingleApplication PROPERTIES
set_target_properties ( QtSingleApplication::QtSingleApplication PROPERTIES
I M P O R T E D _ L I N K _ I N T E R F A C E _ L A N G U A G E S " C X X "
I M P O R T E D _ L I N K _ I N T E R F A C E _ L A N G U A G E S " C X X "
I M P O R T E D _ L O C A T I O N " $ { Q T S I N G L E A P P L I C A T I O N _ L I B R A R Y } " )
I M P O R T E D _ L O C A T I O N " $ { Q t S i n g l e A p p l i c a t i o n _ L I B R A R Y } " )
endif ( )
endif ( )
endif ( NOT TARGET QtSingleApplication::QtSingleApplication )
endif ( NOT TARGET QtSingleApplication::QtSingleApplication )
ELSE ( QtSingleApplication_FOUND )
IF ( QtSingleApplication_FIND_REQUIRED )
MESSAGE ( FATAL_ERROR "Could not find QtSingleApplication library" )
ENDIF ( QtSingleApplication_FIND_REQUIRED )
ENDIF ( QtSingleApplication_FOUND )
MARK_AS_ADVANCED ( QtSingleApplication_INCLUDE_DIR QtSingleApplication_LIBRARY )