Merci, déjà ça avance, pour l'IMPORTED il a fallu que je passe à la version 2.6 de CMake (2.4 dans le testing de debian). Mais je suis toujours bloqué.
Soit dans scripts j'ai ceci :add_executable (mcmc-pds_easy.sh IMPORTED)
set_property(TARGET mcmc-pds_easy.sh PROPERTY IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/scripts)
install (TARGETS mcmc-pds_easy.sh DESTINATION bin)et j'obtiens (avec ou sans le set_property, en changeant la ligne par ex. en mettant seulement "." au lieu du chemin complet ou encore en rajoutant /mcmc-pds_easy.sh) :CMake Error at scripts/CMakeLists.txt:6 (install):
install TARGETS given target "mcmc-pds_easy.sh" which does not exist in
this directory.
J'ai tenté aussi ceci dans le top cette fois et en enlevant seulement le install du CMakeLists.txt qui est dans scripts :add_subdirectory (scripts)
install (TARGETS scripts/mcmc-pds_easy.sh RUNTIME DESTINATION bin)qui donne :CMake Error at CMakeLists.txt:14 (install):
install TARGETS given target "scripts/mcmc-pds_easy.sh" which does not
exist in this directory.En mettant plutot PROGRAMS que TARGETS pas de message d'erreur mais le script ne s'installe pas dans le /usr/local/bin/. J'avoue être un peu paumé, je ne vois pas ce qui cloche.
[^] # Re: Erreur dans la ligne "install" ?
Posté par nicoastro . En réponse au message CMake : multiples commandes install. Évalué à 2.
Soit dans scripts j'ai ceci :
add_executable (mcmc-pds_easy.sh IMPORTED)et j'obtiens (avec ou sans le set_property, en changeant la ligne par ex. en mettant seulement "." au lieu du chemin complet ou encore en rajoutant /mcmc-pds_easy.sh) :set_property(TARGET mcmc-pds_easy.sh PROPERTY IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/scripts)
install (TARGETS mcmc-pds_easy.sh DESTINATION bin)
CMake Error at scripts/CMakeLists.txt:6 (install):install TARGETS given target "mcmc-pds_easy.sh" which does not exist in
this directory.
J'ai tenté aussi ceci dans le top cette fois et en enlevant seulement le install du CMakeLists.txt qui est dans scripts :
add_subdirectory (scripts)qui donne :install (TARGETS scripts/mcmc-pds_easy.sh RUNTIME DESTINATION bin)
CMake Error at CMakeLists.txt:14 (install):En mettant plutot PROGRAMS que TARGETS pas de message d'erreur mais le script ne s'installe pas dans le /usr/local/bin/. J'avoue être un peu paumé, je ne vois pas ce qui cloche.install TARGETS given target "scripts/mcmc-pds_easy.sh" which does not
exist in this directory.