Hello,
   I have a problem with the dependencies of an executable. The executable 
depends on a number of shared libraries. If I define the executable like this


add_executable(aliroot aliroot.cxx)
target_link_libraries(aliroot Mylib)

then the link command really looks like

g++ -o aliroot ../lib/libMylib.so

and I have plenty of problems with relocation and rpaths. If I just do

target_link_libraries(aliroot -lMylib)

the link command looks "right":

g++ -o aliroot -lMylib

however the executable is NOT relinked in case a library is recreated. I even 
tried to do 

add_dependencies(aliroot <path to the library>/libMylib.so)

but it does not work. Any hint? Thanks!

Federico Carminati
CERN-PH 
1211 Geneva 23
Switzerland
Tel: +41 22 76 74959
Fax: +41 22 76 68505
Mobile: +41 76 487 4843



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to