Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tf_eeros
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
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
Moritz Lammerich
tf_eeros
Commits
a6ed1749
Verified
Commit
a6ed1749
authored
8 months ago
by
Moritz Lammerich
Browse files
Options
Downloads
Patches
Plain Diff
improve CMake to allow for standard build/install workflows
parent
72c0d41f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+18
-13
18 additions, 13 deletions
CMakeLists.txt
cmake/tfEEROSConfig.cmake
+12
-0
12 additions, 0 deletions
cmake/tfEEROSConfig.cmake
src/CMakeLists.txt
+0
-13
0 additions, 13 deletions
src/CMakeLists.txt
with
30 additions
and
26 deletions
CMakeLists.txt
+
18
−
13
View file @
a6ed1749
cmake_minimum_required
(
VERSION 3.
5.
1
)
cmake_minimum_required
(
VERSION 3.1
4
)
project
(
tfEEROS
)
set
(
CMAKE_CXX_STANDARD 14
)
## search eeros globally
# find_package(eeros)
include
(
GNUInstallDirs
)
## include eeros library by path
message
(
"EEROS path manually setted: $ENV{TFEEROS_EEROS_PATH}"
)
include_directories
(
"$ENV{TFEEROS_EEROS_PATH}/include"
)
link_directories
(
"$ENV{TFEEROS_EEROS_PATH}/lib"
)
include_directories
(
"include"
)
set
(
CMAKE_CXX_STANDARD 14
)
add_subdirectory
(
src
)
find_package
(
EEROS REQUIRED
)
add_library
(
tf_eeros
src/TrafoMatrix.cpp
src/TF_Tree.cpp
src/MatrixExtension.cpp
src/Quaternion.cpp
)
add_subdirectory
(
test
)
target_link_libraries
(
tf_eeros PUBLIC EEROS::eeros
)
target_include_directories
(
tf_eeros PUBLIC $<BUILD_INTERFACE:
${
PROJECT_SOURCE_DIR
}
/include> $<INSTALL_INTERFACE:
${
CMAKE_INSTALL_INCLUDEDIR
}
/
${
PROJECT_NAME
}
>
)
install
(
DIRECTORY
${
CMAKE_SOURCE_DIR
}
/include/
DESTINATION
${
CMAKE_INSTALL_INCLUDEDIR
}
/
${
PROJECT_NAME
}
)
install
(
TARGETS tf_eeros EXPORT
${
PROJECT_NAME
}
)
install
(
EXPORT
${
PROJECT_NAME
}
NAMESPACE
${
PROJECT_NAME
}
:: DESTINATION
${
CMAKE_INSTALL_DATADIR
}
/
${
PROJECT_NAME
}
)
install
(
FILES
${
PROJECT_SOURCE_DIR
}
/cmake/
${
PROJECT_NAME
}
Config.cmake DESTINATION
${
CMAKE_INSTALL_DATADIR
}
/
${
PROJECT_NAME
}
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cmake/tfEEROSConfig.cmake
0 → 100644
+
12
−
0
View file @
a6ed1749
include
(
CMakeFindDependencyMacro
)
include
(
${
CMAKE_CURRENT_LIST_DIR
}
/tfEEROS.cmake
)
get_target_property
(
interface_libs tfEEROS::tf_eeros
"INTERFACE_LINK_LIBRARIES"
)
foreach
(
dependency IN LISTS interface_libs
)
message
(
"found tfEEROS dep:
${
dependency
}
"
)
string
(
FIND
${
dependency
}
:: package_name_end
)
string
(
SUBSTRING
${
dependency
}
0
${
package_name_end
}
dep_package
)
message
(
"package name:
${
dep_package
}
"
)
find_dependency
(
${
dep_package
}
)
endforeach
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
deleted
100644 → 0
+
0
−
13
View file @
72c0d41f
add_library
(
tfEEROS
TrafoMatrix.cpp
TF_Tree.cpp
MatrixExtension.cpp
Quaternion.cpp
)
install
(
TARGETS tfEEROS LIBRARY
)
INSTALL
(
DIRECTORY
${
CMAKE_SOURCE_DIR
}
/include/
DESTINATION include
FILES_MATCHING PATTERN
"*.h*"
)
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