Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up your CMake project before selecting a target. #122

Open
PTSDenjoyer8 opened this issue Feb 27, 2024 · 0 comments
Open

Set up your CMake project before selecting a target. #122

PTSDenjoyer8 opened this issue Feb 27, 2024 · 0 comments

Comments

@PTSDenjoyer8
Copy link

I am new to CMake and when I want to build the CMakeLists.txt it keeps saying: "Set up your CMake project before selecting a target".
The code I have in CMakeLists.txt is:
cmake_minimum_required(VERSION 3.0)

project(Detection)

set(OpenCV_DIR D:/OpenCV/opencv/build)
find_package(OpenCV REQUIRED)

add_executable(${PROJECT_NAME} firstDetection.cpp)

target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})

I saw these on YouTube and the guy built it without any errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant