From: James B. <jam...@gm...> - 2011-06-27 16:23:52
|
It all depends on how you use the values. Typical CMake convention is this: PROJECT_INCLUDE_PATH -> include_directories(${PROJECT_INCLUDE_PATH}) PROJECT_LIBRARY (full path to the library) -> target_link_libraries(target ${PROJECT_LIBRARY}) Libraries are typically encoded with the full path. This is largely due to how libraries are found in CMake. When you search for a library you do the following which produces the full path to the library. find_library(PROJECT_LIBRARY name <paths to search>) PROJECT_LIBRARY then has the full path to the library. When you feed the full path of the library to CMake it can be sure that this library and no other library will be used. You could compute the directory where the library is (using various techniques which I won't go into here), and then add the link path: link_directories(${PROJECT_LIBRARY_DIR}) target_link_libraries(target library_name) This method is less preferred to the full path to the library, because technically you can pick up a different library if another exists in the link path before the one you want. If your project has multiple libraries a helper variable is usually created: set(PROJECT_LIBRARIES ${PROJECT_LIB_A_LIBRARY} ${PROJECT_LIB_B_LIBRARY}) ... target_link_libraries(target ${PROJECT_LIBRARIES}) James On Thu, Jun 23, 2011 at 1:42 PM, Gordon L. Kindlmann <gl...@uc...>wrote: > > That answers it, thank you. > > Strange that CMake expects an include directory but the library file. > > Gordon > > On Jun 23, 2011, at 1:52 PM, Thomas Schultz wrote: > > > The following works for me: > > > > 1. Set Teem_FFTW3 to ON and 'c'onfigure > > 2. Dismiss the error message telling you that FFTW3 wasn't found > > 3. 't'oggle advanced mode > > 4. Set FFTW3_INCLUDE_DIR and FFTW3_LIBRARY manually > > Note that FFTW3_LIBRARY is the actual library file, not a directory! > > 5. Re-enable Teem_FFTW3 and 'c'onfigure > > 6. 'g'enerate and exit > > 7. make > > > > Best /Thomas > > > > On Thu, 2011-06-23 at 13:32 -0500, Gordon L. Kindlmann wrote: > >> Supposed my fftw3 installation is in /random/path/blah, but I know > >> that /random/path/blah is specific to my machine. > >> > >> How do I tell CMake "If you can't find FFTW3 on your own, provide a > >> way for the user to teach you were it is, using the ccmake > >> interface"? It would be through this ccmake-accessible option that I > >> would say, "try looking in /random/path/blah". > >> > >> Gordon > > > > > > > > > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with > vRanger. > Installation's a snap, and flexible recovery options mean your data is > safe, > secure and there when you need it. Data protection magic? > Nope - It's vRanger. Get your free trial download today. > http://p.sf.net/sfu/quest-sfdev2dev > _______________________________________________ > teem-users mailing list > tee...@li... > https://lists.sourceforge.net/lists/listinfo/teem-users > |