Hi @Mizux
I am trying to follow the advice you gave me over on the other thread.
As indicated there, I have installed OR Tools on Windows Visual Studio 2022 using the steps mentioned on the website.
Now, I performed the steps exactly as mentioned on https://developers.google.com/optimization/install/cpp/source_windows
from my local drive: E:\ortools
Now, after all steps are run, the folder structure is E:\ortools\or-tools\ .git and other subfolders here such as bazel\ , binder\ , build\ , cmake\ , ortools\ etc.
I have my project folder elsewhere, say, C:\myproject\CMakeLists.txt
Within this CMakeLists.txt, the following find_package() line fails.
set(ortools_loc_2 "E:\\ortools\\or-tools\\ortools")
if(EXISTS "${ortools_loc_2}" AND IS_DIRECTORY "${ortools_loc_2}")
message(STATUS "ortools exists on this machine")
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "E:\\ortools\\or-tools\\ortools") # should ideally go in presets file see https://www.reddit.com/r/cpp_questions/comments/17r5g6r/comment/k8imfvs/
find_package(ortools CONFIG REQUIRED)
set(ortoolsfound 1)
Could you please suggest how I can inform my project's CMakeLists.txt to find the source built ORTools of my custom location?
Thanks.
Hi @Mizux
I am trying to follow the advice you gave me over on the other thread.
As indicated there, I have installed OR Tools on Windows Visual Studio 2022 using the steps mentioned on the website.
Now, I performed the steps exactly as mentioned on https://developers.google.com/optimization/install/cpp/source_windows
from my local drive: E:\ortools
Now, after all steps are run, the folder structure is E:\ortools\or-tools\ .git and other subfolders here such as bazel\ , binder\ , build\ , cmake\ , ortools\ etc.
I have my project folder elsewhere, say, C:\myproject\CMakeLists.txt
Within this CMakeLists.txt, the following find_package() line fails.
Could you please suggest how I can inform my project's CMakeLists.txt to find the source built ORTools of my custom location?
Thanks.