[vtkusers] UseVTK.cmake: file not recognized
rolof
hitman-47fran at hotmail.com
Thu Jun 7 05:20:30 EDT 2018
Hello, I am trying to compile a source code to load a stl file. This source
is inside of a folder in my dekstop, and I have not installed vtk, I have
only built it.
My Cmake file is the next:
---------------------------------------------------------------------------------------------------------------
# This is the root ITK CMakeLists file.
cmake_minimum_required(VERSION 3.9.5 FATAL_ERROR)
foreach(p
## Only policies introduced after the cmake_minimum_required
## version need to explicitly be set to NEW.
CMP0070 #3.10.0 Define ``file(GENERATE)`` behavior for relative paths.
CMP0071 #3.10.0 Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED``
files.
)
if(POLICY ${p})
cmake_policy(SET ${p} NEW)
endif()
endforeach()
set (CMAKE_CXX_STANDARD 11)
# This project is designed to be built outside the Insight source tree.
project(HelloWorld)
# Find VTK.
set( VTK_DIR "/home/fj/src_build/VTK-8.1.0" )
FIND_PACKAGE (VTK REQUIRED)
IF(VTK_FOUND)
INCLUDE(${VTK_USE_FILE})
ENDIF(VTK_FOUND)
add_executable(loadStl load_STL_file.cpp)
target_link_libraries(loadStl ${VTK_USE_FILE})
---------------------------------------------------------------------------------------------------------------
When I try to do the "make step" I obtain the next:
---------------------------------------------------------------------------------------------------------------
[ 50%] Building CXX object CMakeFiles/loadStl.dir/load_STL_file.cpp.o
[100%] Linking CXX executable loadStl
/home/fj/src_build/VTK-8.1.0/CMake/UseVTK.cmake: file not recognized:
collect2: error: ld returned 1 exit status
....
---------------------------------------------------------------------------------------------------------------
I do not know what I am doing wrong. Thanks in advance.
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list