-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
45 lines (35 loc) · 1.16 KB
/
CMakeLists.txt
File metadata and controls
45 lines (35 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required(VERSION 3.10)
# Set the toolchain file before calling project()
# Set the vcpkg toolchain file if it's not already set
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "C:/Users/Bibek Joshi/Desktop/vcpkg/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "Vcpkg toolchain file")
endif()
project(ImageRecognition)
# Find OpenCV
set(OPENCV_DIR C:/opencv/build)
find_package(OpenCV REQUIRED)
# Find nlohmann_json
set(nlohmann_json_DIR "C:/Users/Bibek Joshi/Desktop/vcpkg/installed/x64-windows/share/nlohmann_json")
find_package(nlohmann_json CONFIG REQUIRED)
# Find CURL
set(CURL_INCLUDE_DIR "C:/Users/Bibek Joshi/Desktop/vcpkg/installed/x64-windows/share/curl")
find_package(CURL REQUIRED)
# Add ImGui and its backends
add_subdirectory(imgui)
# Add the executable
add_executable(${PROJECT_NAME} src/main.cpp)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(glfw)
# Link libraries
target_link_libraries(${PROJECT_NAME} PRIVATE
${OpenCV_LIBS}
imgui
glfw
${GLFW_LIBRARIES}
OpenGL32.lib
CURL::libcurl
nlohmann_json::nlohmann_json
)