Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ include(Dependencies)
include(CompilerCache)
use_compiler_cache()

find_package(trx-cpp CONFIG REQUIRED)

if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git AND NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/hooks/pre-commit)
message(WARNING
"pre-commit git hook for clang-format not found!\n"
Expand Down
14 changes: 14 additions & 0 deletions cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,20 @@ add_library(nifti::nifti ALIAS nifti)

target_include_directories(nifti INTERFACE "${NIFTI_INCLUDE_DIRS}")

# TRX Format
if(MRTRIX_USE_SYSTEM_TRXCPP)
find_package(trx-cpp CONFIG REQUIRED)
else()
set(trxcpp_url "https://github.com/tee-ar-ex/trx-cpp")
FetchContent_Declare(
trx-cpp
DOWNLOAD_EXTRACT_TIMESTAMP ON
GIT_REPOSITORY ${trxcpp_url}
GIT_TAG b628275c51f37f9c9070aff29d906e29453be3ce
)
FetchContent_MakeAvailable(trx-cpp)
endif()

# Google Test
if(MRTRIX_BUILD_TESTS)
set(googletest_version 1.17.0)
Expand Down
3 changes: 3 additions & 0 deletions cpp/cmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ function(add_cmd CMD_SRC IS_GUI)
$<IF:$<BOOL:${IS_GUI}>,mrtrix::gui,mrtrix::core>
mrtrix::executable-version
)
if(CMD_NAME STREQUAL "tckconvert")
target_link_libraries(${CMD_NAME} PRIVATE trx-cpp::trx)
endif()
set_target_properties(${CMD_NAME} PROPERTIES
LINK_DEPENDS_NO_SHARED true
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin
Expand Down
Loading