Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gnss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
plugins
gnss
Commits
48f132e6
Commit
48f132e6
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Make CMake config file fetch its own dependencies + CMakeLists.txt cleanup
parent
3f7de559
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+8
-38
8 additions, 38 deletions
CMakeLists.txt
cmake_modules/Findwolf.cmake
+0
-28
0 additions, 28 deletions
cmake_modules/Findwolf.cmake
cmake_modules/wolfgnssConfig.cmake
+19
-1
19 additions, 1 deletion
cmake_modules/wolfgnssConfig.cmake
with
27 additions
and
67 deletions
CMakeLists.txt
+
8
−
38
View file @
48f132e6
...
@@ -91,23 +91,9 @@ ENDIF(BUILD_EXAMPLES OR BUILD_TESTS)
...
@@ -91,23 +91,9 @@ ENDIF(BUILD_EXAMPLES OR BUILD_TESTS)
#find dependencies.
#find dependencies.
# ============EXAMPLE==================
# ============EXAMPLE==================
FIND_PACKAGE
(
Eigen3 3.2.92 REQUIRED
)
FIND_PACKAGE
(
Threads REQUIRED
)
FIND_PACKAGE
(
wolf REQUIRED
)
FIND_PACKAGE
(
wolf REQUIRED
)
FIND_PACKAGE
(
YamlCpp REQUIRED
)
FIND_PACKAGE
(
laser_scan_utils REQUIRED
)
IF
(
YAMLCPP_FOUND
)
MESSAGE
(
"yaml-cpp Library FOUND: yaml-cpp related sources will be built."
)
ELSEIF
(
YAMLCPP_FOUND
)
MESSAGE
(
"yaml-cpp Library NOT FOUND!"
)
ENDIF
(
YAMLCPP_FOUND
)
FIND_PACKAGE
(
Ceres QUIET
)
#Ceres is not required
IF
(
Ceres_FOUND
)
MESSAGE
(
"Ceres Library FOUND: Ceres related sources will be built."
)
ENDIF
(
Ceres_FOUND
)
#FIND_PATH(
#FIND_PATH(
# Suitesparse_INCLUDE_DIRS
# Suitesparse_INCLUDE_DIRS
...
@@ -142,16 +128,9 @@ include_directories("${PROJECT_BINARY_DIR}/conf")
...
@@ -142,16 +128,9 @@ include_directories("${PROJECT_BINARY_DIR}/conf")
#INCLUDES SECTION
#INCLUDES SECTION
# ==============================
# ==============================
INCLUDE_DIRECTORIES
(
${
EIGEN_INCLUDE_DIRS
}
)
INCLUDE_DIRECTORIES
(
${
wolf_INCLUDE_DIRS
}
)
INCLUDE_DIRECTORIES
(
${
wolf_INCLUDE_DIRS
}
)
INCLUDE_DIRECTORIES
(
${
laser_utils_INCLUDE_DIRS
}
)
INCLUDE_DIRECTORIES
(
BEFORE
"include"
)
INCLUDE_DIRECTORIES
(
BEFORE
"include"
)
INCLUDE_DIRECTORIES
(
${
laser_scan_utils_INCLUDE_DIRS
}
)
INCLUDE_DIRECTORIES
(
${
YAMLCPP_INCLUDE_DIR
}
)
IF
(
Ceres_FOUND
)
INCLUDE_DIRECTORIES
(
${
CERES_INCLUDE_DIRS
}
)
ENDIF
(
Ceres_FOUND
)
#HEADERS
#HEADERS
SET
(
HDRS_COMMON
SET
(
HDRS_COMMON
...
@@ -263,25 +242,16 @@ ADD_LIBRARY(${PLUGIN_NAME}
...
@@ -263,25 +242,16 @@ ADD_LIBRARY(${PLUGIN_NAME}
#Link the created libraries
#Link the created libraries
#===============EXAMPLE=========================
#===============EXAMPLE=========================
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
CMAKE_THREAD_LIBS_INIT
}
)
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
wolf_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
wolf_LIBRARY
}
)
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
laser_scan_utils_LIBRARY
}
)
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
YAMLCPP_LIBRARY
}
)
IF
(
GLOG_FOUND
)
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
GLOG_LIBRARY
}
)
ENDIF
(
GLOG_FOUND
)
IF
(
Ceres_FOUND
)
TARGET_LINK_LIBRARIES
(
${
PLUGIN_NAME
}
${
CERES_LIBRARIES
}
)
ENDIF
(
Ceres_FOUND
)
#Build tests
#Build tests
#===============EXAMPLE=========================
#===============EXAMPLE=========================
IF
(
GLOG_FOUND
)
IF
(
BUILD_TESTS
)
IF
(
BUILD_TESTS
)
MESSAGE
(
"Building tests."
)
MESSAGE
(
"Building tests."
)
add_subdirectory
(
test
)
add_subdirectory
(
test
)
ENDIF
(
BUILD_TESTS
)
ENDIF
(
BUILD_TESTS
)
ENDIF
(
GLOG_FOUND
)
#install library
#install library
#=============================================================
#=============================================================
...
...
This diff is collapsed.
Click to expand it.
cmake_modules/Findwolf.cmake
deleted
100644 → 0
+
0
−
28
View file @
3f7de559
#edit the following line to add the librarie's header files
FIND_PATH
(
wolf_INCLUDE_DIRS
NAMES wolf.found
PATHS /usr/local/include/iri-algorithms/wolf/plugin_core
)
#change INCLUDE_DIRS to its parent directory
# get_filename_component(wolf_INCLUDE_DIRS ${wolf_INCLUDE_DIRS} DIRECTORY)
MESSAGE
(
"Found wolf include dirs:
${
wolf_INCLUDE_DIRS
}
"
)
FIND_LIBRARY
(
wolf_LIBRARY
NAMES wolf
PATHS /usr/lib /usr/local/lib /usr/local/lib/iri-algorithms
)
IF
(
wolf_INCLUDE_DIRS AND wolf_LIBRARY
)
SET
(
wolf_FOUND TRUE
)
ENDIF
(
wolf_INCLUDE_DIRS AND wolf_LIBRARY
)
IF
(
wolf_FOUND
)
IF
(
NOT wolf_FIND_QUIETLY
)
MESSAGE
(
STATUS
"Found wolf:
${
wolf_LIBRARY
}
"
)
ENDIF
(
NOT wolf_FIND_QUIETLY
)
ELSE
(
wolf_FOUND
)
IF
(
wolf_FIND_REQUIRED
)
MESSAGE
(
FATAL_ERROR
"Could not find wolf"
)
ENDIF
(
wolf_FIND_REQUIRED
)
ENDIF
(
wolf_FOUND
)
This diff is collapsed.
Click to expand it.
cmake_modules/wolfgnssConfig.cmake
+
19
−
1
View file @
48f132e6
...
@@ -62,4 +62,22 @@ if(NOT wolfgnss_FOUND)
...
@@ -62,4 +62,22 @@ if(NOT wolfgnss_FOUND)
wolf_report_not_found
(
"Something went wrong while setting up wolf gnss."
)
wolf_report_not_found
(
"Something went wrong while setting up wolf gnss."
)
endif
(
NOT wolfgnss_FOUND
)
endif
(
NOT wolfgnss_FOUND
)
# Set the include directories for wolf (itself).
# Set the include directories for wolf (itself).
set
(
wolfgnss_FOUND TRUE
)
set
(
wolfgnss_FOUND TRUE
)
\ No newline at end of file
# Now we gather all the required dependencies for Wolf Laser
FIND_PACKAGE
(
laser_scan_utils REQUIRED
)
list
(
APPEND wolfgnss_INCLUDE_DIRS
${
laser_scan_utils_INCLUDE_DIRS
}
)
list
(
APPEND wolfgnss_LIBRARIES
${
laser_scan_utils_LIBRARY
}
)
if
(
NOT wolf_FOUND
)
FIND_PACKAGE
(
wolf REQUIRED
)
#We reverse in order to insert at the start
list
(
REVERSE wolfgnss_INCLUDE_DIRS
)
list
(
APPEND wolfgnss_INCLUDE_DIRS
${
wolf_INCLUDE_DIRS
}
)
list
(
REVERSE wolfgnss_INCLUDE_DIRS
)
list
(
REVERSE wolfgnss_LIBRARIES
)
list
(
APPEND wolfgnss_LIBRARIES
${
wolf_LIBRARIES
}
)
list
(
REVERSE wolfgnss_LIBRARIES
)
endif
()
\ No newline at end of file
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