Fix build system issues
This commit is contained in:
parent
82fb9c8053
commit
0ffed79e30
|
@ -2,13 +2,14 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||||
|
|
||||||
# meta data
|
# meta data
|
||||||
set(META_PROJECT_NAME repoindex)
|
set(META_PROJECT_NAME repoindex)
|
||||||
|
set(META_APP_CATEGORIES "Utility;Network;")
|
||||||
set(META_APP_NAME "Repository Browser")
|
set(META_APP_NAME "Repository Browser")
|
||||||
set(META_APP_AUTHOR "Martchus")
|
set(META_APP_AUTHOR "Martchus")
|
||||||
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
|
||||||
set(META_APP_DESCRIPTION "Repository browser for Arch Linux")
|
set(META_APP_DESCRIPTION "Repository browser for Arch Linux")
|
||||||
set(META_VERSION_MAJOR 0)
|
set(META_VERSION_MAJOR 0)
|
||||||
set(META_VERSION_MINOR 2)
|
set(META_VERSION_MINOR 2)
|
||||||
set(META_VERSION_PATCH 5)
|
set(META_VERSION_PATCH 6)
|
||||||
|
|
||||||
project(${META_PROJECT_NAME})
|
project(${META_PROJECT_NAME})
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,11 @@ use_cpp_utilities()
|
||||||
find_package(qtutilities 5.0.0 REQUIRED)
|
find_package(qtutilities 5.0.0 REQUIRED)
|
||||||
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
list(APPEND CMAKE_MODULE_PATH ${QT_UTILITIES_MODULE_DIRS})
|
||||||
|
|
||||||
# need to link against the repoindex lib
|
# find repoindex
|
||||||
list(APPEND LIBRARIES lib${META_PROJECT_NAME})
|
find_package(librepoindex ${META_APP_VERSION} REQUIRED)
|
||||||
|
use_librepoindex()
|
||||||
|
|
||||||
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
||||||
|
|
||||||
# include modules to apply configuration
|
# include modules to apply configuration
|
||||||
include(BasicConfig)
|
include(BasicConfig)
|
||||||
|
|
|
@ -26,15 +26,16 @@ use_cpp_utilities()
|
||||||
find_package(qtutilities 5.0.0 REQUIRED)
|
find_package(qtutilities 5.0.0 REQUIRED)
|
||||||
use_qt_utilities()
|
use_qt_utilities()
|
||||||
|
|
||||||
|
# find repoindex
|
||||||
|
find_package(librepoindex ${META_APP_VERSION} REQUIRED)
|
||||||
|
use_librepoindex()
|
||||||
|
|
||||||
# add Qt modules which can currently not be detected automatically
|
# add Qt modules which can currently not be detected automatically
|
||||||
list(APPEND ADDITIONAL_QT_MODULES Network)
|
list(APPEND ADDITIONAL_QT_MODULES Network)
|
||||||
|
|
||||||
# suffix the target to avoid conflict with cli target
|
# suffix the target to avoid conflict with cli target
|
||||||
set(TARGET_SUFFIX "-gui")
|
set(TARGET_SUFFIX "-gui")
|
||||||
|
|
||||||
# need to link against the repoindex lib
|
|
||||||
list(APPEND LIBRARIES lib${META_PROJECT_NAME})
|
|
||||||
|
|
||||||
# include modules to apply configuration
|
# include modules to apply configuration
|
||||||
include(BasicConfig)
|
include(BasicConfig)
|
||||||
include(QtGuiConfig)
|
include(QtGuiConfig)
|
||||||
|
|
|
@ -44,9 +44,15 @@ set(SRC_FILES
|
||||||
network/networkaccessmanager.cpp
|
network/networkaccessmanager.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(META_PROJECT_NAME librepoindex)
|
||||||
|
set(META_PROJECT_TYPE library)
|
||||||
|
|
||||||
# add Qt/KF modules which can currently not be detected automatically
|
# add Qt/KF modules which can currently not be detected automatically
|
||||||
list(APPEND ADDITIONAL_QT_MODULES Concurrent Network WebSockets)
|
list(APPEND META_PUBLIC_QT_MODULES Network)
|
||||||
list(APPEND ADDITIONAL_KF_MODULES Archive)
|
list(APPEND META_PRIVATE_QT_MODULES Concurrent WebSockets)
|
||||||
|
list(APPEND META_PRIVATE_KF_MODULES Archive)
|
||||||
|
list(APPEND ADDITIONAL_QT_MODULES ${META_PUBLIC_QT_MODULES} ${META_PRIVATE_QT_MODULES})
|
||||||
|
list(APPEND ADDITIONAL_KF_MODULES ${META_PRIVATE_KF_MODULES})
|
||||||
|
|
||||||
# find c++utilities
|
# find c++utilities
|
||||||
find_package(c++utilities 4.0.0 REQUIRED)
|
find_package(c++utilities 4.0.0 REQUIRED)
|
||||||
|
@ -56,9 +62,6 @@ use_cpp_utilities()
|
||||||
find_package(qtutilities 5.0.0 REQUIRED)
|
find_package(qtutilities 5.0.0 REQUIRED)
|
||||||
use_qt_utilities()
|
use_qt_utilities()
|
||||||
|
|
||||||
# prefix the target to avoid conflict with cli target
|
|
||||||
set(TARGET_PREFIX "lib")
|
|
||||||
|
|
||||||
# include modules to apply configuration
|
# include modules to apply configuration
|
||||||
include(BasicConfig)
|
include(BasicConfig)
|
||||||
include(QtConfig)
|
include(QtConfig)
|
||||||
|
|
26
lib/global.h
26
lib/global.h
|
@ -1,17 +1,27 @@
|
||||||
// Created via CMake from template global.h.in
|
// Created via CMake from template global.h.in
|
||||||
// WARNING! Any changes to this file will be overwritten by the next CMake run!
|
// WARNING! Any changes to this file will be overwritten by the next CMake run!
|
||||||
|
|
||||||
#ifndef REPOINDEX_GLOBAL
|
#ifndef LIBREPOINDEX_GLOBAL
|
||||||
#define REPOINDEX_GLOBAL
|
#define LIBREPOINDEX_GLOBAL
|
||||||
|
|
||||||
#include <c++utilities/application/global.h>
|
#include <c++utilities/application/global.h>
|
||||||
|
|
||||||
#ifdef REPOINDEX_STATIC
|
#ifdef LIBREPOINDEX_STATIC
|
||||||
# define REPOINDEX_EXPORT
|
# define LIBREPOINDEX_EXPORT
|
||||||
# define REPOINDEX_IMPORT
|
# define LIBREPOINDEX_IMPORT
|
||||||
#else
|
#else
|
||||||
# define REPOINDEX_EXPORT LIB_EXPORT
|
# define LIBREPOINDEX_EXPORT LIB_EXPORT
|
||||||
# define REPOINDEX_IMPORT LIB_IMPORT
|
# define LIBREPOINDEX_IMPORT LIB_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // REPOINDEX_GLOBAL
|
/*!
|
||||||
|
* \def LIBREPOINDEX_EXPORT
|
||||||
|
* \brief Marks the symbol to be exported by the librepoindex library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \def LIBREPOINDEX_IMPORT
|
||||||
|
* \brief Marks the symbol to be imported from the librepoindex library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#endif // LIBREPOINDEX_GLOBAL
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
#define REPOINDEX_SERVER_H
|
#define REPOINDEX_SERVER_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QList>
|
|
||||||
#include <QHostAddress>
|
QT_FORWARD_DECLARE_CLASS(QWebSocketServer)
|
||||||
#include <QWebSocketServer>
|
|
||||||
|
|
||||||
namespace RepoIndex {
|
namespace RepoIndex {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue