Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cumbia-tango
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
lib
cumbia
cumbia-tango
Commits
83f8e405
Commit
83f8e405
authored
6 months ago
by
Giacomo Strangolino
Browse files
Options
Downloads
Patches
Plain Diff
cmake
parent
08e66e3c
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
+11
-11
11 additions, 11 deletions
CMakeLists.txt
with
11 additions
and
11 deletions
CMakeLists.txt
+
11
−
11
View file @
83f8e405
...
...
@@ -4,10 +4,9 @@ project(cumbia-tango VERSION 2.2.1
DESCRIPTION
"C++ library based on cumbia and the Tango control system"
LANGUAGES CXX
)
find_package
(
cumbia 2.
0
REQUIRED
)
find_package
(
cumbia 2.
2
REQUIRED
)
include
(
FindPkgConfig
)
#set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/cmake")
pkg_check_modules
(
TANGO_DEPENDENCY REQUIRED tango
)
# Include directories and compile flags from the dependency
...
...
@@ -18,6 +17,9 @@ add_definitions(${TANGO_DEPENDENCY_CFLAGS_OTHER})
# to have CMAKE_INSTALL_INCLUDEDIR CMAKE_INSTALL_LIBDIR
include
(
GNUInstallDirs
)
# Modify CMAKE_INSTALL_INCLUDEDIR to include the library name
set
(
CMAKE_INSTALL_INCLUDEDIR
"include/
${
PROJECT_NAME
}
"
)
file
(
GLOB_RECURSE SOURCES lib/*.cpp
)
file
(
GLOB_RECURSE HEADERS lib/*.h
)
...
...
@@ -29,17 +31,13 @@ target_link_libraries(cumbia-tango PUBLIC tango)
# in order to have lib and symlinks
set_target_properties
(
cumbia-tango PROPERTIES VERSION
${
PROJECT_VERSION
}
)
set_target_properties
(
cumbia-tango PROPERTIES SOVERSION
${
PROJECT_VERSION_MAJOR
}
)
set_target_properties
(
cumbia-tango PROPERTIES PUBLIC_HEADER
"
${
HEADERS
}
"
)
set_target_properties
(
cumbia-tango
PROPERTIES
PUBLIC_HEADER
"
${
HEADERS
}
"
)
target_compile_features
(
cumbia-tango PUBLIC cxx_std_17
)
target_compile_features
(
cumbia-tango PRIVATE cxx_std_17
)
target_include_directories
(
cumbia-tango PUBLIC
$<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/lib>
$<INSTALL_INTERFACE:
include/cumbia-tango>
# <prefix>/include/cumbia-tango
$<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
>
)
target_compile_definitions
(
cumbia-tango PRIVATE
...
...
@@ -51,7 +49,7 @@ configure_file(lib/cumbia-tango.pc.cmake.in cumbia-tango.pc @ONLY)
install
(
TARGETS cumbia-tango EXPORT cumbia-tangoTargets
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/cumbia-tango
)
PUBLIC_HEADER DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
)
# install pkgconfig file
install
(
...
...
@@ -61,7 +59,9 @@ install(
export
(
TARGETS cumbia-tango FILE cumbia-tangoTargets.cmake
)
set
(
CMAKE_EXPORT_PACKAGE_REGISTRY ON
)
# this writes a registry entry under the user .cmake/packages
# directory, pointing to the source tree/build directory
## set(CMAKE_EXPORT_PACKAGE_REGISTRY ON)
export
(
PACKAGE cumbia-tango
)
install
(
EXPORT cumbia-tangoTargets
FILE cumbia-tangoTargets.cmake
...
...
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