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
usb_i2c_adapter
Commits
77714e4d
Commit
77714e4d
authored
Jul 09, 2019
by
Alejandro Lopez Gestoso
Browse files
Adapted to CMake plural variables *_DIRS and *_LIBRARIES
parent
409fe268
Changes
2
Hide whitespace changes
Inline
Side-by-side
Findusb_i2c_adapter.cmake
View file @
77714e4d
#edit the following line to add the librarie's header files
FIND_PATH
(
usb_i2c_adapter_INCLUDE_DIR usb_i2c.h usb_i2c_exceptions.h /usr/local/include/iri/usb_i2c_adapter /usr/include/iri/usb_i2c_adapter
)
FIND_PATH
(
usb_i2c_adapter_INCLUDE_DIR
S
usb_i2c.h usb_i2c_exceptions.h /usr/local/include/iri/usb_i2c_adapter /usr/include/iri/usb_i2c_adapter
)
FIND_LIBRARY
(
usb_i2c_adapter_LIBRAR
Y
FIND_LIBRARY
(
usb_i2c_adapter_LIBRAR
IES
NAMES usb_i2c_adapter
PATHS /usr/local/lib/iri/usb_i2c_adapter /usr/lib/iri/usb_i2c_adapter
)
SET
(
usb_i2c_adapter_INCLUDE_DIR
S
${
usb_i2c_adapter_INCLUDE_DIR
}
)
SET
(
usb_i2c_adapter_LIBRAR
IES
${
usb_i2c_adapter_LIBRAR
Y
}
)
SET
(
usb_i2c_adapter_INCLUDE_DIR
${
usb_i2c_adapter_INCLUDE_DIR
S
}
)
SET
(
usb_i2c_adapter_LIBRAR
Y
${
usb_i2c_adapter_LIBRAR
IES
}
)
IF
(
usb_i2c_adapter_INCLUDE_DIR AND usb_i2c_adapter_LIBRAR
Y
)
IF
(
usb_i2c_adapter_INCLUDE_DIR
S
AND usb_i2c_adapter_LIBRAR
IES
)
SET
(
usb_i2c_adapter_FOUND TRUE
)
ENDIF
(
usb_i2c_adapter_INCLUDE_DIR AND usb_i2c_adapter_LIBRAR
Y
)
ENDIF
(
usb_i2c_adapter_INCLUDE_DIR
S
AND usb_i2c_adapter_LIBRAR
IES
)
IF
(
usb_i2c_adapter_FOUND
)
IF
(
NOT usb_i2c_adapter_FIND_QUIETLY
)
MESSAGE
(
STATUS
"Found usb_i2c_adapter:
${
usb_i2c_adapter_LIBRAR
Y
}
"
)
MESSAGE
(
STATUS
"Found usb_i2c_adapter:
${
usb_i2c_adapter_LIBRAR
IES
}
"
)
ENDIF
(
NOT usb_i2c_adapter_FIND_QUIETLY
)
ELSE
(
usb_i2c_adapter_FOUND
)
IF
(
usb_i2c_adapter_FIND_REQUIRED
)
...
...
src/CMakeLists.txt
View file @
77714e4d
...
...
@@ -8,12 +8,12 @@ FIND_PACKAGE(iriutils REQUIRED)
FIND_PACKAGE
(
comm REQUIRED
)
# edit the following line to add the necessary include directories
INCLUDE_DIRECTORIES
(
../include/
${
iriutils_INCLUDE_DIR
}
${
comm_INCLUDE_DIR
}
)
INCLUDE_DIRECTORIES
(
../include/
${
iriutils_INCLUDE_DIR
S
}
${
comm_INCLUDE_DIR
S
}
)
ADD_LIBRARY
(
usb_i2c_adapter SHARED
${
sources
}
)
#edit the following line to add the necessary system libraries (if any)
TARGET_LINK_LIBRARIES
(
usb_i2c_adapter
${
iriutils_LIBRAR
Y
}
${
comm_LIBRAR
Y
}
)
TARGET_LINK_LIBRARIES
(
usb_i2c_adapter
${
iriutils_LIBRAR
IES
}
${
comm_LIBRAR
IES
}
)
INSTALL
(
TARGETS usb_i2c_adapter
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