Hi, I have a module that depends on the Minuit2 library.
http://seal.web.cern.ch/seal/work-packages/mathlibs/minuit/ I created an external project for it, and I can build it by "make Minuit" from Linux or by right clicking and "Build" from VS2008. I do not know, however, how to make the module depend on this project. I added Minuit to the PACKAGE_DEPENDS section of the MITK_CREATE_MODULE macro, but it does not trigger building Minuit. I also tried to add "add_dependencies(DceAlgorithms Minuit)" but did not work. What is the way to do that? Or do you suggest to build Minuit as a project utility instead? The module's CMakeLists.txt file: set(MINUIT_INCLUDE_DIR ${CMAKE_BINARY_DIR}/../CMakeExternals/Source/Minuit/inc) include_directories(${MINUIT_INCLUDE_DIR}) MITK_CREATE_MODULE(DceAlgorithms INCLUDE_DIRS ${CMAKE_BINARY_DIR} PACKAGE_DEPENDS Minuit DEPENDS Mitk ) set(MINUIT_LIBRARY_DIR ${CMAKE_BINARY_DIR}/../Minuit-build) message(STATUS "minuit libs: " ${MINUIT_LIBRARY_DIR}) link_directories(${MINUIT_LIBRARY_DIR}) add_dependencies(DceAlgorithms Minuit) target_link_libraries(DceAlgorithms Minuit2) ----------------------- Another problem is that if I build Minuit first and then the module, then I get the following error: Linking CXX shared library ../../bin/libDceAlgorithms.so /usr/bin/ld: cannot find -lMinuit2 collect2: ld returned 1 exit status ... However, the libMinuit2.so is there at the ${MINUIT_LIBRARY_DIR} directory what I added by the "link_directories" macro. Thanks, Miklos ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
