3.5.2 : Le CMakeLists.txt



Voici le CMakeLists.txt : On ajoute un exécutable :
1
add_executable(test_print_shadok main.cpp)


On le lie à notre bibliothèque
1
target_link_libraries(test_print_shadok shadok)


On installe notre programme :
1
install(TARGETS test_print_shadok RUNTIME DESTINATION bin)


Le fichier CMakeLists.txt complet :
1
2
3
add_executable(test_print_shadok main.cpp)
target_link_libraries(test_print_shadok shadok)
install(TARGETS test_print_shadok RUNTIME DESTINATION bin)
Lien de téléchargement ici.