File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -324,12 +324,16 @@ if ("IOOggTheora" IN_LIST VTK_AVAILABLE_COMPONENTS)
324324endif ()
325325find_package (VTK COMPONENTS ${VTK_COMPONENTS} )
326326if (MSVC )
327+ # TODO: avoid duplication between here and folder for Visual studio running environment path
327328 if (EXISTS "${VTK_DIR} /bin/Release" )
328329 set (VTK_LIB_DIR "${VTK_DIR} /bin/Release" )
329- elseif (EXISTS "${VTK_DIR} /bin" )
330- set (VTK_LIB_DIR "${VTK_DIR} /bin" )
331330 else ()
332- message (SEND_ERROR "Did not find a VTK dll folder in ${VTK_DIR} !" )
331+ # when using an installed VTK version, we only know the relative path from the vtk-config.cmake file
332+ # we are not aware of a variable containing the "base folder" of the VTK installation
333+ get_filename_component (VTK_LIB_DIR "../../../bin" REALPATH BASE_DIR "${VTK_DIR} " )
334+ if (NOT EXISTS "${VTK_LIB_DIR} " )
335+ message (SEND_ERROR "Did not find a VTK dll folder (checked: ${VTK_DIR} /bin/Release, ${VTK_LIB_DIR} )!" )
336+ endif ()
333337 endif ()
334338else ()
335339 if (EXISTS "${VTK_DIR} /lib" )
You can’t perform that action at this time.
0 commit comments