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

add cmake files #59

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
cmake_minimum_required(VERSION 3.11)

set(project_name "MatchTool")

project(${project_name})

#for MFC
add_definitions(-D_AFXDLL)
set(CMAKE_MFC_FLAG 2)
add_definitions(-DUNICODE -D_UNICODE)

#for opencv4
add_definitions(-DOPENCV_4X)

set(CMAKE_CXX_STANDARD 17)

find_package(OpenCV CONFIG REQUIRED)

add_executable(${project_name} WIN32
#MatchTool/CvvImage.h
MatchTool/framework.h
MatchTool/MatchTool.h
MatchTool/MatchToolDlg.h
MatchTool/pch.h
MatchTool/resource.h
MatchTool/targetver.h

#MatchTool/arm_version.cpp
#CvvImage.cpp
MatchTool/MatchTool.cpp
MatchTool/MatchToolDlg.cpp
MatchTool/pch.cpp

MatchTool/MatchTool.rc
MatchTool/MatchTool.Lang
MatchTool/res/MatchTool.ico
MatchTool/res/MatchTool.rc2
)

# Copy MatchTool.Lang to the output directory
add_custom_command(TARGET ${project_name} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${CMAKE_CURRENT_SOURCE_DIR}/MatchTool/MatchTool.Lang
$<TARGET_FILE_DIR:${project_name}>
)

target_link_libraries(${project_name} PRIVATE opencv_core opencv_imgproc opencv_highgui)

9 changes: 9 additions & 0 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"dependencies": [
{
"name": "opencv4",
"version>=": "4.8.0#21"
}
],
"builtin-baseline": "576379156e82da642f8d1834220876759f13534d"
}