<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div><br></div><div>Hello,</div><div><br></div><div>I have the following script:</div><div>=================================</div><div><p style="margin: 0px;" data-mce-style="margin: 0px;">file(GLOB_RECURSE statphys "*.cpp")</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">#add_library(simol-statphys SHARED ${statphys})<br>add_executable(simol-statphys ${statphys})</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">add_dependencies(simol-statphys simol-core)<br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">add_custom_target(statphys simol-statphys)</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">target_link_libraries(simol-statphys simol-core)</p><p style="margin: 0px;" data-mce-style="margin: 0px;">target_link_libraries(simol-statphys ${ARMADILLO_INSTALL_DIR}/lib/libarmadillo.so)<br>target_link_libraries(simol-statphys ${YAMLCPP_INSTALL_DIR}/lib/libyaml-cpp.a)</p><p style="margin: 0px;" data-mce-style="margin: 0px;">=================================</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">I would like generate a shared library simol-statphys instead of an executable simol-statphys.</p><p style="margin: 0px;" data-mce-style="margin: 0px;">In other words, I would like to replace the call to add_executable, to the one which is contained in the comment below this call.</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">However, if I do this, and I type</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">    make statphys</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">I get the following error message:</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Scanning dependencies of target statphys<br>/bin/sh: 1: simol-statphys: not found<br>make[3]: *** [src/modules/statphys/CMakeFiles/statphys] Erreur 127<br>make[2]: *** [src/modules/statphys/CMakeFiles/statphys.dir/all] Erreur 2<br>make[1]: *** [src/modules/statphys/CMakeFiles/statphys.dir/rule] Erreur 2<br>make: *** [statphys] Erreur 2</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Does someone can explain me where do the problem come from?</p><p style="margin: 0px;" data-mce-style="margin: 0px;"><br></p><p style="margin: 0px;" data-mce-style="margin: 0px;">Cédric</p></div><div><br></div></div></body></html>