-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1176c5f
commit f7881b5
Showing
27 changed files
with
1,038 additions
and
708 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
include(CMakeFindDependencyMacro) | ||
|
||
# Find dependency | ||
find_dependency(flexiv_rdk REQUIRED) | ||
find_package(OpenSSL REQUIRED) | ||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
find_dependency(Threads REQUIRED) | ||
find_dependency(spdlog REQUIRED) | ||
find_dependency(fastrtps 2.6.7 REQUIRED) | ||
|
||
# Add targets file | ||
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,34 @@ | ||
cmake_minimum_required(VERSION 3.16.3) | ||
|
||
project(flexiv_tdk-examples) | ||
|
||
message("OS: ${CMAKE_SYSTEM_NAME}") | ||
message("Processor: ${CMAKE_SYSTEM_PROCESSOR}") | ||
|
||
# Show verbose build info | ||
SET(CMAKE_VERBOSE_MAKEFILE ON) | ||
|
||
message("OS: ${CMAKE_SYSTEM_NAME}") | ||
message("Processor: ${CMAKE_SYSTEM_PROCESSOR}") | ||
|
||
# Configure build type | ||
if(NOT CMAKE_BUILD_TYPE) | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "CMake build type" FORCE) | ||
endif() | ||
|
||
# Set default install prefix | ||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
message(FATAL_ERROR "CMAKE_INSTALL_PREFIX must be set to a non-default value. | ||
Please set it explicitly using -DCMAKE_INSTALL_PREFIX=<path-to-your-install-directory> or using cmake-gui") | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "CMake build type" FORCE) | ||
endif() | ||
|
||
# Add to CMAKE_PREFIX_PATH so the sub-dependencies can also be found | ||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) | ||
|
||
# Example list | ||
set(EXAMPLE_LIST | ||
basics1_cartesian_teleop | ||
cartesian_teleop_under_lan | ||
joint_teleop_over_wan | ||
joint_teleop_under_lan | ||
) | ||
|
||
# Find flexiv_tdk INTERFACE library | ||
find_package(flexiv_tdk 1.1.0 REQUIRED) | ||
if(flexiv_tdk_FOUND) | ||
message(STATUS "Found flexiv_tdk:${flexiv_tdk_DIR}") | ||
endif() | ||
find_package(flexiv_tdk REQUIRED) | ||
|
||
# Build all examples | ||
# Build all selected examples | ||
foreach(example ${EXAMPLE_LIST}) | ||
add_executable(${example} ${example}.cpp) | ||
target_link_libraries(${example} flexiv::flexiv_tdk) | ||
add_executable(${example} ${example}.cpp) | ||
target_link_libraries(${example} flexiv::flexiv_tdk) | ||
|
||
# C++17 required | ||
set_target_properties(${example} PROPERTIES | ||
CXX_STANDARD 17 | ||
CXX_STANDARD_REQUIRED ON) | ||
# C++17 required | ||
set_target_properties(${example} PROPERTIES | ||
CXX_STANDARD 17 | ||
CXX_STANDARD_REQUIRED ON) | ||
endforeach() |
Oops, something went wrong.