berak, thank You for fast response!
Regarding Your question - I don’t know. It just works
Here is my vcpkg.json:
{
"name": "3ximageenhancementcmakecopy",
"version": "1.0",
"dependencies": [
"opencv",
"dlib",
"eigen3",
"gsl",
{
"name": "imgui",
"features": [ "glfw-binding", "opengl3-binding" ]
},
"glfw3",
"glad"
]
}
And full CmakeLists.txt:
# CMakeList.txt : CMake project for my_project, include source and define
# project specific logic here.
#
find_package(dlib CONFIG REQUIRED)
find_package(Eigen3 CONFIG REQUIRED)
find_package(glad CONFIG REQUIRED)
find_package(glfw3 CONFIG REQUIRED)
find_package(GSL REQUIRED)
find_package(imgui CONFIG REQUIRED)
find_package(OpenCV CONFIG REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )
# Add source to this project's executable.
add_executable (my_project "main.cpp" "gui.h" "gui.cpp")
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET my_project PROPERTY CXX_STANDARD 20)
endif()
# TODO: Add tests and install targets if needed.
target_link_libraries(my_project PRIVATE dlib::dlib)
target_link_libraries(my_project PRIVATE Eigen3::Eigen)
target_link_libraries(my_project PRIVATE glad::glad)
target_link_libraries(my_project PRIVATE glfw)
target_link_libraries(my_project PRIVATE GSL::gsl GSL::gslcblas)
target_link_libraries(my_project PRIVATE imgui::imgui)
target_link_libraries(my_project PRIVATE opencv_ml opencv_dnn opencv_core opencv_flann)
target_link_libraries(my_project PRIVATE ${OpenCV_LIBS})
The getBuildInformation() is provided above in the answer to laurent.berger.
Maybe CmakePresets.json can be in handy, so I will provide it below as well:
{
"version": 3,
"configurePresets": [
{
"name": "windows-base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe",
"CMAKE_TOOLCHAIN_FILE": {
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"type": "FILEPATH"
}
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "x64-debug",
"displayName": "x64 Debug",
"inherits": "windows-base",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"environment": {
"VCPKG_ROOT": "E:/VSLibs/vcpkg"
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "x64-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
"inherits": "windows-base",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x86-release",
"displayName": "x86 Release",
"inherits": "x86-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
}
]
}
Everything is working, except the speed loss in the inverse dft.