반응형 Getting a CMake Error: Cannot specify link libraries for target which is not built by the project1 [ROS] Getting a CMake Error: Cannot specify link libraries for target which is not built by the project CMakeLists.txt를 작성 중에 다음과 같이 작성 후에, 빌드 시 Getting a CMake Error: Cannot specify link libraries for target which is not built by the project 계속 다음과 같은 에러가 났다 해결 방법은 매우 간단했다. target_link_libraries를 add_executable 과 find_package 를 작성한 라인 뒤에 적어주면 링크 요소들을 알 수 있게 된다. find_package는 필자의 경우 CMakelists의 초반부에 적어줘서 add_executable만 신경쓰면 됐었다. 2023. 7. 5. 이전 1 다음 반응형