From aa95f19203425c89ffcd560f1e7bc6b3bcb6959e Mon Sep 17 00:00:00 2001 From: David Cattermole Date: Mon, 2 Oct 2023 00:48:01 +1100 Subject: [PATCH] Lens Distortion Tool - Link to mmsolverlibs C++ and Rust. --- tools/lensdistortion/src/CMakeLists.txt | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tools/lensdistortion/src/CMakeLists.txt b/tools/lensdistortion/src/CMakeLists.txt index 1e4dd7f3..4ab37c89 100644 --- a/tools/lensdistortion/src/CMakeLists.txt +++ b/tools/lensdistortion/src/CMakeLists.txt @@ -19,26 +19,33 @@ include(MMSolverUtils) -set(target_exe_name "mmsolver-lensdistortion") +set(lensdistortion_exe_name "mmsolver-lensdistortion") set(source_files ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ) # Add test executable using the C++ bindings. -add_executable(${target_exe_name} ${source_files}) +add_executable(${lensdistortion_exe_name} ${source_files}) # MM Solver standalone libraries. find_package(mmsolverlibs_cpp REQUIRED) -target_link_libraries(${target_exe_name} - PRIVATE mmsolverlibs_cpp::mmsolverlibs_cpp +find_package(mmsolverlibs_rust REQUIRED) + +target_link_libraries(${lensdistortion_exe_name} + # The order of these libraries matters. See similar + # 'target_link_libraries()' in '${PROJECT_ROOT}/src/CMakeLists.txt'. + PUBLIC mmsolverlibs_rust::mmsolverlibs_rust + PUBLIC mmsolverlibs_cpp::mmsolverlibs_cpp + + PRIVATE ${rust_depend_on_libraries} ) -target_include_directories(${target_exe_name} +target_include_directories(${lensdistortion_exe_name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} # For generated 'buildConstant.h' file. PRIVATE ${CMAKE_BINARY_DIR}/include ) -install_target_executable_to_module(${target_exe_name} "${MODULE_FULL_NAME}") +install_target_executable_to_module(${lensdistortion_exe_name} "${MODULE_FULL_NAME}")