0
我CMakeLists.txt
文件「的目標不受該項目建成」是:CMake的錯誤:
cmake_minimum_required(VERSION 3.7)
project(OpenCV_Basics)
set(CMAKE_CXX_STANDARD 11)
set(SOURCE_FILES main.cpp)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_LIBS})
target_link_libraries(OpenCV_Basics)
add_executable(OpenCV_Basics ${SOURCE_FILES})
當我試圖編譯main.cpp中,我得到了stucked。
CMake Error at CMakeLists.txt:10 (target_link_libraries):
Cannot specify link libraries for target "OpenCV_Basics" which is not
built
by this project.
怎麼了?
我在Mac上使用Clion。