Skip to content

Commit

Permalink
ENH: Add option on using system library
Browse files Browse the repository at this point in the history
  • Loading branch information
alanliu02 authored and lassoan committed Jan 24, 2022
1 parent 4bdd45e commit 4a743e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeExternals/DCMTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ ExternalProject_Include_Dependencies(${proj}
USE_SYSTEM_VAR ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}
)

# Let the user to chose wheather to use libs installed in the system
option(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} "Use installed ${proj} library in the system" OFF)
mark_as_advanced(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
unset(DCMTK_DIR CACHE)
find_package(DCMTK REQUIRED)
Expand Down
4 changes: 4 additions & 0 deletions CMakeExternals/ITK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ ExternalProject_Include_Dependencies(${proj}
USE_SYSTEM_VAR ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}
)

# Let the user to chose wheather to use libs installed in the system
option(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} "Use installed ${proj} library in the system" OFF)
mark_as_advanced(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
unset(ITK_DIR CACHE)
find_package(ITK REQUIRED NO_MODULE)
Expand Down
4 changes: 4 additions & 0 deletions CMakeExternals/VTK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ ExternalProject_Include_Dependencies(${proj}
USE_SYSTEM_VAR ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}
)

# Let the user to chose wheather to use libs installed in the system
option(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} "Use installed ${proj} library in the system" OFF)
mark_as_advanced(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
unset(VTK_DIR CACHE)
find_package(VTK REQUIRED NO_MODULE)
Expand Down

0 comments on commit 4a743e2

Please sign in to comment.