Skip to content

Commit

Permalink
Merge pull request #9 from segwayrmp/cleanup
Browse files Browse the repository at this point in the history
Update find_package infrastructure
  • Loading branch information
wjwwood committed May 8, 2013
2 parents 7b69969 + 415b2b6 commit a34aa84
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 21 deletions.
19 changes: 0 additions & 19 deletions cmake/Findsegwayrmp.cmake

This file was deleted.

34 changes: 34 additions & 0 deletions cmake/libsegwayrmpConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
find_path(libsegwayrmp_INCLUDE_DIRS segwayrmp/segwayrmp.h
@CMAKE_INSTALL_PREFIX@/include
/usr/include
/usr/local/include
)

find_library(libsegwayrmp_LIBRARY segwayrmp
@CMAKE_INSTALL_PREFIX@/lib
@CMAKE_INSTALL_PREFIX@/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
)
set(libsegwayrmp_LIBRARIES ${libsegwayrmp_LIBRARY})

# Try to find the ftd2xx library for linux, darwin, and other unix platforms
if(UNIX)
find_library(ftd2xx_LIBRARY ftd2xx
@CMAKE_INSTALL_PREFIX@/lib
@CMAKE_INSTALL_PREFIX@/lib64
/usr/lib
/usr/lib64
/usr/local/lib
/usr/local/lib64
)
list(APPEND libsegwayrmp_LIBRARIES ${ftd2xx_LIBRARY})
endif()

if(NOT libsegwayrmp_INCLUDE_DIRS OR NOT libsegwayrmp_LIBRARIES)
set(libsegwayrmp_FOUND FALSE)
else()
set(libsegwayrmp_FOUND TRUE)
endif()
9 changes: 7 additions & 2 deletions cmake/segwayrmp_targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ install(
DESTINATION include/segwayrmp
)

configure_file(
"cmake/libsegwayrmpConfig.cmake.in"
"cmake/libsegwayrmpConfig.cmake"
@ONLY
)
install(
FILES cmake/Findsegwayrmp.cmake
DESTINATION share/libsegwayrmp/
FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/libsegwayrmpConfig.cmake
DESTINATION share/libsegwayrmp
)

install(
Expand Down

0 comments on commit a34aa84

Please sign in to comment.