On Oct 16, 2009, at 11:31 AM, Ramón Casero Cañas wrote:
SCIRun/src/Externals/qwt-5.2/lib/libqwt.so.5.2.1 I'll give you some suggestions for using CMake, since your situation is a little different from the standard library used by Seg3D since CMake will not actually be building the library. This will make things easier, but you won't be able to exactly follow existing Seg3D/SCIRun examples. Also, my command suggestions below are shorthand, I recommend looking at http://cmake.org/cmake/help/cmake-2-8-docs.html for detailed syntax. The basic idea is that to link with the resulting shared library, CMake will need to know both the location of the Qwt include files, and the location of the Qwt library. I would put a basic CMakeLists.txt in the qwt externals directory to define some variables and to install the qwt library into the appropriate location so that it can be found at run time. Add a line to Externals/CMakeLists.txt to add the qwt subdirectory so that the new CMakeLists.txt is found and included. if you make a variable say QWT_DIR that points to the top level area say SCIRun/src/Externals/qwt-5.2 then you can create a QWT_INCLUDES variable that points to the relative locations of the include directories, maybe something like ${QWT_DIR}/include (or whatever it happens to be for Qwt) or you can do a FIND_PATH similar to the FIND_LIBRARY below Do something similar for the libraries by setting a variable like QWT_LIBRARY to point to ${QWT_DIR}/lib/libqt2.so.5.2.1 Perhaps by using a statement like FIND_LIBRARY(QWT_LIBRARY qt2 PATHS ${QWT_DIR}/lib) Note: I think the recommended CMake way to do the above is to actually create a FindQWT.cmake module, but this seems like overkill. However, there may be one that already exists somewhere. If so, theoretically you could do a FIND_PACKAGE(QWT) then instead of the above. Also add some sort of install statement like INSTALL(TARGETS ${QWT_LIBRARY} RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) Then add ${QWT_INCLUDES} to SCIRun/src/CMakeLists.txt as part of the INCLUDE_DIRECTORIES statement Then in SCIRun/src/Applications/Seg3D/CMakeLists.txt, add a statement like TARGET_LINK_LIBRARIES(Seg3D ${QWT_LIBRARY}) Hopefully I haven't missed anything, but I'm not good enough with CMake yet to get it right without testing. (If anyone out here finds an egregious error with my approach, please let me know so that I can improve my own CMake knowledge. I don't want to lead anyone to far astray). This should at least get you started. As an additional note, I just wanted to let you know I've been following your progress and greatly appreciate your comments / suggestions / documentation. Thank you for help, Kris |
Archive powered by MHonArc 2.6.16.