Switch to cmake + vcpkg, builds on linux, windows needs verification.
Code has been modified to be portable.
This commit is contained in:
parent
c1a5ac1aad
commit
49f6619a4e
34 changed files with 678 additions and 327 deletions
|
|
@ -1,69 +1,115 @@
|
|||
cmake_minimum_required(VERSION 3.2)
|
||||
project(pglab)
|
||||
set(PGLAB_SOURCES
|
||||
main.cpp
|
||||
About.cpp
|
||||
catalog/delegates/IconColumnDelegate.cpp
|
||||
catalog/models/BaseTableModel.cpp
|
||||
catalog/models/ColumnTableModel.cpp
|
||||
catalog/models/ConstraintModel.cpp
|
||||
catalog/models/DatabasesTableModel.cpp
|
||||
catalog/models/DependantsTableModel.cpp
|
||||
catalog/models/IndexModel.cpp
|
||||
catalog/models/ProcTableModel.cpp
|
||||
catalog/models/RolesTableModel.cpp
|
||||
catalog/models/SequenceModel.cpp
|
||||
catalog/models/TriggerTableModel.cpp
|
||||
catalog/tables/TablesTableModel.cpp
|
||||
catalog/widgets/CatalogConstraintPage.cpp
|
||||
catalog/widgets/CatalogFunctionsPage.cpp
|
||||
catalog/widgets/CatalogIndexPage.cpp
|
||||
catalog/widgets/CatalogInspector.cpp
|
||||
catalog/widgets/CatalogNamespacePage.cpp
|
||||
catalog/widgets/CatalogPageBase.cpp
|
||||
catalog/widgets/CatalogSequencesPage.cpp
|
||||
catalog/widgets/CatalogTablesPage.cpp
|
||||
catalog/widgets/CatalogTypesPage.cpp
|
||||
catalog/widgets/ColumnPage.cpp
|
||||
catalog/widgets/DependantsPage.cpp
|
||||
catalog/widgets/TriggerPage.cpp
|
||||
codeeditor/CodeEditor.cpp
|
||||
codeeditor/EditorGutter.cpp
|
||||
codeeditor/GutterPainter.cpp
|
||||
crud/CrudModel.cpp
|
||||
crud/CrudTab.cpp
|
||||
querytool/QueryExplainModel.cpp
|
||||
querytool/QueryParamListController.cpp
|
||||
querytool/QueryResultModel.cpp
|
||||
querytool/QueryTool.cpp
|
||||
serverinspector/DatabasesPage.cpp
|
||||
serverinspector/RolesPage.cpp
|
||||
serverinspector/ServerInspector.cpp
|
||||
util/Colors.cpp
|
||||
util/PgLabItemDelegate.cpp
|
||||
util/PgLabTableView.cpp
|
||||
util/SqlSyntaxHighlighter.cpp
|
||||
ConnectionConfigurationWidget.cpp
|
||||
ConnectionController.cpp
|
||||
ManagedPage.cpp
|
||||
PgDumpOutputHighlighter.cpp
|
||||
CreateDatabaseDialog.cpp
|
||||
ConnectionManagerWindow.cpp
|
||||
ConnectionListModel.cpp
|
||||
SslModeModel.cpp
|
||||
stopwatch.cpp
|
||||
tuplesresultwidget.cpp
|
||||
BackupDialog.cpp
|
||||
MasterController.cpp
|
||||
ParamTypeDelegate.cpp
|
||||
OpenDatabase.cpp
|
||||
ProcessStdioWidget.cpp
|
||||
ResultTableModelUtil.cpp
|
||||
NamespaceItemModel.cpp
|
||||
PropertyProxyModel.cpp
|
||||
CodeGenerator.cpp
|
||||
UserConfiguration.cpp
|
||||
widgets/SqlCodePreview.cpp
|
||||
CustomFilterSortModel.cpp
|
||||
PropertiesPage.cpp
|
||||
PasswordPromptDialog.cpp
|
||||
EditTableWidget.cpp
|
||||
EditColumnTableModel.cpp
|
||||
DatabaseWindow.cpp
|
||||
widgets/SingleRecordModel.cpp
|
||||
widgets/SingleRecordWidget.cpp
|
||||
)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(PGLAB_FORMS
|
||||
ConnectionManagerWindow.ui
|
||||
CreateDatabaseDialog.ui
|
||||
DatabaseWindow.ui
|
||||
tuplesresultwidget.ui
|
||||
querytool/QueryTab.ui
|
||||
ProcessStdioWidget.ui
|
||||
crud/CrudTab.ui
|
||||
CodeGenerator.ui
|
||||
widgets/SingleRecordWidget.ui
|
||||
)
|
||||
|
||||
add_executable(pglab
|
||||
ASyncDBConnection.cpp
|
||||
ASyncWindow.cpp
|
||||
BackupDialog.cpp
|
||||
BackupRestore.cpp
|
||||
CodeBuilderConfiguration.cpp
|
||||
ConnectionConfig.cpp
|
||||
ConnectionList.cpp
|
||||
ConnectionListModel.cpp
|
||||
ConnectionManagerWindow.cpp
|
||||
DatabaseInspectorWidget.cpp
|
||||
DatabasesTableModel.cpp
|
||||
DatabaseWindow.cpp
|
||||
ExplainTreeModelItem.cpp
|
||||
GlobalIoService.cpp
|
||||
jsoncpp.cpp
|
||||
main.cpp
|
||||
MainWindow.cpp
|
||||
MasterController.cpp
|
||||
OpenDatabase.cpp
|
||||
ParamListModel.cpp
|
||||
ParamTypeDelegate.cpp
|
||||
PgAuthIdContainer.cpp
|
||||
PgAuthId.cpp
|
||||
PgClass.cpp
|
||||
PgDatabaseCatalogue.cpp
|
||||
PgDatabaseContainer.cpp
|
||||
PgDatabase.cpp
|
||||
PgNamespace.cpp
|
||||
PgTypeContainer.cpp
|
||||
PgType.cpp
|
||||
ProcessStdioWidget.cpp
|
||||
QueryExplainModel.cpp
|
||||
QueryResultModel.cpp
|
||||
QueryTab.cpp
|
||||
RolesTableModel.cpp
|
||||
ServerWindow.cpp
|
||||
SqlSyntaxHighlighter.cpp
|
||||
stopwatch.cpp
|
||||
tsqueue.cpp
|
||||
tuplesresultwidget.cpp
|
||||
TypeSelectionItemModel.cpp
|
||||
util.cpp
|
||||
${PGLAB_SOURCES}
|
||||
${PGLAB_FORMS}
|
||||
resources.qrc
|
||||
)
|
||||
|
||||
set_target_properties(pglab PROPERTIES
|
||||
CXX_STANDARD 14
|
||||
CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# target_compile_options(pglab PRIVATE -Wall -fpic -march=native )
|
||||
# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
|
||||
if(WIN32)
|
||||
set_target_properties(pglab PROPERTIES WIN32_EXECUTABLE ON)
|
||||
endif()
|
||||
|
||||
target_link_libraries( pglab
|
||||
core
|
||||
target_link_libraries(pglab PRIVATE
|
||||
pglablib
|
||||
pgsql
|
||||
boost-system
|
||||
Qt5::Widgets
|
||||
pthread
|
||||
core
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Widgets
|
||||
Qt6::Sql
|
||||
Qt6::Concurrent
|
||||
)
|
||||
|
||||
target_include_directories(pglab PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
set_target_properties(pglab PROPERTIES
|
||||
CXX_STANDARD 20
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue