refactoring...
This commit is contained in:
@@ -1 +1,2 @@
|
||||
add_directories_with_include("qad_")
|
||||
list(APPEND QT_MULTILIB_LIST cd_qt)
|
||||
shstk_add_directories_with_include(FALSE "cd_")
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(cd_utils)
|
||||
find_package(MinGW REQUIRED)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PIP_INCLUDES})
|
||||
file(GLOB CPPS_UTILS "cdutils_*.cpp")
|
||||
file(GLOB HDRS_UTILS "cdutils_*.h")
|
||||
add_library(${PROJECT_NAME} SHARED ${CPPS_UTILS} ${HDRS_UTILS})
|
||||
target_link_libraries(${PROJECT_NAME} ${PIP_LIBRARY})
|
||||
generate_export_header(${PROJECT_NAME})
|
||||
list(APPEND HDRS_UTILS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
|
||||
|
||||
add_executable(cdutilstest "cdutilstest.cpp" "cdtest.h")
|
||||
target_link_libraries(cdutilstest ${PIP_LIBRARY} ${PROJECT_NAME})
|
||||
message(STATUS "Building ${PROJECT_NAME}")
|
||||
|
||||
if(LIB)
|
||||
list(APPEND _ALL_TARGETS ${PROJECT_NAME})
|
||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||
if(WIN32)
|
||||
install(FILES ${HDRS_UTILS} DESTINATION ${MINGW_INCLUDE})
|
||||
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${MINGW_LIB})
|
||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${MINGW_BIN})
|
||||
else()
|
||||
install(FILES ${HDRS_UTILS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
endif()
|
||||
#message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||
else()
|
||||
if(WIN32)
|
||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
||||
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib)
|
||||
else()
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
||||
endif()
|
||||
install(FILES ${HDRS_UTILS} DESTINATION include)
|
||||
#message(STATUS "Install ${PROJECT_NAME} to local \"bin\"")
|
||||
endif()
|
||||
19
libs/core/CMakeLists.txt
Normal file
19
libs/core/CMakeLists.txt
Normal file
@@ -0,0 +1,19 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(cd_core)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${PIP_INCLUDES})
|
||||
file(GLOB CPPS "cdutils_*.cpp")
|
||||
file(GLOB HDRS "cdutils_*.h")
|
||||
|
||||
import_version(${PROJECT_NAME} cd)
|
||||
set_deploy_property(${PROJECT_NAME} ${cd_LIB_TYPE}
|
||||
LABEL "Core CD library"
|
||||
FULLNAME "${cd_DOMAIN}.${PROJECT_NAME}"
|
||||
COMPANY "${cd_COMPANY}"
|
||||
INFO "Control & Debug library")
|
||||
make_rc(${PROJECT_NAME} _RC)
|
||||
add_library(${PROJECT_NAME} ${cd_LIB_TYPE} ${CPPS} ${HDRS} ${_RC})
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(${PROJECT_NAME} PIP)
|
||||
generate_export_header(${PROJECT_NAME})
|
||||
list(APPEND HDRS "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_export.h")
|
||||
shstk_install("qad" FALSE ${PROJECT_NAME} "${HDRS}")
|
||||
@@ -21,13 +21,13 @@
|
||||
#define CDUTILS_C_H
|
||||
|
||||
#include "cdutils_interface.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT CInterface: public Interface
|
||||
class CD_CORE_EXPORT CInterface: public Interface
|
||||
{
|
||||
PIOBJECT_SUBCLASS(CInterface, Interface)
|
||||
public:
|
||||
@@ -41,6 +41,6 @@ public:
|
||||
|
||||
}
|
||||
|
||||
extern CD_UTILS_EXPORT CDUtils::CInterface C;
|
||||
extern CD_CORE_EXPORT CDUtils::CInterface C;
|
||||
|
||||
#endif // CDUTILS_C_H
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "cdutils_protocol.h"
|
||||
#include "piconnection.h"
|
||||
#include "pidatatransfer.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
@@ -32,7 +32,7 @@ namespace CDUtils {
|
||||
class CDCore;
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT __Core_Initializer__ {
|
||||
class CD_CORE_EXPORT __Core_Initializer__ {
|
||||
public:
|
||||
__Core_Initializer__();
|
||||
~__Core_Initializer__();
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT CDCore: public PIObject
|
||||
class CD_CORE_EXPORT CDCore: public PIObject
|
||||
{
|
||||
PIOBJECT(CDUtils::CDCore)
|
||||
friend class __Core_Initializer__;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "cdutils_types.h"
|
||||
#include "piobject.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
@@ -30,7 +30,7 @@ namespace CDUtils {
|
||||
class CDCore;
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT Interface: public PIObject
|
||||
class CD_CORE_EXPORT Interface: public PIObject
|
||||
{
|
||||
PIOBJECT(CDUtils::Interface)
|
||||
public:
|
||||
@@ -21,13 +21,13 @@
|
||||
#define CDUTILS_K_H
|
||||
|
||||
#include "cdutils_interface.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT KInterface: public Interface
|
||||
class CD_CORE_EXPORT KInterface: public Interface
|
||||
{
|
||||
PIOBJECT_SUBCLASS(KInterface, Interface)
|
||||
public:
|
||||
@@ -42,6 +42,6 @@ public:
|
||||
|
||||
}
|
||||
|
||||
extern CD_UTILS_EXPORT CDUtils::KInterface K;
|
||||
extern CD_CORE_EXPORT CDUtils::KInterface K;
|
||||
|
||||
#endif // CDUTILS_K_H
|
||||
@@ -21,13 +21,13 @@
|
||||
#define CDUTILS_M_H
|
||||
|
||||
#include "cdutils_interface.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT MInterface: public Interface
|
||||
class CD_CORE_EXPORT MInterface: public Interface
|
||||
{
|
||||
PIOBJECT_SUBCLASS(MInterface, Interface)
|
||||
public:
|
||||
@@ -51,6 +51,6 @@ private:
|
||||
|
||||
}
|
||||
|
||||
extern CD_UTILS_EXPORT CDUtils::MInterface M;
|
||||
extern CD_CORE_EXPORT CDUtils::MInterface M;
|
||||
|
||||
#endif // CDUTILS_M_H
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef CDUTILS_PARSER_H
|
||||
#define CDUTILS_PARSER_H
|
||||
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
class PIIODevice;
|
||||
|
||||
@@ -30,7 +30,7 @@ class CDSection;
|
||||
|
||||
namespace CDParser {
|
||||
|
||||
CD_UTILS_EXPORT CDSection parse(PIIODevice * d, int cdsection_type);
|
||||
CD_CORE_EXPORT CDSection parse(PIIODevice * d, int cdsection_type);
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#define CDUTILS_PROTOCOL_H
|
||||
|
||||
#include "pistring.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
@@ -49,12 +49,12 @@ namespace CDUtils {
|
||||
|
||||
# pragma pack(push,1)
|
||||
|
||||
struct CD_UTILS_EXPORT PacketHeader {
|
||||
struct CD_CORE_EXPORT PacketHeader {
|
||||
int type; // CDPacketType
|
||||
int session_id;
|
||||
};
|
||||
|
||||
struct CD_UTILS_EXPORT PacketKDirectChange {
|
||||
struct CD_CORE_EXPORT PacketKDirectChange {
|
||||
PIDeque<int> path;
|
||||
PIString value;
|
||||
};
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "pistring.h"
|
||||
#include "pimap.h"
|
||||
#include "pivariant.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
class PIIODevice;
|
||||
class PIEvaluator;
|
||||
@@ -48,7 +48,7 @@ enum MessageType {
|
||||
|
||||
typedef PIFlags<UpdateMode> UpdateModeFlags;
|
||||
|
||||
class CD_UTILS_EXPORT CDType {
|
||||
class CD_CORE_EXPORT CDType {
|
||||
friend class CDSection;
|
||||
friend class CDCore;
|
||||
friend class Interface;
|
||||
@@ -113,7 +113,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT CDSection {
|
||||
class CD_CORE_EXPORT CDSection {
|
||||
friend class CDCore;
|
||||
friend class Interface;
|
||||
friend class XInterface;
|
||||
@@ -21,13 +21,13 @@
|
||||
#define CDUTILS_X_H
|
||||
|
||||
#include "cdutils_interface.h"
|
||||
#include "cd_utils_export.h"
|
||||
#include "cd_core_export.h"
|
||||
|
||||
|
||||
namespace CDUtils {
|
||||
|
||||
|
||||
class CD_UTILS_EXPORT XInterface: public Interface
|
||||
class CD_CORE_EXPORT XInterface: public Interface
|
||||
{
|
||||
PIOBJECT_SUBCLASS(XInterface, Interface)
|
||||
public:
|
||||
@@ -52,6 +52,6 @@ public:
|
||||
|
||||
}
|
||||
|
||||
extern CD_UTILS_EXPORT CDUtils::XInterface X;
|
||||
extern CD_CORE_EXPORT CDUtils::XInterface X;
|
||||
|
||||
#endif // CDUTILS_X_H
|
||||
@@ -1 +0,0 @@
|
||||
piqt_library(qcd_utils "Gui" "pip;qad_utils;qad_widgets;qad_graphic;cd_utils;piqt")
|
||||
1
libs/qt/CMakeLists.txt
Normal file
1
libs/qt/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
cd_library(qt "Gui;Widgets" "cd_core;QAD::PIQt;QAD::Graphic")
|
||||
@@ -25,13 +25,13 @@
|
||||
#include <QVariant>
|
||||
#include "piobject.h"
|
||||
#include "cdutils_types.h"
|
||||
#include "qcd_utils_export.h"
|
||||
#include "cd_qt_export.h"
|
||||
|
||||
|
||||
class QCDCore;
|
||||
|
||||
|
||||
class QCD_UTILS_EXPORT __QCore_Initializer__ {
|
||||
class CD_QT_EXPORT __QCore_Initializer__ {
|
||||
public:
|
||||
__QCore_Initializer__();
|
||||
~__QCore_Initializer__();
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class QCD_UTILS_EXPORT QCDCore: public QObject, public PIObject
|
||||
class CD_QT_EXPORT QCDCore: public QObject, public PIObject
|
||||
{
|
||||
Q_OBJECT
|
||||
PIOBJECT(QCDCore)
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <QWidget>
|
||||
#include <evalspinbox.h>
|
||||
#include <pistring.h>
|
||||
#include "qcd_utils_export.h"
|
||||
#include "cd_qt_export.h"
|
||||
|
||||
namespace CDUtils {
|
||||
class CDType;
|
||||
@@ -38,7 +38,7 @@ class Graphic;
|
||||
class Graphic;
|
||||
|
||||
|
||||
class QCD_UTILS_EXPORT CDGraphicWidget: public QWidget {
|
||||
class CD_QT_EXPORT CDGraphicWidget: public QWidget {
|
||||
Q_OBJECT
|
||||
friend class CDGraphics;
|
||||
friend class GDockWidget;
|
||||
@@ -22,13 +22,13 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include <cdutils_types.h>
|
||||
#include "qcd_utils_export.h"
|
||||
#include "cd_qt_export.h"
|
||||
|
||||
namespace Ui {
|
||||
class QCDModeDialog;
|
||||
}
|
||||
|
||||
class QCD_UTILS_EXPORT QCDModeDialog: public QDialog
|
||||
class CD_QT_EXPORT QCDModeDialog: public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <QItemDelegate>
|
||||
#include <QStyledItemDelegate>
|
||||
#include "pistring.h"
|
||||
#include "qcd_utils_export.h"
|
||||
#include "cd_qt_export.h"
|
||||
|
||||
namespace CDUtils {
|
||||
class CDType;
|
||||
@@ -51,7 +51,7 @@ namespace QAD {
|
||||
class CDItemModel;
|
||||
|
||||
|
||||
class QCD_UTILS_EXPORT CDItem {
|
||||
class CD_QT_EXPORT CDItem {
|
||||
friend class CDItemModel;
|
||||
friend class CDView;
|
||||
public:
|
||||
@@ -79,7 +79,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class QCD_UTILS_EXPORT CDDelegate : public QStyledItemDelegate
|
||||
class CD_QT_EXPORT CDDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class QCD_UTILS_EXPORT CDItemModel : public QAbstractItemModel {
|
||||
class CD_QT_EXPORT CDItemModel : public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
friend class CDView;
|
||||
public:
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <QTreeView>
|
||||
#include "piobject.h"
|
||||
#include "qcd_utils_export.h"
|
||||
#include "cd_qt_export.h"
|
||||
|
||||
namespace CDUtils {
|
||||
class CDType;
|
||||
@@ -32,7 +32,7 @@ namespace CDUtils {
|
||||
class CDItemModel;
|
||||
class QSortFilterProxyModel;
|
||||
|
||||
class QCD_UTILS_EXPORT CDView: public QTreeView, public PIObject
|
||||
class CD_QT_EXPORT CDView: public QTreeView, public PIObject
|
||||
{
|
||||
Q_OBJECT
|
||||
PIOBJECT(CDView)
|
||||
Reference in New Issue
Block a user