mirror of
https://github.com/status-im/snorenotify.git
synced 2025-01-24 15:29:18 +00:00
cleanup cmake and use kde install dirs
This commit is contained in:
parent
1292423c73
commit
4bc9c4cecb
@ -54,17 +54,13 @@ endif(DOXYGEN_FOUND)
|
||||
|
||||
|
||||
|
||||
set(LIBSNORE_PLUGIN_PATH ${CMAKE_INSTALL_LIBDIR}/libsnore${SNORE_SUFFIX})
|
||||
set(LIBSNORE_FULL_PLUGIN_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/libsnore${SNORE_SUFFIX})
|
||||
set(LIBSNORE_PLUGIN_PATH ${KDE_INSTALL_PLUGINDIR}/libsnore${SNORE_SUFFIX})
|
||||
set(LIBSNORE_FULL_PLUGIN_PATH ${KDE_INSTALL_FULL_PLUGINDIR}/libsnore${SNORE_SUFFIX})
|
||||
|
||||
set(SNORE_PLUGIN_INSTALL_PATH LIBRARY DESTINATION ${LIBSNORE_PLUGIN_PATH})
|
||||
add_definitions(-DLIBSNORE_PLUGIN_PATH="${LIBSNORE_FULL_PLUGIN_PATH}" -DSNORE_SUFFIX="${SNORE_SUFFIX}")
|
||||
message(STATUS "Installing plugins to ${LIBSNORE_PLUGIN_PATH}")
|
||||
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
|
||||
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(share)
|
||||
|
@ -61,14 +61,11 @@ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
$<INSTALL_INTERFACE:include/snore/core>)
|
||||
|
||||
install(TARGETS libsnore EXPORT LibsnoreTarget
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
install(TARGETS libsnore EXPORT LibsnoreTarget ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
install(EXPORT LibsnoreTarget DESTINATION lib/cmake/libsnore${SNORE_CamelCase_SUFFIX} NAMESPACE Snore::)
|
||||
install(EXPORT LibsnoreTarget DESTINATION ${KDE_INSTALL_CMAKEPACKAGEDIR}/libsnore${SNORE_CamelCase_SUFFIX} NAMESPACE Snore::)
|
||||
|
||||
install(FILES ${SnoreNotify_HDR} DESTINATION include/snore/core)
|
||||
install(FILES ${SnoreNotify_HDR} DESTINATION ${KDE_INSTALL_INCLUDEDIR}/snore/core)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake DESTINATION lib/cmake/libsnore${SNORE_CamelCase_SUFFIX})
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Libsnore${SNORE_CamelCase_SUFFIX}Config.cmake DESTINATION ${KDE_INSTALL_CMAKEPACKAGEDIR}/libsnore${SNORE_CamelCase_SUFFIX})
|
||||
|
||||
|
@ -175,10 +175,8 @@ const QDir &PluginContainer::pluginDir()
|
||||
}
|
||||
#endif
|
||||
list << appDir
|
||||
<< QString("%1/libsnore" SNORE_SUFFIX).arg(appDir)
|
||||
<< QString("%1/../lib/libsnore" SNORE_SUFFIX).arg(appDir)
|
||||
<< QString("%1/../lib64/libsnore" SNORE_SUFFIX).arg(appDir)
|
||||
<< QLatin1String(LIBSNORE_PLUGIN_PATH);
|
||||
<< QLatin1String(LIBSNORE_PLUGIN_PATH)
|
||||
<< QString("%1/libsnore" SNORE_SUFFIX).arg(appDir);
|
||||
foreach(const QString & p, list) {
|
||||
path = QDir(p);
|
||||
|
||||
|
@ -5,9 +5,7 @@ if(WITH_SNORE_DAEMON)
|
||||
|
||||
add_executable( snorenotify WIN32 main.cpp snorenotify.cpp trayicon.cpp ${SNORENOTIFY_DEAMON_DEPS})
|
||||
target_link_libraries( snorenotify libsnore Qt5::Gui Qt5::Widgets )
|
||||
install(TARGETS snorenotify RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib)
|
||||
install(TARGETS snorenotify ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||
|
||||
if(UNIX)
|
||||
ecm_install_icons(ICONS ${PROJECT_SOURCE_DIR}/data/128-apps-snore.png DESTINATION ${KDE_INSTALL_ICONDIR})
|
||||
|
@ -1,6 +1,3 @@
|
||||
set(CMAKE_SHARED_MODULE_PREFIX)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/libsnore${SNORE_SUFFIX}")
|
||||
|
||||
add_subdirectory(backends)
|
||||
add_subdirectory(frontends)
|
||||
add_subdirectory(secondary_backends)
|
||||
|
Loading…
x
Reference in New Issue
Block a user