Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
labrobotica
drivers
bno055_imu_driver
Commits
d4e6048e
Commit
d4e6048e
authored
Jul 02, 2019
by
Alejandro Lopez Gestoso
Browse files
Adapted to CMake plural variables *_DIRS and *_LIBRARIES
parent
6d12ff21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Findbno055_imu_driver.cmake
View file @
d4e6048e
#edit the following line to add the librarie's header files
FIND_PATH
(
bno055_imu_driver_INCLUDE_DIR bno055_imu_driver.h bno055_imu_exceptions.h bno055_common.h bno055_imu_sim.h /usr/local/include/iri/bno055_imu /usr/include/iri/bno055_imu
)
FIND_PATH
(
bno055_imu_driver_INCLUDE_DIR
S
bno055_imu_driver.h bno055_imu_exceptions.h bno055_common.h bno055_imu_sim.h /usr/local/include/iri/bno055_imu /usr/include/iri/bno055_imu
)
FIND_LIBRARY
(
bno055_imu_driver_LIBRAR
Y
_aux
FIND_LIBRARY
(
bno055_imu_driver_LIBRAR
IES
_aux
NAMES bno055_imu_driver
PATHS /usr/local/lib/iri/bno055_imu /usr/lib/iri/bno055_imu
)
FIND_LIBRARY
(
bno055_imu_sim_LIBRAR
Y
_aux
FIND_LIBRARY
(
bno055_imu_sim_LIBRAR
IES
_aux
NAMES bno055_imu_sim
PATHS /usr/local/lib/iri/bno055_imu /usr/lib/iri/bno055_imu
)
IF
(
bno055_imu_driver_LIBRAR
Y
_aux AND bno055_imu_sim_LIBRAR
Y
_aux
)
SET
(
bno055_imu_driver_LIBRAR
Y
${
bno055_imu_driver_LIBRAR
Y
_aux
}
${
bno055_imu_sim_LIBRAR
Y
_aux
}
)
ELSE
(
bno055_imu_driver_LIBRAR
Y
_aux AND bno055_imu_sim_LIBRAR
Y
_aux
)
MESSAGE
(
FATAL_ERROR
"Could not find bn055_imu_driver
${
bno055_imu_driver_LIBRAR
Y
_aux
}
or bno055_imu_sim
${
bno055_imu_sim_LIBRAR
Y
_aux
}
"
)
ENDIF
(
bno055_imu_driver_LIBRAR
Y
_aux AND bno055_imu_sim_LIBRAR
Y
_aux
)
IF
(
bno055_imu_driver_LIBRAR
IES
_aux AND bno055_imu_sim_LIBRAR
IES
_aux
)
SET
(
bno055_imu_driver_LIBRAR
IES
${
bno055_imu_driver_LIBRAR
IES
_aux
}
${
bno055_imu_sim_LIBRAR
IES
_aux
}
)
ELSE
(
bno055_imu_driver_LIBRAR
IES
_aux AND bno055_imu_sim_LIBRAR
IES
_aux
)
MESSAGE
(
FATAL_ERROR
"Could not find bn055_imu_driver
${
bno055_imu_driver_LIBRAR
IES
_aux
}
or bno055_imu_sim
${
bno055_imu_sim_LIBRAR
IES
_aux
}
"
)
ENDIF
(
bno055_imu_driver_LIBRAR
IES
_aux AND bno055_imu_sim_LIBRAR
IES
_aux
)
IF
(
bno055_imu_driver_INCLUDE_DIR AND bno055_imu_driver_LIBRARY
)
SET
(
bno055_imu_driver_INCLUDE_DIR
${
bno055_imu_driver_INCLUDE_DIRS
}
)
SET
(
bno055_imu_driver_LIBRARY
${
bno055_imu_driver_LIBRARIES
}
)
IF
(
bno055_imu_driver_INCLUDE_DIRS AND bno055_imu_driver_LIBRARIES
)
SET
(
bno055_imu_driver_FOUND TRUE
)
ENDIF
(
bno055_imu_driver_INCLUDE_DIR AND bno055_imu_driver_LIBRAR
Y
)
ENDIF
(
bno055_imu_driver_INCLUDE_DIR
S
AND bno055_imu_driver_LIBRAR
IES
)
IF
(
bno055_imu_driver_FOUND
)
IF
(
NOT bno055_imu_driver_FIND_QUIETLY
)
MESSAGE
(
STATUS
"Found bno055_imu_driver:
${
bno055_imu_driver_LIBRAR
Y
}
"
)
MESSAGE
(
STATUS
"Found bno055_imu_driver:
${
bno055_imu_driver_LIBRAR
IES
}
"
)
ENDIF
(
NOT bno055_imu_driver_FIND_QUIETLY
)
ELSE
(
bno055_imu_driver_FOUND
)
IF
(
bno055_imu_driver_FIND_REQUIRED
)
...
...
src/CMakeLists.txt
View file @
d4e6048e
...
...
@@ -11,19 +11,19 @@ FIND_PACKAGE(iriutils REQUIRED)
FIND_PACKAGE
(
comm REQUIRED
)
# add the necessary include directories
INCLUDE_DIRECTORIES
(
../include
)
INCLUDE_DIRECTORIES
(
${
iriutils_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
${
comm_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
${
iriutils_INCLUDE_DIR
S
}
)
INCLUDE_DIRECTORIES
(
${
comm_INCLUDE_DIR
S
}
)
# create the shared library
ADD_LIBRARY
(
bno055_imu_driver SHARED
${
sources
}
)
# link necessary libraries
TARGET_LINK_LIBRARIES
(
bno055_imu_driver
${
iriutils_LIBRAR
Y
}
)
TARGET_LINK_LIBRARIES
(
bno055_imu_driver
${
comm_LIBRAR
Y
}
)
TARGET_LINK_LIBRARIES
(
bno055_imu_driver
${
iriutils_LIBRAR
IES
}
)
TARGET_LINK_LIBRARIES
(
bno055_imu_driver
${
comm_LIBRAR
IES
}
)
# create the shared library
ADD_LIBRARY
(
bno055_imu_sim SHARED
${
sources_sim
}
)
# link necessary libraries
TARGET_LINK_LIBRARIES
(
bno055_imu_sim
${
iriutils_LIBRAR
Y
}
)
TARGET_LINK_LIBRARIES
(
bno055_imu_sim
${
comm_LIBRAR
Y
}
)
TARGET_LINK_LIBRARIES
(
bno055_imu_sim
${
iriutils_LIBRAR
IES
}
)
TARGET_LINK_LIBRARIES
(
bno055_imu_sim
${
comm_LIBRAR
IES
}
)
INSTALL
(
TARGETS bno055_imu_driver
RUNTIME DESTINATION bin
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment