Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
0c53943f
Commit
0c53943f
authored
3 years ago
by
t.knopff
Browse files
Options
Downloads
Patches
Plain Diff
Adapt build configuration to new directory layout
parent
9a8f8298
No related branches found
No related tags found
1 merge request
!68
reorganisation of directories
Pipeline
#36423
failed
3 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/CMakeLists.txt
+153
-1
153 additions, 1 deletion
GUI/CMakeLists.txt
GUI/main/CMakeLists.txt
+1
-0
1 addition, 0 deletions
GUI/main/CMakeLists.txt
with
154 additions
and
1 deletion
GUI/CMakeLists.txt
+
153
−
1
View file @
0c53943f
...
@@ -8,7 +8,159 @@ set(CMAKE_AUTOMOC ON)
...
@@ -8,7 +8,159 @@ set(CMAKE_AUTOMOC ON)
set
(
CMAKE_AUTOUIC ON
)
set
(
CMAKE_AUTOUIC ON
)
add_subdirectory
(
ba3d
)
add_subdirectory
(
ba3d
)
add_subdirectory
(
coregui
)
set
(
library_name BornAgainGUI
)
# --- source and include files ---
set
(
include_dirs
${
CMAKE_CURRENT_SOURCE_DIR
}
/mainwindow
${
CMAKE_CURRENT_SOURCE_DIR
}
/utils
${
CMAKE_CURRENT_SOURCE_DIR
}
/Models
${
CMAKE_CURRENT_SOURCE_DIR
}
/DataLoaders
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/SampleDesigner
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/JobWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/IntensityDataWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/InfoWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/MaterialEditor
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/InstrumentWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/SimulationWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/FitWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/PropertyEditor
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/MaskWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/AccordionWidget
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/ImportDataWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/ImportDataWidgets/CsvImportAssistant
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/CommonWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/RealSpaceWidgets
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/SpecularDataWidgets
)
set
(
source_files
)
set
(
include_files
)
set
(
form_files
)
foreach
(
dir
${
include_dirs
}
)
file
(
GLOB source
${
dir
}
/*.cpp
)
file
(
GLOB include
${
dir
}
/*.h
)
file
(
GLOB forms
${
dir
}
/*.ui
)
list
(
APPEND source_files
${
source
}
)
list
(
APPEND include_files
${
include
}
)
list
(
APPEND form_files
${
forms
}
)
endforeach
()
set
(
source_widgetbox
Views/widgetbox/widgetboxcategorylistview.cpp
Views/widgetbox/widgetboxtreewidget.cpp
Views/widgetbox/widgetbox.cpp
)
list
(
APPEND source_files
${
source_widgetbox
}
)
set
(
include_widgetbox
Views/widgetbox/widgetboxcategorylistview.h
Views/widgetbox/widgetboxtreewidget.h
Views/widgetbox/widgetbox.h
Views/widgetbox/widgetbox_global.h
)
if
(
WIN32
)
add_definitions
(
-DQDESIGNER_UILIB_LIBRARY
)
endif
()
list
(
APPEND include_files
${
include_widgetbox
}
)
list
(
APPEND include_dirs
${
CMAKE_CURRENT_SOURCE_DIR
}
/Views/widgetbox
)
set
(
resource_files
gui.qrc
Views/SampleDesigner/SampleDesigner.qrc
Views/MaskWidgets/MaskWidgets.qrc
Views/widgetbox/widgetbox.qrc
Views/AccordionWidget/accordionwidgeticons.qrc
)
# --- Qt configuration ---------
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
qt5_add_resources
(
RC_SRCS
${
resource_files
}
)
# --- definitions ------
if
(
BORNAGAIN_CRASHHANDLER
)
add_definitions
(
-DBORNAGAIN_CRASHHANDLER
)
endif
()
if
(
WIN32
)
string
(
APPEND CMAKE_CXX_FLAGS
" -DBA_CORE_BUILD_DLL"
)
endif
()
# --- making library ---------
add_library
(
${
library_name
}
SHARED
${
source_files
}
${
RC_SRCS
}
${
include_files
}
${
form_files
}
)
set_target_properties
(
${
library_name
}
PROPERTIES PREFIX
${
libprefix
}
SUFFIX
${
libsuffix
}
)
set
(
${
library_name
}
_LIBRARY_TYPE SHARED
)
# exposing library name and list of include directories outside
set
(
${
library_name
}
_INCLUDE_DIRS
${
include_dirs
}
)
set
(
${
library_name
}
_LIBRARY
${
library_name
}
)
# --- dependencies ---------
target_include_directories
(
${
library_name
}
PUBLIC
${
CMAKE_SOURCE_DIR
}
)
target_link_libraries
(
${
library_name
}
${
BornAgainCore_LIBRARY
}
${
ba3d_LIBRARY
}
Qt5::Widgets
Qt5::Core
Qt5::Gui
Qt5::Designer
Qt5::PrintSupport
qcustomplot
)
# --- Installation ---------
install
(
TARGETS
${
library_name
}
DESTINATION
${
destination_lib
}
COMPONENT Libraries
)
if
(
WIN32
)
# --- Qt ---
install
(
FILES
${
QTDIR
}
/bin/Qt5Widgets.DLL
${
QTDIR
}
/bin/Qt5Core.dll
${
QTDIR
}
/bin/Qt5Gui.dll
${
QTDIR
}
/bin/Qt5Designer.dll
${
QTDIR
}
/bin/Qt5Xml.dll
${
QTDIR
}
/bin/Qt5Svg.dll
${
QTDIR
}
/bin/Qt5PrintSupport.dll
DESTINATION
${
destination_lib
}
COMPONENT Libraries
)
install
(
FILES
${
QTDIR
}
/plugins/platforms/qwindows.dll
DESTINATION bin/platforms COMPONENT Libraries
)
install
(
FILES
${
QTDIR
}
/plugins/iconengines/qsvgicon.dll
DESTINATION bin/iconengines COMPONENT Libraries
)
install
(
FILES
${
QTDIR
}
/plugins/imageformats/qjpeg.dll
${
QTDIR
}
/plugins/imageformats/qsvg.dll
DESTINATION bin/imageformats COMPONENT Libraries
)
install
(
FILES
${
QTDIR
}
/bin/libEGL.dll
${
QTDIR
}
/bin/libGLESv2.dll
DESTINATION
${
destination_lib
}
COMPONENT Libraries
)
set
(
QT_VISTA_STYLE
${
QTDIR
}
/plugins/styles/qwindowsvistastyle.dll
)
if
(
EXISTS
${
QT_VISTA_STYLE
}
)
install
(
FILES
${
QT_VISTA_STYLE
}
DESTINATION bin/styles COMPONENT Libraries
)
else
(
EXISTS
${
QT_VISTA_STYLE
}
)
MESSAGE
(
AUTHOR_WARNING File
${
QT_VISTA_STYLE
}
not found.
)
endif
(
EXISTS
${
QT_VISTA_STYLE
}
)
unset
(
QT_VISTA_STYLE
)
endif
()
add_subdirectory
(
main
)
add_subdirectory
(
main
)
# Transmit variables for use in tests
# Transmit variables for use in tests
...
...
This diff is collapsed.
Click to expand it.
GUI/main/CMakeLists.txt
+
1
−
0
View file @
0c53943f
...
@@ -43,6 +43,7 @@ add_executable(${executable_name}
...
@@ -43,6 +43,7 @@ add_executable(${executable_name}
# dependencies
# dependencies
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
target_link_libraries
(
${
executable_name
}
${
BornAgainGUI_LIBRARY
}
)
target_link_libraries
(
${
executable_name
}
${
BornAgainGUI_LIBRARY
}
)
target_include_directories
(
${
executable_name
}
PUBLIC
${
BornAgainGUI_INCLUDE_DIRS
}
)
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# extra target properties
# extra target properties
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment