for a project I need to create an executable that includes all the libraries that I used (opencv, cgal) in order to execute it on a computer that has not those libraries. Cu
Add these lines after add_executable(MyExec "main.c") (for exemple) :
add_executable(MyExec "main.c")
target_link_libraries(MyExec PUBLIC "-static")
or before : link_libraries("-static")
link_libraries("-static")