2

To be honest, I recently started working with find_package in CONFIG-mode... Is there an easy way to install packages globally on Windows 10?

Or I must manually set -DCMAKE_INSTALL_PREFIX and build all stuff by my hand?:

cmake . -Bbuild/debug -DCMAKE_BUILD_TYPE=Debug -DCMAKE_DEBUG_POSTFIX=d -DCMAKE_INSTALL_PREFIX="install"
cmake --build build/debug --target install
cmake . -Bbuild/release -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="install"
cmake --build build/release --target install

All I want is - register the package once and forget about it. After the package is registered all commands like find_package(X CONFIG REQUIRED) must work well... Do all paths must be determined manually?

cramopy
  • 3,459
  • 6
  • 28
  • 42
nuke_bird
  • 19
  • 4
  • and yeah, how can I build and install release+debug using only one line command? – nuke_bird Oct 29 '17 at 15:05
  • Do you want to install the packages or should they just be found by other CMake enabled projects? More concrete would ["Making cmake library accessible by other cmake packages automatically"](https://stackoverflow.com/questions/33462209/making-cmake-library-accessible-by-other-cmake-packages-automatically) be sufficient. – Florian Oct 29 '17 at 19:23
  • @Florian they must be found by other CMake-based projects without any manual path selection and etc. – nuke_bird Nov 04 '17 at 11:45

0 Answers0