Introduce extra lib with ui to share with tests
This commit is contained in:
parent
70f4601aa9
commit
8a9cbce1cc
2 changed files with 22 additions and 19 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
set(PGLAB_SOURCES
|
set(PGLAB_SOURCES
|
||||||
main.cpp
|
|
||||||
About.cpp
|
About.cpp
|
||||||
catalog/delegates/IconColumnDelegate.cpp
|
catalog/delegates/IconColumnDelegate.cpp
|
||||||
catalog/models/BaseTableModel.cpp
|
catalog/models/BaseTableModel.cpp
|
||||||
|
|
@ -85,18 +84,16 @@ set(PGLAB_FORMS
|
||||||
CodeGenerator.ui
|
CodeGenerator.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(pglab
|
add_library(pglabapp STATIC
|
||||||
${PGLAB_SOURCES}
|
${PGLAB_SOURCES}
|
||||||
${PGLAB_FORMS}
|
${PGLAB_FORMS}
|
||||||
resources.qrc
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_target_properties(pglab PROPERTIES WIN32_EXECUTABLE ON)
|
target_link_libraries(pglabapp PUBLIC ws2_32)
|
||||||
target_link_libraries(pglab PRIVATE ws2_32)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(pglab PRIVATE
|
target_link_libraries(pglabapp PUBLIC
|
||||||
pglablib
|
pglablib
|
||||||
pgsql
|
pgsql
|
||||||
core
|
core
|
||||||
|
|
@ -107,10 +104,27 @@ target_link_libraries(pglab PRIVATE
|
||||||
Qt6::Concurrent
|
Qt6::Concurrent
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(pglab PRIVATE
|
target_include_directories(pglabapp PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/crud
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_target_properties(pglabapp PROPERTIES
|
||||||
|
CXX_STANDARD 20
|
||||||
|
CXX_STANDARD_REQUIRED ON
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(pglab
|
||||||
|
main.cpp
|
||||||
|
resources.qrc
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set_target_properties(pglab PROPERTIES WIN32_EXECUTABLE ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(pglab PRIVATE pglabapp)
|
||||||
|
|
||||||
set_target_properties(pglab PROPERTIES
|
set_target_properties(pglab PROPERTIES
|
||||||
CXX_STANDARD 20
|
CXX_STANDARD 20
|
||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
|
|
|
||||||
|
|
@ -6,22 +6,11 @@ add_executable(IntegrationTests
|
||||||
tst_DataGridMapping.cpp
|
tst_DataGridMapping.cpp
|
||||||
tst_DataGridUpdate.cpp
|
tst_DataGridUpdate.cpp
|
||||||
tst_CrudModelBehavior.cpp
|
tst_CrudModelBehavior.cpp
|
||||||
${CMAKE_SOURCE_DIR}/pglab/crud/CrudModel.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab/crud/DataGridWidget.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab/crud/RecordPanel.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab/OpenDatabase.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab/util/PgLabItemDelegate.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab/util/Colors.cpp
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab/ResultTableModelUtil.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(IntegrationTests PRIVATE
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab
|
|
||||||
${CMAKE_SOURCE_DIR}/pglab/crud
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(IntegrationTests PRIVATE
|
target_link_libraries(IntegrationTests PRIVATE
|
||||||
pgintegration
|
pgintegration
|
||||||
|
pglabapp
|
||||||
pglablib
|
pglablib
|
||||||
GTest::gtest
|
GTest::gtest
|
||||||
Qt6::Core
|
Qt6::Core
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue