@ -1,17 +1,83 @@
cmake_minimum_required ( VERSION 3.11 )
cmake_minimum_required ( VERSION 3.13 )
option ( APPVEYOR_BUILD "Build on appveyor" OFF )
option ( CI_BUILD "Set when building in CI. Enables -Werror where possible" OFF )
option ( ASAN "Compile with address sanitizers" OFF )
option ( QML_DEBUGGING "Enable qml debugging" OFF )
set ( CMAKE_MODULE_PATH ${ CMAKE_CURRENT_SOURCE_DIR } /cmake )
set (
C M A K E _ T O O L C H A I N _ F I L E " $ { C M A K E _ C U R R E N T _ L I S T _ D I R } / t o o l c h a i n . c m a k e "
C A C H E
F I L E P A T H " D e f a u l t t o o l c h a i n "
)
option ( HUNTER_ENABLED "Enable Hunter package manager" OFF )
include ( "cmake/HunterGate.cmake" )
HunterGate (
U R L " h t t p s : / / g i t h u b . c o m / c p p - p m / h u n t e r / a r c h i v e / v 0 . 2 3 . 2 4 4 . t a r . g z "
S H A 1 " 2 c 0 f 4 9 1 f d 0 b 8 0 f 7 b 0 9 e 3 d 2 1 a d b 9 7 2 3 7 1 6 1 e f 9 8 3 5 "
L O C A L
)
option ( USE_BUNDLED_BOOST "Use the bundled version of Boost." ${ HUNTER_ENABLED } )
option ( USE_BUNDLED_SPDLOG "Use the bundled version of spdlog."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_OLM "Use the bundled version of libolm." ${ HUNTER_ENABLED } )
option ( USE_BUNDLED_GTEST "Use the bundled version of Google Test."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_CMARK "Use the bundled version of cmark."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_JSON "Use the bundled version of nlohmann json."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_OPENSSL "Use the bundled version of OpenSSL."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_MTXCLIENT "Use the bundled version of the Matrix Client library." ${ HUNTER_ENABLED } )
option ( USE_BUNDLED_SODIUM "Use the bundled version of libsodium."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_ZLIB "Use the bundled version of zlib."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_LMDB "Use the bundled version of lmdb."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_LMDBXX "Use the bundled version of lmdb++."
$ { H U N T E R _ E N A B L E D } )
option ( USE_BUNDLED_TWEENY "Use the bundled version of tweeny."
$ { H U N T E R _ E N A B L E D } )
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" )
if ( ${ CMAKE_VERSION } VERSION_LESS "3.14.0" )
message ( "Adding FetchContent_MakeAvailable" )
# f r o m c m a k e s s o u r c e s
macro ( FetchContent_MakeAvailable )
foreach ( contentName IN ITEMS ${ ARGV } )
string ( TOLOWER ${ contentName } contentNameLower )
FetchContent_GetProperties ( ${ contentName } )
if ( NOT ${ contentNameLower } _POPULATED )
FetchContent_Populate ( ${ contentName } )
# O n l y t r y t o c a l l add_subdirectory ( ) i f t h e p o p u l a t e d c o n t e n t
# c a n b e t r e a t e d t h a t w a y . P r o t e c t i n g t h e c a l l w i t h t h e c h e c k
# a l l o w s t h i s f u n c t i o n t o b e u s e d f o r p r o j e c t s t h a t j u s t w a n t
# t o e n s u r e t h e c o n t e n t e x i s t s , s u c h a s t o p r o v i d e c o n t e n t a t
# a k n o w n l o c a t i o n .
if ( EXISTS ${ ${contentNameLower } _SOURCE_DIR}/CMakeLists.txt )
add_subdirectory ( ${ ${contentNameLower } _SOURCE_DIR}
$ { $ { c o n t e n t N a m e L o w e r } _ B I N A R Y _ D I R } )
endif ( )
endif ( )
endforeach ( )
endmacro ( )
endif ( )
include ( GNUInstallDirs )
# I n c l u d e Q t b a s i c f u n c t i o n s
include ( QtCommon )
project ( nheko LANGUAGES C CXX )
project ( nheko LANGUAGES CXX C )
set ( CPACK_PACKAGE_VERSION_MAJOR "0" )
set ( CPACK_PACKAGE_VERSION_MINOR "7" )
set ( CPACK_PACKAGE_VERSION_PATCH "0" )
@ -30,39 +96,42 @@ set(IDENTIFIER "com.github.mujx.nheko")
add_project_meta ( META_FILES_TO_INCLUDE )
if ( APPLE )
set ( OPENSSL_ROOT_DIR /usr/local/opt/openssl )
endif ( )
if ( NOT MSVC AND NOT APPLE )
set ( THREADS_PREFER_PTHREAD_FLAG ON )
find_package ( Threads REQUIRED )
set ( THREADS_PREFER_PTHREAD_FLAG ON )
find_package ( Threads REQUIRED )
endif ( )
if ( BUILD_DOCS )
find_package ( Doxygen )
if ( DOXYGEN_FOUND )
set ( DOXYGEN_IN ${ CMAKE_CURRENT_SOURCE_DIR } /cmake/Doxyfile.in )
set ( DOXYGEN_OUT ${ CMAKE_CURRENT_BINARY_DIR } /Doxyfile )
configure_file ( ${ DOXYGEN_IN } ${ DOXYGEN_OUT } )
add_custom_target ( docs ALL
C O M M A N D $ { D O X Y G E N _ E X E C U T A B L E } $ { D O X Y G E N _ O U T }
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R }
C O M M E N T " G e n e r a t i n g A P I d o c u m e n t a t i o n w i t h D o x y g e n "
V E R B A T I M )
else ( DOXYGEN_FOUND )
message ( "Doxygen need to be installed to generate the doxygen documentation" )
endif ( DOXYGEN_FOUND )
find_package ( Doxygen )
if ( DOXYGEN_FOUND )
set ( DOXYGEN_IN ${ CMAKE_CURRENT_SOURCE_DIR } /cmake/Doxyfile.in )
set ( DOXYGEN_OUT ${ CMAKE_CURRENT_BINARY_DIR } /Doxyfile )
configure_file ( ${ DOXYGEN_IN } ${ DOXYGEN_OUT } )
add_custom_target ( docs ALL
C O M M A N D $ { D O X Y G E N _ E X E C U T A B L E } $ { D O X Y G E N _ O U T }
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R }
C O M M E N T " G e n e r a t i n g A P I d o c u m e n t a t i o n w i t h D o x y g e n "
V E R B A T I M )
else ( DOXYGEN_FOUND )
message ( "Doxygen need to be installed to generate the doxygen documentation" )
endif ( DOXYGEN_FOUND )
endif ( )
#
# L M D B
#
include ( LMDB )
# include ( LMDB )
if ( USE_BUNDLED_LMDB )
hunter_add_package ( lmdb )
find_package ( liblmdb CONFIG REQUIRED )
else ( )
include ( FindPkgConfig )
pkg_search_module ( lmdb REQUIRED IMPORTED_TARGET lmdb )
endif ( )
#
# D i s c o v e r Q t d e p e n d e n c i e s .
@ -72,86 +141,76 @@ find_package(Qt5QuickCompiler)
find_package ( Qt5DBus )
if ( APPLE )
find_package ( Qt5MacExtras REQUIRED )
find_package ( Qt5MacExtras REQUIRED )
endif ( APPLE )
if ( Qt5Widgets_FOUND )
if ( Qt5Widgets_VERSION VERSION_LESS 5.7 .0 )
message ( STATUS "Qt version ${Qt5Widgets_VERSION}" )
message ( WARNING "Minimum supported Qt5 version is 5.7 !" )
endif ( )
if ( Qt5Widgets_VERSION VERSION_LESS 5.9 .0 )
message ( STATUS "Qt version ${Qt5Widgets_VERSION}" )
message ( WARNING "Minimum supported Qt5 version is 5.9 !" )
endif ( )
endif ( Qt5Widgets_FOUND )
#
# S e t u p c o m p i l e r f l a g s .
#
if ( NOT MSVC )
set ( CMAKE_C_COMPILER gcc )
endif ( NOT MSVC )
set ( CMAKE_CXX_STANDARD 17 )
set ( CMAKE_CXX_STANDARD_REQUIRED ON )
set ( CMAKE_INCLUDE_CURRENT_DIR ON )
if ( NOT MSVC )
set (
C M A K E _ C X X _ F L A G S
" $ { C M A K E _ C X X _ F L A G S } \
- W a l l \
- W e x t r a \
- W e r r o r \
- p i p e \
- p e d a n t i c \
- f s i z e d - d e a l l o c a t i o n \
- f d i a g n o s t i c s - c o l o r = a l w a y s \
- W u n r e a c h a b l e - c o d e \
- s t d = c + + 1 7 "
)
if ( NOT CMAKE_COMPILER_IS_GNUCXX )
# - W s h a d o w i s b u g g y a n d b r o k e n i n G C C , s o d o n o t e n a b l e i t .
# s e e h t t p s : / / g c c . g n u . o r g / b u g z i l l a / s h o w _ b u g . c g i ? i d = 7 9 3 2 8
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow" )
endif ( )
set (
C M A K E _ C X X _ F L A G S
" $ { C M A K E _ C X X _ F L A G S } \
- W a l l \
- W e x t r a \
- p i p e \
- p e d a n t i c \
- f s i z e d - d e a l l o c a t i o n \
- f d i a g n o s t i c s - c o l o r = a l w a y s \
- W u n r e a c h a b l e - c o d e \
- s t d = c + + 1 7 "
)
if ( NOT CMAKE_COMPILER_IS_GNUCXX )
# - W s h a d o w i s b u g g y a n d b r o k e n i n G C C , s o d o n o t e n a b l e i t .
# s e e h t t p s : / / g c c . g n u . o r g / b u g z i l l a / s h o w _ b u g . c g i ? i d = 7 9 3 2 8
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow" )
endif ( )
endif ( )
if ( MSVC )
set (
C M A K E _ C X X _ F L A G S
" $ { C M A K E _ C X X _ F L A G S } / b i g o b j "
)
set (
C M A K E _ C X X _ F L A G S
" $ { C M A K E _ C X X _ F L A G S } / b i g o b j "
)
endif ( )
if ( NOT ( CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES ) )
set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING
" C h o o s e t h e t y p e o f b u i l d , o p t i o n s a r e : N o n e D e b u g R e l e a s e R e l W i t h D e b I n f o M i n S i z e R e l . "
F O R C E )
message ( "Setting build type to '${CMAKE_BUILD_TYPE}'" )
set ( CMAKE_BUILD_TYPE "Debug" CACHE STRING
" C h o o s e t h e t y p e o f b u i l d , o p t i o n s a r e : N o n e D e b u g R e l e a s e R e l W i t h D e b I n f o M i n S i z e R e l . "
F O R C E )
message ( "Setting build type to '${CMAKE_BUILD_TYPE}'" )
else ( NOT ( CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES ) )
message ( "Build type set to '${CMAKE_BUILD_TYPE}'" )
message ( "Build type set to '${CMAKE_BUILD_TYPE}'" )
endif ( NOT ( CMAKE_BUILD_TYPE OR CMAKE_CONFIGURATION_TYPES ) )
set ( SPDLOG_DEBUG_ON false )
# W i n d o w s d o e s n ' t h a n d l e C M A K E _ B U I L D _ T Y P E .
if ( NOT WIN32 )
if ( ${ CMAKE_BUILD_TYPE } STREQUAL "Debug" )
set ( SPDLOG_DEBUG_ON true )
else ( )
set ( SPDLOG_DEBUG_ON false )
endif ( )
if ( ${ CMAKE_BUILD_TYPE } STREQUAL "Debug" )
set ( SPDLOG_DEBUG_ON true )
else ( )
set ( SPDLOG_DEBUG_ON false )
endif ( )
endif ( )
find_program ( GIT git )
if ( GIT )
execute_process (
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ S O U R C E _ D I R }
C O M M A N D $ { G I T } r e v - p a r s e - - s h o r t H E A D
O U T P U T _ V A R I A B L E G I T _ O U T O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
)
if ( GIT_OUT )
set ( CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${GIT_OUT}" )
else ( )
set ( CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}" )
endif ( )
execute_process (
W O R K I N G _ D I R E C T O R Y $ { C M A K E _ S O U R C E _ D I R }
C O M M A N D $ { G I T } r e v - p a r s e - - s h o r t H E A D
O U T P U T _ V A R I A B L E G I T _ O U T O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E
)
if ( GIT_OUT )
set ( CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}-${GIT_OUT}" )
else ( )
set ( CPACK_PACKAGE_VERSION_PATCH "${CPACK_PACKAGE_VERSION_PATCH}" )
endif ( )
endif ( GIT )
set ( CPACK_PACKAGE_VERSION ${ CPACK_PACKAGE_VERSION_MAJOR } . ${ CPACK_PACKAGE_VERSION_MINOR } . ${ CPACK_PACKAGE_VERSION_PATCH } )
@ -168,220 +227,275 @@ configure_file(cmake/nheko.h config/nheko.h)
# D e c l a r e s o u r c e a n d h e a d e r f i l e s .
#
set ( SRC_FILES
# D i a l o g s
s r c / d i a l o g s / C r e a t e R o o m . c p p
s r c / d i a l o g s / I m a g e O v e r l a y . c p p
s r c / d i a l o g s / P r e v i e w U p l o a d O v e r l a y . c p p
s r c / d i a l o g s / I n v i t e U s e r s . c p p
s r c / d i a l o g s / J o i n R o o m . c p p
s r c / d i a l o g s / M e m b e r L i s t . c p p
s r c / d i a l o g s / L e a v e R o o m . c p p
s r c / d i a l o g s / L o g o u t . c p p
s r c / d i a l o g s / U s e r P r o f i l e . c p p
s r c / d i a l o g s / R e a d R e c e i p t s . c p p
s r c / d i a l o g s / R e C a p t c h a . c p p
s r c / d i a l o g s / R o o m S e t t i n g s . c p p
# E m o j i
s r c / e m o j i / C a t e g o r y . c p p
s r c / e m o j i / I t e m D e l e g a t e . c p p
s r c / e m o j i / P a n e l . c p p
s r c / e m o j i / P i c k B u t t o n . c p p
s r c / e m o j i / P r o v i d e r . c p p
# T i m e l i n e
s r c / t i m e l i n e / T i m e l i n e V i e w M a n a g e r . c p p
s r c / t i m e l i n e / T i m e l i n e M o d e l . c p p
s r c / t i m e l i n e / D e l e g a t e C h o o s e r . c p p
# U I c o m p o n e n t s
s r c / u i / A v a t a r . c p p
s r c / u i / B a d g e . c p p
s r c / u i / L o a d i n g I n d i c a t o r . c p p
s r c / u i / I n f o M e s s a g e . c p p
s r c / u i / F l a t B u t t o n . c p p
s r c / u i / F l o a t i n g B u t t o n . c p p
s r c / u i / L a b e l . c p p
s r c / u i / O v e r l a y M o d a l . c p p
s r c / u i / S n a c k B a r . c p p
s r c / u i / R a i s e d B u t t o n . c p p
s r c / u i / R i p p l e . c p p
s r c / u i / R i p p l e O v e r l a y . c p p
s r c / u i / O v e r l a y W i d g e t . c p p
s r c / u i / T e x t F i e l d . c p p
s r c / u i / T e x t L a b e l . c p p
s r c / u i / T o g g l e B u t t o n . c p p
s r c / u i / T h e m e . c p p
s r c / u i / T h e m e M a n a g e r . c p p
s r c / A v a t a r P r o v i d e r . c p p
s r c / C a c h e . c p p
s r c / C h a t P a g e . c p p
s r c / C o m m u n i t i e s L i s t I t e m . c p p
s r c / C o m m u n i t i e s L i s t . c p p
s r c / E v e n t A c c e s s o r s . c p p
s r c / I n v i t e e I t e m . c p p
s r c / L o g i n P a g e . c p p
s r c / L o g g i n g . c p p
s r c / M a i n W i n d o w . c p p
s r c / M a t r i x C l i e n t . c p p
s r c / M x c I m a g e P r o v i d e r . c p p
s r c / C o l o r I m a g e P r o v i d e r . c p p
s r c / Q u i c k S w i t c h e r . c p p
s r c / O l m . c p p
s r c / R e g i s t e r P a g e . c p p
s r c / R o o m I n f o L i s t I t e m . c p p
s r c / R o o m L i s t . c p p
s r c / R u n G u a r d . c p p
s r c / S i d e B a r A c t i o n s . c p p
s r c / S p l i t t e r . c p p
s r c / p o p u p s / S u g g e s t i o n s P o p u p . c p p
s r c / p o p u p s / P o p u p I t e m . c p p
s r c / p o p u p s / R e p l y P o p u p . c p p
s r c / p o p u p s / U s e r M e n t i o n s . c p p
s r c / T e x t I n p u t W i d g e t . c p p
s r c / T o p R o o m B a r . c p p
s r c / T r a y I c o n . c p p
s r c / U t i l s . c p p
s r c / U s e r I n f o W i d g e t . c p p
s r c / U s e r S e t t i n g s P a g e . c p p
s r c / W e l c o m e P a g e . c p p
s r c / m a i n . c p p
)
# E x t e r n a l P r o j e c t d e p e n d e n c i e s
set ( EXTERNAL_PROJECT_DEPS "" )
# D i a l o g s
s r c / d i a l o g s / C r e a t e R o o m . c p p
s r c / d i a l o g s / I m a g e O v e r l a y . c p p
s r c / d i a l o g s / P r e v i e w U p l o a d O v e r l a y . c p p
s r c / d i a l o g s / I n v i t e U s e r s . c p p
s r c / d i a l o g s / J o i n R o o m . c p p
s r c / d i a l o g s / M e m b e r L i s t . c p p
s r c / d i a l o g s / L e a v e R o o m . c p p
s r c / d i a l o g s / L o g o u t . c p p
s r c / d i a l o g s / U s e r P r o f i l e . c p p
s r c / d i a l o g s / R e a d R e c e i p t s . c p p
s r c / d i a l o g s / R e C a p t c h a . c p p
s r c / d i a l o g s / R o o m S e t t i n g s . c p p
# E m o j i
s r c / e m o j i / C a t e g o r y . c p p
s r c / e m o j i / I t e m D e l e g a t e . c p p
s r c / e m o j i / P a n e l . c p p
s r c / e m o j i / P i c k B u t t o n . c p p
s r c / e m o j i / P r o v i d e r . c p p
# T i m e l i n e
s r c / t i m e l i n e / T i m e l i n e V i e w M a n a g e r . c p p
s r c / t i m e l i n e / T i m e l i n e M o d e l . c p p
s r c / t i m e l i n e / D e l e g a t e C h o o s e r . c p p
# U I c o m p o n e n t s
s r c / u i / A v a t a r . c p p
s r c / u i / B a d g e . c p p
s r c / u i / L o a d i n g I n d i c a t o r . c p p
s r c / u i / I n f o M e s s a g e . c p p
s r c / u i / F l a t B u t t o n . c p p
s r c / u i / F l o a t i n g B u t t o n . c p p
s r c / u i / L a b e l . c p p
s r c / u i / O v e r l a y M o d a l . c p p
s r c / u i / S n a c k B a r . c p p
s r c / u i / R a i s e d B u t t o n . c p p
s r c / u i / R i p p l e . c p p
s r c / u i / R i p p l e O v e r l a y . c p p
s r c / u i / O v e r l a y W i d g e t . c p p
s r c / u i / T e x t F i e l d . c p p
s r c / u i / T e x t L a b e l . c p p
s r c / u i / T o g g l e B u t t o n . c p p
s r c / u i / T h e m e . c p p
s r c / u i / T h e m e M a n a g e r . c p p
s r c / A v a t a r P r o v i d e r . c p p
s r c / C a c h e . c p p
s r c / C h a t P a g e . c p p
s r c / C o m m u n i t i e s L i s t I t e m . c p p
s r c / C o m m u n i t i e s L i s t . c p p
s r c / E v e n t A c c e s s o r s . c p p
s r c / I n v i t e e I t e m . c p p
s r c / L o g i n P a g e . c p p
s r c / L o g g i n g . c p p
s r c / M a i n W i n d o w . c p p
s r c / M a t r i x C l i e n t . c p p
s r c / M x c I m a g e P r o v i d e r . c p p
s r c / C o l o r I m a g e P r o v i d e r . c p p
s r c / Q u i c k S w i t c h e r . c p p
s r c / O l m . c p p
s r c / R e g i s t e r P a g e . c p p
s r c / R o o m I n f o L i s t I t e m . c p p
s r c / R o o m L i s t . c p p
s r c / R u n G u a r d . c p p
s r c / S i d e B a r A c t i o n s . c p p
s r c / S p l i t t e r . c p p
s r c / p o p u p s / S u g g e s t i o n s P o p u p . c p p
s r c / p o p u p s / P o p u p I t e m . c p p
s r c / p o p u p s / R e p l y P o p u p . c p p
s r c / p o p u p s / U s e r M e n t i o n s . c p p
s r c / T e x t I n p u t W i d g e t . c p p
s r c / T o p R o o m B a r . c p p
s r c / T r a y I c o n . c p p
s r c / U t i l s . c p p
s r c / U s e r I n f o W i d g e t . c p p
s r c / U s e r S e t t i n g s P a g e . c p p
s r c / W e l c o m e P a g e . c p p
s r c / m a i n . c p p
)
include ( FeatureSummary )
set ( Boost_USE_STATIC_LIBS OFF )
set ( Boost_USE_STATIC_RUNTIME OFF )
set ( Boost_USE_MULTITHREADED ON )
if ( USE_BUNDLED_BOOST )
hunter_add_package ( Boost COMPONENTS iostreams system thread )
endif ( )
find_package ( Boost 1.70 REQUIRED
C O M P O N E N T S a t o m i c
c h r o n o
d a t e _ t i m e
i o s t r e a m s
r a n d o m
r e g e x
s y s t e m
t h r e a d )
C O M P O N E N T S i o s t r e a m s
s y s t e m
t h r e a d )
if ( USE_BUNDLED_ZLIB )
hunter_add_package ( ZLIB )
endif ( )
find_package ( ZLIB REQUIRED )
if ( USE_BUNDLED_OPENSSL )
hunter_add_package ( OpenSSL )
endif ( )
find_package ( OpenSSL REQUIRED )
find_package ( MatrixClient 0.3.0 REQUIRED )
find_package ( Olm 2 REQUIRED )
if ( USE_BUNDLED_MTXCLIENT )
include ( FetchContent )
set ( BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "" )
set ( BUILD_LIB_TESTS OFF CACHE INTERNAL "" )
FetchContent_Declare (
M a t r i x C l i e n t
G I T _ R E P O S I T O R Y h t t p s : / / g i t h u b . c o m / N h e k o - R e b o r n / m t x c l i e n t . g i t
G I T _ T A G 0 3 b 5 0 0 8 a 0 5 f 8 9 5 e 9 1 e 3 9 6 8 d e 7 b 6 8 d b 5 0 f 6 c 4 1 b 2 a
)
FetchContent_MakeAvailable ( MatrixClient )
else ( )
find_package ( MatrixClient 0.3.0 REQUIRED )
endif ( )
if ( USE_BUNDLED_OLM )
include ( FetchContent )
set ( OLM_TESTS OFF CACHE INTERNAL "" )
FetchContent_Declare (
O l m
G I T _ R E P O S I T O R Y h t t p s : / / g i t l a b . m a t r i x . o r g / m a t r i x - o r g / o l m . g i t
G I T _ T A G 3 . 1 . 4
)
FetchContent_MakeAvailable ( Olm )
else ( )
find_package ( Olm 3 )
set_package_properties ( Olm PROPERTIES
D E S C R I P T I O N " A n i m p l e m e n t a t i o n o f t h e D o u b l e R a t c h e t c r y p t o g r a p h i c r a t c h e t "
U R L " h t t p s : / / g i t . m a t r i x . o r g / g i t / o l m / a b o u t / "
T Y P E R E Q U I R E D
)
endif ( )
if ( USE_BUNDLED_SPDLOG )
hunter_add_package ( spdlog )
endif ( )
find_package ( spdlog 1.0.0 CONFIG REQUIRED )
find_package ( cmark REQUIRED )
if ( USE_BUNDLED_CMARK )
include ( FetchContent )
FetchContent_Declare (
c m a r k
G I T _ R E P O S I T O R Y h t t p s : / / g i t h u b . c o m / c o m m o n m a r k / c m a r k . g i t
G I T _ T A G 2 4 2 e 2 7 7 a 6 6 1 e c 7 e 5 1 f 3 4 d c a f 8 6 c 1 9 2 5 d 5 5 0 b 1 4 9 8 # 0 . 2 9 . 0 < < d o e s n ' t w o r k w i t h f e t c h c o n t e n t y e t
C M A K E _ A R G S " C M A R K _ S T A T I C = O N C M A R K _ S H A R E D = O F F C M A R K _ T E S T S = O F F C M A R K _ T E S T S = O F F "
)
FetchContent_MakeAvailable ( cmark )
if ( MSVC )
add_library ( cmark::cmark ALIAS libcmark )
else ( )
add_library ( cmark::cmark ALIAS libcmark_static )
endif ( )
else ( )
find_package ( cmark REQUIRED )
endif ( )
if ( USE_BUNDLED_JSON )
hunter_add_package ( nlohmann_json )
endif ( )
find_package ( nlohmann_json 3.2.0 )
set_package_properties ( nlohmann_json PROPERTIES
D E S C R I P T I O N " J S O N f o r M o d e r n C + + , a C + + 1 1 h e a d e r - o n l y J S O N c l a s s "
U R L " h t t p s : / / n l o h m a n n . g i t h u b . i o / j s o n / "
T Y P E R E Q U I R E D
)
if ( NOT LMDBXX_INCLUDE_DIR )
find_path ( LMDBXX_INCLUDE_DIR
N A M E S l m d b + + . h
P A T H S / u s r / i n c l u d e
/ u s r / l o c a l / i n c l u d e
$ E N V { L I B _ D I R } / i n c l u d e
$ E N V { L I B _ D I R } / i n c l u d e / l m d b x x )
endif ( )
include_directories ( SYSTEM ${ LMDBXX_INCLUDE_DIR } )
if ( NOT TWEENY_INCLUDE_DIR )
find_path ( TWEENY_INCLUDE_DIR
N A M E S t w e e n y / t w e e n y . h
P A T H S / u s r / i n c l u d e /
/ u s r / l o c a l / i n c l u d e /
$ E N V { L I B _ D I R } / i n c l u d e /
$ E N V { L I B _ D I R } / i n c l u d e / t w e e n y )
D E S C R I P T I O N " J S O N f o r M o d e r n C + + , a C + + 1 1 h e a d e r - o n l y J S O N c l a s s "
U R L " h t t p s : / / n l o h m a n n . g i t h u b . i o / j s o n / "
T Y P E R E Q U I R E D
)
if ( USE_BUNDLED_LMDBXX )
hunter_add_package ( lmdbxx )
find_package ( lmdbxx CONFIG REQUIRED )
else ( )
if ( NOT LMDBXX_INCLUDE_DIR )
find_path ( LMDBXX_INCLUDE_DIR
N A M E S l m d b + + . h
P A T H S / u s r / i n c l u d e
/ u s r / l o c a l / i n c l u d e
$ E N V { L I B _ D I R } / i n c l u d e
$ E N V { L I B _ D I R } / i n c l u d e / l m d b x x )
endif ( )
add_library ( lmdbxx INTERFACE )
target_include_directories ( lmdbxx INTERFACE ${ LMDBXX_INCLUDE_DIR } )
add_library ( lmdbxx::lmdbxx ALIAS lmdbxx )
endif ( )
include_directories ( SYSTEM ${ TWEENY_INCLUDE_DIR } )
include_directories ( ${ CMAKE_SOURCE_DIR } /src )
include_directories ( ${ Boost_INCLUDE_DIRS } )
# l o c a l i n c l u e d i r e c t o r y
include_directories ( includes )
if ( USE_BUNDLED_TWEENY )
include ( FetchContent )
FetchContent_Declare (
T w e e n y
G I T _ R E P O S I T O R Y h t t p s : / / g i t h u b . c o m / m o b i u s 3 / t w e e n y . g i t
G I T _ T A G 6 a 5 0 3 3 3 7 2 f e 5 3 c 4 c 7 3 1 c 6 6 c 8 a 2 d 5 6 2 6 1 7 4 6 c d 8 5 c # v 3 < - v 3 h a s u n f i x e d w a r n i n g s
)
FetchContent_MakeAvailable ( Tweeny )
else ( )
find_package ( Tweeny REQUIRED )
endif ( )
feature_summary ( WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES )
qt5_wrap_cpp ( MOC_HEADERS
# D i a l o g s
s r c / d i a l o g s / C r e a t e R o o m . h
s r c / d i a l o g s / I m a g e O v e r l a y . h
s r c / d i a l o g s / P r e v i e w U p l o a d O v e r l a y . h
s r c / d i a l o g s / I n v i t e U s e r s . h
s r c / d i a l o g s / J o i n R o o m . h
s r c / d i a l o g s / M e m b e r L i s t . h
s r c / d i a l o g s / L e a v e R o o m . h
s r c / d i a l o g s / L o g o u t . h
s r c / d i a l o g s / U s e r P r o f i l e . h
s r c / d i a l o g s / R a w M e s s a g e . h
s r c / d i a l o g s / R e a d R e c e i p t s . h
s r c / d i a l o g s / R e C a p t c h a . h
s r c / d i a l o g s / R o o m S e t t i n g s . h
# E m o j i
s r c / e m o j i / C a t e g o r y . h
s r c / e m o j i / I t e m D e l e g a t e . h
s r c / e m o j i / P a n e l . h
s r c / e m o j i / P i c k B u t t o n . h
# T i m e l i n e
s r c / t i m e l i n e / T i m e l i n e V i e w M a n a g e r . h
s r c / t i m e l i n e / T i m e l i n e M o d e l . h
s r c / t i m e l i n e / D e l e g a t e C h o o s e r . h
# U I c o m p o n e n t s
s r c / u i / A v a t a r . h
s r c / u i / B a d g e . h
s r c / u i / L o a d i n g I n d i c a t o r . h
s r c / u i / I n f o M e s s a g e . h
s r c / u i / F l a t B u t t o n . h
s r c / u i / L a b e l . h
s r c / u i / F l o a t i n g B u t t o n . h
s r c / u i / M e n u . h
s r c / u i / O v e r l a y W i d g e t . h
s r c / u i / S n a c k B a r . h
s r c / u i / R a i s e d B u t t o n . h
s r c / u i / R i p p l e . h
s r c / u i / R i p p l e O v e r l a y . h
s r c / u i / T e x t F i e l d . h
s r c / u i / T e x t L a b e l . h
s r c / u i / T o g g l e B u t t o n . h
s r c / u i / T h e m e . h
s r c / u i / T h e m e M a n a g e r . h
s r c / n o t i f i c a t i o n s / M a n a g e r . h
s r c / A v a t a r P r o v i d e r . h
s r c / C a c h e _ p . h
s r c / C h a t P a g e . h
s r c / C o m m u n i t i e s L i s t I t e m . h
s r c / C o m m u n i t i e s L i s t . h
s r c / L o g i n P a g e . h
s r c / M a i n W i n d o w . h
s r c / M x c I m a g e P r o v i d e r . h
s r c / I n v i t e e I t e m . h
s r c / Q u i c k S w i t c h e r . h
s r c / R e g i s t e r P a g e . h
s r c / R o o m I n f o L i s t I t e m . h
s r c / R o o m L i s t . h
s r c / S i d e B a r A c t i o n s . h
s r c / S p l i t t e r . h
s r c / p o p u p s / S u g g e s t i o n s P o p u p . h
s r c / p o p u p s / R e p l y P o p u p . h
s r c / p o p u p s / P o p u p I t e m . h
s r c / p o p u p s / U s e r M e n t i o n s . h
s r c / T e x t I n p u t W i d g e t . h
s r c / T o p R o o m B a r . h
s r c / T r a y I c o n . h
s r c / U s e r I n f o W i d g e t . h
s r c / U s e r S e t t i n g s P a g e . h
s r c / W e l c o m e P a g e . h
)
# D i a l o g s
s r c / d i a l o g s / C r e a t e R o o m . h
s r c / d i a l o g s / I m a g e O v e r l a y . h
s r c / d i a l o g s / P r e v i e w U p l o a d O v e r l a y . h
s r c / d i a l o g s / I n v i t e U s e r s . h
s r c / d i a l o g s / J o i n R o o m . h
s r c / d i a l o g s / M e m b e r L i s t . h
s r c / d i a l o g s / L e a v e R o o m . h
s r c / d i a l o g s / L o g o u t . h
s r c / d i a l o g s / U s e r P r o f i l e . h
s r c / d i a l o g s / R a w M e s s a g e . h
s r c / d i a l o g s / R e a d R e c e i p t s . h
s r c / d i a l o g s / R e C a p t c h a . h
s r c / d i a l o g s / R o o m S e t t i n g s . h
# E m o j i
s r c / e m o j i / C a t e g o r y . h
s r c / e m o j i / I t e m D e l e g a t e . h
s r c / e m o j i / P a n e l . h
s r c / e m o j i / P i c k B u t t o n . h
# T i m e l i n e
s r c / t i m e l i n e / T i m e l i n e V i e w M a n a g e r . h
s r c / t i m e l i n e / T i m e l i n e M o d e l . h
s r c / t i m e l i n e / D e l e g a t e C h o o s e r . h
# U I c o m p o n e n t s
s r c / u i / A v a t a r . h
s r c / u i / B a d g e . h
s r c / u i / L o a d i n g I n d i c a t o r . h
s r c / u i / I n f o M e s s a g e . h
s r c / u i / F l a t B u t t o n . h
s r c / u i / L a b e l . h
s r c / u i / F l o a t i n g B u t t o n . h
s r c / u i / M e n u . h
s r c / u i / O v e r l a y W i d g e t . h
s r c / u i / S n a c k B a r . h
s r c / u i / R a i s e d B u t t o n . h
s r c / u i / R i p p l e . h
s r c / u i / R i p p l e O v e r l a y . h
s r c / u i / T e x t F i e l d . h
s r c / u i / T e x t L a b e l . h
s r c / u i / T o g g l e B u t t o n . h
s r c / u i / T h e m e . h
s r c / u i / T h e m e M a n a g e r . h
s r c / n o t i f i c a t i o n s / M a n a g e r . h
s r c / A v a t a r P r o v i d e r . h
s r c / C a c h e _ p . h
s r c / C h a t P a g e . h
s r c / C o m m u n i t i e s L i s t I t e m . h
s r c / C o m m u n i t i e s L i s t . h
s r c / L o g i n P a g e . h
s r c / M a i n W i n d o w . h
s r c / M x c I m a g e P r o v i d e r . h
s r c / I n v i t e e I t e m . h
s r c / Q u i c k S w i t c h e r . h
s r c / R e g i s t e r P a g e . h
s r c / R o o m I n f o L i s t I t e m . h
s r c / R o o m L i s t . h
s r c / S i d e B a r A c t i o n s . h
s r c / S p l i t t e r . h
s r c / p o p u p s / S u g g e s t i o n s P o p u p . h
s r c / p o p u p s / R e p l y P o p u p . h
s r c / p o p u p s / P o p u p I t e m . h
s r c / p o p u p s / U s e r M e n t i o n s . h
s r c / T e x t I n p u t W i d g e t . h
s r c / T o p R o o m B a r . h
s r c / T r a y I c o n . h
s r c / U s e r I n f o W i d g e t . h
s r c / U s e r S e t t i n g s P a g e . h
s r c / W e l c o m e P a g e . h
)
#
# B u n d l e t r a n s l a t i o n s .
@ -389,96 +503,106 @@ qt5_wrap_cpp(MOC_HEADERS
include ( Translations )
set ( TRANSLATION_DEPS ${ LANG_QRC } ${ QRC } ${ QM_SRC } )
set ( COMMON_LIBS
M a t r i x C l i e n t : : M a t r i x C l i e n t
$ { B o o s t _ L I B R A R I E S }
c m a r k : : c m a r k
Q t 5 : : W i d g e t s
Q t 5 : : S v g
Q t 5 : : C o n c u r r e n t
Q t 5 : : M u l t i m e d i a
Q t 5 : : Q m l
Q t 5 : : Q u i c k C o n t r o l s 2
Q t 5 : : Q u i c k W i d g e t s
n l o h m a n n _ j s o n : : n l o h m a n n _ j s o n
s p d l o g : : s p d l o g )
if ( APPVEYOR_BUILD )
set ( NHEKO_LIBS ${ COMMON_LIBS } lmdb )
else ( )
set ( NHEKO_LIBS ${ COMMON_LIBS } ${ LMDB_LIBRARY } )
endif ( )
if ( APPLE )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Foundation -framework Cocoa" )
set ( SRC_FILES ${ SRC_FILES } src/notifications/ManagerMac.mm src/emoji/MacHelper.mm )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework Foundation -framework Cocoa" )
set ( SRC_FILES ${ SRC_FILES } src/notifications/ManagerMac.mm src/emoji/MacHelper.mm )
elseif ( WIN32 )
file ( DOWNLOAD
" h t t p s : / / r a w . g i t h u b u s e r c o n t e n t . c o m / m o h a b o u j e / W i n T o a s t / 4 1 e d 1 c 5 8 d 5 d c e 0 e e 9 c 0 1 d b d e a c 0 5 b e 4 5 3 5 8 d 4 f 5 7 / s r c / w i n t o a s t l i b . c p p "
$ { P R O J E C T _ S O U R C E _ D I R } / s r c / w i n t o a s t l i b . c p p
E X P E C T E D _ H A S H S H A 2 5 6 = 1 A 1 A 7 C E 4 1 C 1 0 5 2 B 1 2 9 4 6 7 9 8 F 4 A 6 C 6 7 C E 1 F A D 2 0 9 C 9 6 7 F 5 E D 4 D 7 2 0 B 1 7 3 5 2 7 E 2 0 7 3 )
file ( DOWNLOAD
" h t t p s : / / r a w . g i t h u b u s e r c o n t e n t . c o m / m o h a b o u j e / W i n T o a s t / 4 1 e d 1 c 5 8 d 5 d c e 0 e e 9 c 0 1 d b d e a c 0 5 b e 4 5 3 5 8 d 4 f 5 7 / s r c / w i n t o a s t l i b . c p p "
$ { P R O J E C T _ S O U R C E _ D I R } / s r c / w i n t o a s t l i b . c p p
E X P E C T E D _ H A S H S H A 2 5 6 = 1 A 1 A 7 C E 4 1 C 1 0 5 2 B 1 2 9 4 6 7 9 8 F 4 A 6 C 6 7 C E 1 F A D 2 0 9 C 9 6 7 F 5 E D 4 D 7 2 0 B 1 7 3 5 2 7 E 2 0 7 3 )
file ( DOWNLOAD
" h t t p s : / / r a w . g i t h u b u s e r c o n t e n t . c o m / m o h a b o u j e / W i n T o a s t / 4 1 e d 1 c 5 8 d 5 d c e 0 e e 9 c 0 1 d b d e a c 0 5 b e 4 5 3 5 8 d 4 f 5 7 / s r c / w i n t o a s t l i b . h "
$ { P R O J E C T _ S O U R C E _ D I R } / s r c / w i n t o a s t l i b . h
E X P E C T E D _ H A S H S H A 2 5 6 = b 4 4 8 1 0 2 3 c 5 7 8 2 7 3 3 7 9 5 8 3 8 b e 2 2 b f 1 a 7 5 f 4 5 d 8 7 4 5 8 c d 4 d 9 a 5 a 7 5 f 6 6 4 a 1 4 6 e e a 1 1 )
file ( DOWNLOAD
" h t t p s : / / r a w . g i t h u b u s e r c o n t e n t . c o m / m o h a b o u j e / W i n T o a s t / 4 1 e d 1 c 5 8 d 5 d c e 0 e e 9 c 0 1 d b d e a c 0 5 b e 4 5 3 5 8 d 4 f 5 7 / s r c / w i n t o a s t l i b . h "
$ { P R O J E C T _ S O U R C E _ D I R } / s r c / w i n t o a s t l i b . h
E X P E C T E D _ H A S H S H A 2 5 6 = b 4 4 8 1 0 2 3 c 5 7 8 2 7 3 3 7 9 5 8 3 8 b e 2 2 b f 1 a 7 5 f 4 5 d 8 7 4 5 8 c d 4 d 9 a 5 a 7 5 f 6 6 4 a 1 4 6 e e a 1 1 )
set ( SRC_FILES ${ SRC_FILES } src/notifications/ManagerWin.cpp src/wintoastlib.cpp )
set ( SRC_FILES ${ SRC_FILES } src/notifications/ManagerWin.cpp src/wintoastlib.cpp )
else ( )
set ( SRC_FILES ${ SRC_FILES } src/notifications/ManagerLinux.cpp )
set ( SRC_FILES ${ SRC_FILES } src/notifications/ManagerLinux.cpp )
endif ( )
set ( NHEKO_DEPS
$ { S R C _ F I L E S }
$ { U I _ H E A D E R S }
$ { M O C _ H E A D E R S }
$ { T R A N S L A T I O N _ D E P S }
$ { M E T A _ F I L E S _ T O _ I N C L U D E } )
$ { S R C _ F I L E S }
$ { U I _ H E A D E R S }
$ { M O C _ H E A D E R S }
$ { T R A N S L A T I O N _ D E P S }
$ { M E T A _ F I L E S _ T O _ I N C L U D E } )
if ( ASAN )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined" )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address,undefined" )
endif ( )
add_executable ( nheko ${ OS_BUNDLE } ${ NHEKO_DEPS } )
if ( APPLE )
add_executable ( nheko ${ OS_BUNDLE } ${ NHEKO_DEPS } )
target_link_libraries ( nheko ${ NHEKO_LIBS } Qt5::MacExtras )
target_link_libraries ( nheko PRIVATE Qt5::MacExtras )
elseif ( WIN32 )
add_executable ( nheko ${ OS_BUNDLE } ${ ICON_FILE } ${ NHEKO_DEPS } )
target_compile_definitions ( nheko PRIVATE WIN32_LEAN_AND_MEAN )
target_link_libraries ( nheko ${ NTDLIB } ${ NHEKO_LIBS } Qt5::WinMain )
target_compile_definitions ( nheko PRIVATE WIN32_LEAN_AND_MEAN )
target_link_libraries ( nheko PRIVATE ${ NTDLIB } Qt5::WinMain )
else ( )
add_executable ( nheko ${ OS_BUNDLE } ${ NHEKO_DEPS } )
target_link_libraries ( nheko ${ NHEKO_LIBS } Qt5::DBus )
target_link_libraries ( nheko PRIVATE Qt5::DBus )
endif ( )
target_include_directories ( nheko PRIVATE src includes )
target_link_libraries ( nheko PRIVATE
M a t r i x C l i e n t : : M a t r i x C l i e n t
B o o s t : : i o s t r e a m s
B o o s t : : s y s t e m
B o o s t : : t h r e a d
c m a r k : : c m a r k
s p d l o g : : s p d l o g
Q t 5 : : W i d g e t s
Q t 5 : : S v g
Q t 5 : : C o n c u r r e n t
Q t 5 : : M u l t i m e d i a
Q t 5 : : Q m l
Q t 5 : : Q u i c k C o n t r o l s 2
Q t 5 : : Q u i c k W i d g e t s
n l o h m a n n _ j s o n : : n l o h m a n n _ j s o n
l m d b x x : : l m d b x x
t w e e n y )
if ( USE_BUNDLED_LMDB )
target_link_libraries ( nheko PRIVATE liblmdb::lmdb )
if ( MSVC )
target_link_libraries ( nheko PRIVATE ntdll )
endif ( )
else ( )
target_link_libraries ( nheko PRIVATE PkgConfig::lmdb )
endif ( )
if ( QML_DEBUGGING )
target_compile_definitions ( nheko PRIVATE QML_DEBUGGING )
endif ( )
if ( EXTERNAL_PROJECT_DEPS )
add_dependencies ( nheko ${ EXTERNAL_PROJECT_DEPS } )
if ( NOT MSVC )
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR CI_BUILD )
target_compile_options ( nheko PRIVATE "-Werror" )
endif ( )
endif ( )
set_target_properties ( nheko PROPERTIES SKIP_BUILD_RPATH TRUE )
if ( UNIX AND NOT APPLE )
install ( TARGETS nheko RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" )
install ( FILES "resources/nheko-16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" )
install ( FILES "resources/nheko.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" )
if ( NOT TARGET uninstall )
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c m a k e / c m a k e _ u n i n s t a l l . c m a k e . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c m a k e _ u n i n s t a l l . c m a k e "
I M M E D I A T E @ O N L Y )
add_custom_target ( uninstall
C O M M A N D $ { C M A K E _ C O M M A N D } - P $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c m a k e _ u n i n s t a l l . c m a k e )
endif ( )
install ( TARGETS nheko RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" )
install ( FILES "resources/nheko-16.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/16x16/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-32.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/32x32/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-48.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/48x48/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-64.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/64x64/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-128.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/128x128/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-256.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/256x256/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko-512.png" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/512x512/apps" RENAME "nheko.png" )
install ( FILES "resources/nheko.desktop" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/applications" )
install ( FILES "resources/nheko.appdata.xml" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/metainfo" )
if ( NOT TARGET uninstall )
configure_file (
" $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / c m a k e / c m a k e _ u n i n s t a l l . c m a k e . i n "
" $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c m a k e _ u n i n s t a l l . c m a k e "
I M M E D I A T E @ O N L Y )
add_custom_target ( uninstall
C O M M A N D $ { C M A K E _ C O M M A N D } - P $ { C M A K E _ C U R R E N T _ B I N A R Y _ D I R } / c m a k e _ u n i n s t a l l . c m a k e )
endif ( )
endif ( )