[CMake] Building a DLL and test driver EXE using CMake -- error by design?

Chris Volpe ARA/SED cvolpe at ara.com
Wed Mar 23 12:26:49 EDT 2011


Jc-

Thanks for the suggestions, but it's not clear if your suggestions are general suggestions, or if they actually address the problem I'm experiencing. Moreover, the problems that your suggestions claim to solve seem to be problems that I am not experiencing.

For example, you write:
After being executed, this later one will allow you to include VTK header files from files associated with FeatureViewer target and targets located in subdirectories. For example tests.

This is precisely what I *don't* want to do. I want to hide VTK's usage completely from clients of FeatureViewer. I do not want clients of FeatureViewer to have to include VTK headers or link against VTK libraries. Of course, the VTK dlls will be available at runtime for FeatureViewer to load, but that doesn't affect the client's compilation or linking process.

Also:
Moreover, in your example, it seems the command "LINK_DIRECTORIES" is missing. Indeed, you should add the following command before calling ADD_LIBRARY(FeatureViewer ...):

LINK_DIRECTORIES(${VTK_LIBRARY_DIRS})
What problem does "LINK_DIRECTORIES" solve? Note that I have no problem building FeatureViewer: It finds the VTK libraries just fine without LINK_DIRECTORIES. Again, the TestDriver application builds and runs just fine if I manually remove the references to vtk*.lib in its project settings.

thanks,
-Chris


Chris
--
Christopher R. Volpe, Ph.D.                                                           Email: cvolpe at ara.com<mailto:cvolpe at ara.com>
Senior Scientist, Information Exploitation Systems             Main Desk: 919-582-3300
Applied Research Associates, Inc<http://www.ara.com/>                                                     Direct: 919-582-3380
8537 Six Forks Rd., Suite 6000                                                            Fax : 919-582-3301
Raleigh, NC 27615                                         Web: http://www.ara.com/offices/NC.htm


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110323/8ba304dd/attachment.htm>


More information about the CMake mailing list