Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split gui and core #6

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 97 additions & 91 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ else(SCIP_FOUND)
endif(SCIP_FOUND)
endif(EMBED_SCIP)

rock_library(graph_analysis
rock_library(graph_analysis-core
SOURCES
Attribute.cpp
AttributeManager.cpp
Expand Down Expand Up @@ -73,40 +73,6 @@ rock_library(graph_analysis
boost_graph/DirectedSubGraph.cpp
filters/EdgeContextFilter.cpp
filters/RegexFilters.cpp
gui/ActionCommander.cpp
gui/BaseGraphView/AddEdgeDialog.cpp
gui/BaseGraphView/AddVertexDialog.cpp
gui/BaseGraphView/BaseGraphView.cpp
gui/EdgeItemBase.cpp
gui/EdgeItemSimple.cpp
gui/EdgeItemTypeManager.cpp
gui/EdgeMimeData.cpp
gui/FilterItem.cpp
gui/FilterManager.cpp
gui/GraphAnalysisGui.cpp
gui/GraphLayout.cpp
gui/GraphLayoutManager.cpp
gui/GraphWidget.cpp
gui/GraphWidgetManager.cpp
gui/IconManager.cpp
gui/VertexItemTypeManager.cpp
gui/Player.cpp
gui/PlayerConfiguration.cpp
gui/QBaseGraph.cpp
gui/VertexItemBase.cpp
gui/VertexItemSimple.cpp
gui/WidgetManager.cpp
gui/dialogs/AddFilterDialog.cpp
gui/dialogs/AddGraphElement.cpp
gui/dialogs/CustomDialog.cpp
gui/dialogs/GridLayout.cpp
gui/dialogs/IODialog.cpp
gui/dialogs/RenameFilterDialog.cpp
gui/dialogs/SwapFiltersDialog.cpp
gui/items/Feature.cpp
gui/items/Label.cpp
gui/layouts/GVLayout.cpp
gui/layouts/GridLayout.cpp
io/GVGraph.cpp
io/GexfReader.cpp
io/GexfWriter.cpp
Expand Down Expand Up @@ -191,6 +157,99 @@ rock_library(graph_analysis
filters/CommonFilters.hpp
filters/EdgeContextFilter.hpp
filters/RegexFilters.hpp
io/GVGraph.hpp
io/GexfReader.hpp
io/GexfWriter.hpp
io/GraphMLReader.hpp
io/GraphMLWriter.hpp
io/GraphvizStyle.hpp
io/GraphvizGridStyle.hpp
io/GraphvizWriter.hpp
io/Serialization.hpp
io/YamlReader.hpp
io/YamlWriter.hpp
lemon/ArcIterator.hpp
lemon/DirectedGraph.hpp
lemon/DirectedSubGraph.hpp
lemon/Graph.hpp
lemon/NodeIterator.hpp
percolation/Event.hpp
percolation/RandomNumberGenerator.hpp
percolation/strategies/RandomDraw.hpp
percolation/strategies/UniformRandomEdgeRemoval.hpp
percolation/strategies/UniformRandomVertexRemoval.hpp
snap/DirectedGraph.hpp
snap/DirectedSubGraph.hpp
snap/EdgeIterator.hpp
snap/Graph.hpp
snap/NodeIterator.hpp
utils/MD5.hpp
utils/Filesystem.hpp
${EXTRA_HPP}
DEPS_PKGCONFIG
lemon snap base-lib gexf numeric libgvc utilmm yaml-cpp
DEPS_PLAIN
Boost_SERIALIZATION
Boost_FILESYSTEM
)
target_link_libraries(graph_analysis-core cgraph gomp)

if(EMBED_GLPK)
target_link_libraries(graph_analysis-core glpk)
endif(EMBED_GLPK)

if(EMBED_SCIP)
if(SCIP_FOUND)
message(STATUS "Linking SCIP Library: ${SCIP_LIBRARIES}")
target_link_libraries(graph_analysis-core ${SCIP_LIBRARIES})
endif()
endif()

get_target_property(graph_analysis-core-linker_flags graph_analysis-core LINK_FLAGS)
if(graph_analysis-core-linker_flags)
set(graph_analysis-core-linker_flags "${graph_analysis-core-linker_flags} -Wl,--exclude-libs=libsnap.a" )
else()
set(graph_analysis-core-linker_flags "-Wl,--exclude-libs=libsnap.a" )
endif()
set_target_properties(graph_analysis-core PROPERTIES LINK_FLAGS ${graph_analysis-core-linker_flags})

rock_library(graph_analysis
SOURCES
gui/ActionCommander.cpp
gui/BaseGraphView/AddEdgeDialog.cpp
gui/BaseGraphView/AddVertexDialog.cpp
gui/BaseGraphView/BaseGraphView.cpp
gui/EdgeItemBase.cpp
gui/EdgeItemSimple.cpp
gui/EdgeItemTypeManager.cpp
gui/EdgeMimeData.cpp
gui/FilterItem.cpp
gui/FilterManager.cpp
gui/GraphAnalysisGui.cpp
gui/GraphLayout.cpp
gui/GraphLayoutManager.cpp
gui/GraphWidget.cpp
gui/GraphWidgetManager.cpp
gui/IconManager.cpp
gui/VertexItemTypeManager.cpp
gui/Player.cpp
gui/PlayerConfiguration.cpp
gui/QBaseGraph.cpp
gui/VertexItemBase.cpp
gui/VertexItemSimple.cpp
gui/WidgetManager.cpp
gui/dialogs/AddFilterDialog.cpp
gui/dialogs/AddGraphElement.cpp
gui/dialogs/CustomDialog.cpp
gui/dialogs/GridLayout.cpp
gui/dialogs/IODialog.cpp
gui/dialogs/RenameFilterDialog.cpp
gui/dialogs/SwapFiltersDialog.cpp
gui/items/Feature.cpp
gui/items/Label.cpp
gui/layouts/GVLayout.cpp
gui/layouts/GridLayout.cpp
HEADERS
gui/ActionCommander.hpp
gui/BaseGraphView/AddEdgeDialog.hpp
gui/BaseGraphView/AddVertexDialog.hpp
Expand Down Expand Up @@ -227,40 +286,6 @@ rock_library(graph_analysis
gui/items/Label.hpp
gui/layouts/GVLayout.hpp
gui/layouts/GridLayout.hpp
io/GVGraph.hpp
io/GexfReader.hpp
io/GexfWriter.hpp
io/GraphMLReader.hpp
io/GraphMLWriter.hpp
io/GraphvizStyle.hpp
io/GraphvizGridStyle.hpp
io/GraphvizWriter.hpp
io/Serialization.hpp
io/YamlReader.hpp
io/YamlWriter.hpp
lemon/ArcIterator.hpp
lemon/DirectedGraph.hpp
lemon/DirectedSubGraph.hpp
lemon/Graph.hpp
lemon/NodeIterator.hpp
percolation/Event.hpp
percolation/RandomNumberGenerator.hpp
percolation/strategies/RandomDraw.hpp
percolation/strategies/UniformRandomEdgeRemoval.hpp
percolation/strategies/UniformRandomVertexRemoval.hpp
snap/DirectedGraph.hpp
snap/DirectedSubGraph.hpp
snap/EdgeIterator.hpp
snap/Graph.hpp
snap/NodeIterator.hpp
utils/MD5.hpp
utils/Filesystem.hpp
${EXTRA_HPP}
DEPS_PKGCONFIG
lemon snap base-lib gexf numeric libgvc utilmm yaml-cpp
DEPS_PLAIN
Boost_SERIALIZATION
Boost_FILESYSTEM
MOC
gui/GraphAnalysisGui.hpp
gui/QBaseGraph.hpp
Expand All @@ -276,7 +301,8 @@ rock_library(graph_analysis
gui/BaseGraphView/AddVertexDialog.hpp
gui/BaseGraphView/AddEdgeDialog.hpp
gui/Player.hpp
DEPS_PKGCONFIG QtGui QtSvg
DEPS graph_analysis-core
LIBS Qt4::QtGui Qt4::QtSvg
UI
gui/GraphAnalysisGui.ui
gui/BaseGraphView/AddVertexDialog.ui
Expand All @@ -288,26 +314,6 @@ rock_library(graph_analysis
gui/dialogs/property_dialog_gui.ui
gui/dialogs/swap_filters_dialog_gui.ui
)
target_link_libraries(graph_analysis cgraph gomp)

if(EMBED_GLPK)
target_link_libraries(graph_analysis glpk)
endif(EMBED_GLPK)

if(EMBED_SCIP)
if(SCIP_FOUND)
message(STATUS "Linking SCIP Library: ${SCIP_LIBRARIES}")
target_link_libraries(graph_analysis ${SCIP_LIBRARIES})
endif()
endif()

get_target_property(graph_analysis-linker_flags graph_analysis LINK_FLAGS)
if(graph_analysis-linker_flags)
set(graph_analysis-linker_flags "${graph_analysis-linker_flags} -Wl,--exclude-libs=libsnap.a" )
else()
set(graph_analysis-linker_flags "-Wl,--exclude-libs=libsnap.a" )
endif()
set_target_properties(graph_analysis PROPERTIES LINK_FLAGS ${graph_analysis-linker_flags})

rock_executable(graph_analysis-bm Benchmark.cpp
DEPS graph_analysis
Expand All @@ -321,5 +327,5 @@ rock_executable(graph_analysis-gui gui/main.cpp
)

rock_executable(graph_analysis-reader utils/GraphReaderMain.cpp
DEPS graph_analysis
DEPS graph_analysis-core
)
1 change: 1 addition & 0 deletions src/algorithms/LPSolver.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "LPSolver.hpp"
#include <boost/filesystem.hpp>
#include <sstream>
#include <algorithm>
#include <base-logging/Logging.hpp>
#include "../MapInitializer.hpp"
#include "../utils/MD5.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/algorithms/LPSolver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <string>
#include <map>
#include <vector>
#include <stdexcept>
#include "../SharedPtr.hpp"

namespace graph_analysis {
Expand Down
13 changes: 13 additions & 0 deletions src/graph_analysis-core.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/lib
includedir=${prefix}/include
sharedir=${prefix}/share/@TARGET_NAME@

Name: @TARGET_NAME@
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
Requires: @PKGCONFIG_REQUIRES@
Libs: -L${libdir} -l@TARGET_NAME@ @PKGCONFIG_LIBS@
Cflags: -I${includedir} @PKGCONFIG_CFLAGS@

Loading