iot-edge-v1
iot-edge-v1 copied to clipboard
"cmake --build . --target install" always install to /usr/local
Hi, The issue is following issue 225: https://github.com/Azure/azure-iot-gateway-sdk/issues/225
We found following commands always install the gateway files into /usr/local cd build cmake --build . --target install
We need to install to some our defined folder, or the local "install-deps" folder. Any advice how to do that?
Thanks..
Hello @Kevin0626 , the default cmake install prefix is /usr/local. It can be set to a different value adding the following option to the command line: -DCMAKE_INSTALL_PREFIX:PATH=<new path>
I'm pretty sure this is the only option you need, but there might be others that affect what you want. Please let me know if that works.
Closing due to inactivity. Please reopen if the issue persists. Thanks!
@darobs CMAKE_INSTALL_PREFIX in tools/build.sh has no impact on dependencies. Deps still continue to go to /usr/local
I replied, then I realized it's not working like I expected. The build is supposed to propagate the CMAKE_INSTALL_PREFIX to the dependencies, but if it's not, then that's a bug.
" -DCMAKE_INSTALL_PREFIX:PATH=
cd $azure_root/build
#cmake $toolchain_def -DCMAKE_INSTALL_PREFIX:PATH=$install_path --build .
make DESTDIR=$install_path install
@Kevin0626 are you still interested in investigating this? If so we'll need more detailed repro steps, otherwise I'll close this out.
In some of your comments you mention our build script tools/build.sh
but in others you talk about using cmake
directly on the command line, so I'm not sure what you're trying to do. Also, the commented-out command from your last comment is confusing to me:
cmake $toolchain_def -DCMAKE_INSTALL_PREFIX:PATH=$install_path --build .
You generally run CMake twice; the first command generates the project files (makefiles, visual studio project files, or whatever), and the second command actually builds the projects. But this command has elements of both, so I'd expect it to fail.