How to edit CMakelists.txt to change the addtional dependency library?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to edit CMakelists.txt to change the addtional dependency library?

jayPCL
This post was updated on .
I am compiling PCL 1.8.1 source code,and I encounter a problem which is that
some project can not find libraries like
"vtkGUISupportQt.lib","vtkGUISupportQtOpenGL.lib" etc.VS2013 output errors:

I found it is because of the different name of the corresponding library,
vtkGUISuppotQt.lib is vtkGUISupportQt-6.2-gd.lib in my computer.

So I changed the addtional dependencies list for corresponding project.




Then the modified project works well.but there are so many projects in
PCL,it is really a hard work to modify   the projects one by one, so I want
to ask how to edit CMakelists.txt to solve the problem in essence. do you
have good solution? thank you!



--
Sent from: http://www.pcl-users.org/
_______________________________________________
PCL-users@pointclouds.org / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: How to edit CMakelists.txt to change the addtional dependency library?

Mike Chinander
In your CMakeLists.txt file, you should set VTK_DIR to your specific location/version of VTK, e.g.,

SET(VTK_DIR "C:/Program Files/VTK/lib/cmake/vtk-8.1")
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

and then also include ${VTK_LIBRARIES} in the TARGET_LINK_LIBRARIES directive.

On Wed, Mar 28, 2018 at 9:03 AM, jayPCL <[hidden email]> wrote:
I am compiling PCL 1.8.1 source code,and I encounter a problem which is that
some project can not find libraries like
"vtkGUISupportQt.lib","vtkGUISupportQtOpenGL.lib" etc.VS2013 output errors:
<http://www.pcl-users.org/file/t499200/VS%E6%8A%A5%E9%94%99.png>
I found it is because of the different name of the corresponding library,
vtkGUISuppotQt.lib is vtkGUISupportQt-6.2-gd.lib in my computer.
<http://www.pcl-users.org/file/t499200/vtk%E5%90%8D.png>
So I changed the addtional dependencies list for corresponding project.
<http://www.pcl-users.org/file/t499200/%E9%99%84%E5%8A%A0%E4%BE%9D%E8%B5%96%E5%BA%93.png>
<http://www.pcl-users.org/file/t499200/%E6%9C%AA%E4%BF%AE%E6%94%B9.png>
<http://www.pcl-users.org/file/t499200/%E5%B7%B2%E4%BF%AE%E6%94%B9_.png>

Then the modified project works well.but there are so many projects in
PCL,it is really a hard work to modify   the projects one by one, so I want
to ask how to edit CMakelists.txt to solve the problem in essence. do you
have good solution? thank you!



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: How to edit CMakelists.txt to change the addtional dependency library?

Richard Frank
I think they may be trying to build the PCL 1.8.1 and not their own project.

In which case, you want to to use the CMake GUI and change the settings in the Cache rather than changing the PCL CMakeLists.txt file

It’s a bit of a chore, as I had to change some of the flann code, at least for VS 2015

But it can be done :>\

Rick Frank
Dominion Software, Inc.
825 Beacon Street
Newton, MA 02459
Medical, Scientific, and Industrial Software

On Mar 28, 2018, at 9:39 AM, Mike Chinander <[hidden email]> wrote:

In your CMakeLists.txt file, you should set VTK_DIR to your specific location/version of VTK, e.g.,

SET(VTK_DIR "C:/Program Files/VTK/lib/cmake/vtk-8.1")
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})

and then also include ${VTK_LIBRARIES} in the TARGET_LINK_LIBRARIES directive.

On Wed, Mar 28, 2018 at 9:03 AM, jayPCL <[hidden email]> wrote:
I am compiling PCL 1.8.1 source code,and I encounter a problem which is that
some project can not find libraries like
"vtkGUISupportQt.lib","vtkGUISupportQtOpenGL.lib" etc.VS2013 output errors:
<http://www.pcl-users.org/file/t499200/VS%E6%8A%A5%E9%94%99.png>
I found it is because of the different name of the corresponding library,
vtkGUISuppotQt.lib is vtkGUISupportQt-6.2-gd.lib in my computer.
<http://www.pcl-users.org/file/t499200/vtk%E5%90%8D.png>
So I changed the addtional dependencies list for corresponding project.
<http://www.pcl-users.org/file/t499200/%E9%99%84%E5%8A%A0%E4%BE%9D%E8%B5%96%E5%BA%93.png>
<http://www.pcl-users.org/file/t499200/%E6%9C%AA%E4%BF%AE%Ehttp://www.pcl-users.org/file/t499200/%E6%9C%AA%E4%BF%AE%E6%94%B9.png6%94%B9.png>
<http://www.pcl-users.org/file/t499200/%E5%B7%B2%E4%BF%AE%E6%94%B9_.png>

Then the modified project works well.but there are so many projects in
PCL,it is really a hard work to modify   the projects one by one, so I want
to ask how to edit CMakelists.txt to solve the problem in essence. do you
have good solution? thank you!



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: How to edit CMakelists.txt to change the addtional dependency library?

jayPCL
In reply to this post by Mike Chinander
Thank you for your reply,but the VTK_DIR looks correct in the CMakelists.txt.
because other VTK libraries has the correct path in VS2013. I want to figure
out how CMake works to add the three libraries( vtkGUISupportQt.lib etc.)I
had circle out in picture to the VS2013 Addtional Dependencies.so I can
alter they with correct name(vtkGUISupportQt-6.2-gd.lib or
vtkGUISupportQt*gd.lib).



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: How to edit CMakelists.txt to change the addtional dependency library?

jayPCL
In reply to this post by Richard Frank
Yes, I am buiding the PCL 1.8.1. and the VTK_DIR path is correct. I don't
know how the three vtk libraries was add to the addtional dependencies. the
error is just because the incorrect name of the libraries.



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users