Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
airliquide
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
gui
airliquide
Commits
183fb704
Commit
183fb704
authored
6 months ago
by
Giacomo Strangolino
Browse files
Options
Downloads
Patches
Plain Diff
builds with CMake
parent
f7736e48
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+14
-53
14 additions, 53 deletions
CMakeLists.txt
with
14 additions
and
53 deletions
CMakeLists.txt
+
14
−
53
View file @
183fb704
# typical build steps if cumbia are installed under /usr/local/cumbia-libs:
#
# > mkdir build && cd build
# > cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/cumbia-libs
# -DCMAKE_PREFIX_PATH=/usr/local/cumbia-libs/lib
# -DCMAKE_MODULE_PATH=/usr/local/cumbia-libs/lib/cmake
cmake_minimum_required
(
VERSION 3.16
)
project
(
airliquide VERSION 1.0.0 LANGUAGES C CXX
)
set
(
CMAKE_AUTOUIC ON
)
set
(
CMAKE_AUTOMOC ON
)
set
(
CMAKE_AUTORCC ON
)
set
(
CMAKE_CXX_STANDARD 17
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
find_package
(
QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets
)
find_package
(
Qt
${
QT_VERSION_MAJOR
}
REQUIRED COMPONENTS Widgets
)
find_package
(
cumbia REQUIRED
)
find_package
(
cumbia-qtcontrols REQUIRED
)
find_package
(
quapps REQUIRED
)
if
(
quapps_FOUND
)
message
(
STATUS
"+ found quapps"
)
endif
()
find_package
(
cumbia-http QUIET
)
# Check if the package was found
if
(
cumbia-http_FOUND
)
message
(
STATUS
"+ found cumbia-http module"
)
else
()
message
(
WARNING
"cumbia-http not found, continuing without it."
)
endif
()
find_package
(
qumbia-tango-controls QUIET
)
if
(
qumbia-tango-controls_FOUND
)
message
(
STATUS
"+ found qumbia-tango-controls module"
)
# Use the found library
else
()
message
(
WARNING
"qumbia-tango-controls not found, continuing without it."
)
endif
()
qt_standard_project_setup
()
# in order to find quapps-pre-target and quapps-post-target (below)
# make sure you specify -DCMAKE_MODULE_PATH=/usr/local/cumbia-libs/lib/cmake
# alongside the cmake command
#
include
(
quapps-pre-target
)
file
(
GLOB_RECURSE SOURCES src/*.cpp
)
file
(
GLOB_RECURSE HEADERS src/*.h
)
...
...
@@ -54,33 +38,10 @@ else()
)
endif
()
# Check if the package was found
if
(
qumbia-tango-controls_FOUND
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE qumbia-tango-controls
)
endif
()
# Check if the package was found
if
(
cumbia-http_FOUND
)
find_package
(
Qt
${
QT_VERSION_MAJOR
}
REQUIRED COMPONENTS Network WebSockets
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE cumbia-http
)
endif
()
if
(
quapps_FOUND
)
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE quapps
)
endif
()
set
(
CU_USER_CONFIG_DIR
".config/cumbia"
CACHE STRING
"Default cumbia user configuration dir (~/.config/cumbia)"
)
message
(
STATUS
"CU_USER_CONFIG_DIR is set to:
${
CU_USER_CONFIG_DIR
}
"
)
message
(
STATUS
"Change it calling cmake -DCU_USER_CONFIG_DIR=
\"
another/dir
\"
, with the desired directory"
)
add_compile_definitions
(
CUMBIA_USER_CONFIG_DIR=
"
${
CU_USER_CONFIG_DIR
}
"
)
include
(
quapps-post-target
)
# needs -DCMAKE_MODULE_PATH=
target_link_libraries
(
${
PROJECT_NAME
}
PRIVATE Qt
${
QT_VERSION_MAJOR
}
::Widgets
)
if
(
QT_VERSION_MAJOR EQUAL 6
)
qt_finalize_executable
(
${
PROJECT_NAME
}
)
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
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